diff options
author | romankoshelev <romankoshelev@yandex-team.com> | 2024-05-13 11:00:27 +0300 |
---|---|---|
committer | romankoshelev <romankoshelev@yandex-team.com> | 2024-05-13 11:13:05 +0300 |
commit | 5b22fadb0f035a3b82c328e0ae710ad2b92f6eac (patch) | |
tree | e15dc649c79c4fb78f35cd6694dfe9af9bfcc0ad /contrib/libs | |
parent | 5946aa7d3cbca62f6bcf074e8a2b9346e7a96af4 (diff) | |
download | ydb-5b22fadb0f035a3b82c328e0ae710ad2b92f6eac.tar.gz |
Update ICU to 75.1
904da4ae1c86fc5542eac7f1cd18d97b72eb8517
Diffstat (limited to 'contrib/libs')
430 files changed, 29977 insertions, 15328 deletions
diff --git a/contrib/libs/icu/LICENSE b/contrib/libs/icu/LICENSE index 22472dc2ec..d67e1c8c66 100644 --- a/contrib/libs/icu/LICENSE +++ b/contrib/libs/icu/LICENSE @@ -1,49 +1,44 @@ -UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE - -See Terms of Use <https://www.unicode.org/copyright.html> -for definitions of Unicode Inc.’s Data Files and Software. - -NOTICE TO USER: Carefully read the following legal agreement. -BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S -DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), -YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE -TERMS AND CONDITIONS OF THIS AGREEMENT. -IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE -THE DATA FILES OR SOFTWARE. +UNICODE LICENSE V3 COPYRIGHT AND PERMISSION NOTICE -Copyright © 1991-2023 Unicode, Inc. All rights reserved. -Distributed under the Terms of Use in https://www.unicode.org/copyright.html. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Unicode data files and any associated documentation -(the "Data Files") or Unicode software and any associated documentation -(the "Software") to deal in the Data Files or Software -without restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, and/or sell copies of -the Data Files or Software, and to permit persons to whom the Data Files -or Software are furnished to do so, provided that either -(a) this copyright and permission notice appear with all copies -of the Data Files or Software, or -(b) this copyright and permission notice appear in associated -Documentation. - -THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT OF THIRD PARTY RIGHTS. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS -NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL -DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THE DATA FILES OR SOFTWARE. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, -use or other dealings in these Data Files or Software without prior -written authorization of the copyright holder. +Copyright © 2016-2024 Unicode, Inc. + +NOTICE TO USER: Carefully read the following legal agreement. BY +DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR +SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE +TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT +DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of data files and any associated documentation (the "Data Files") or +software and any associated documentation (the "Software") to deal in the +Data Files or Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, and/or sell +copies of the Data Files or Software, and to permit persons to whom the +Data Files or Software are furnished to do so, provided that either (a) +this copyright and permission notice appear with all copies of the Data +Files or Software, or (b) this copyright and permission notice appear in +associated Documentation. + +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF +THIRD PARTY RIGHTS. + +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE +BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA +FILES OR SOFTWARE. + +Except as contained in this notice, the name of a copyright holder shall +not be used in advertising or otherwise to promote the sale, use or other +dealings in these Data Files or Software without prior written +authorization of the copyright holder. + +SPDX-License-Identifier: Unicode-3.0 ---------------------------------------------------------------------- diff --git a/contrib/libs/icu/common/brkeng.cpp b/contrib/libs/icu/common/brkeng.cpp index ce3d09cf23..e53a7b2ce4 100644 --- a/contrib/libs/icu/common/brkeng.cpp +++ b/contrib/libs/icu/common/brkeng.cpp @@ -21,6 +21,7 @@ #include "unicode/uscript.h" #include "unicode/ucharstrie.h" #include "unicode/bytestrie.h" +#include "unicode/rbbi.h" #include "brkeng.h" #include "cmemory.h" @@ -70,19 +71,21 @@ UnhandledEngine::~UnhandledEngine() { } UBool -UnhandledEngine::handles(UChar32 c) const { +UnhandledEngine::handles(UChar32 c, const char* locale) const { + (void)locale; // Unused return fHandled && fHandled->contains(c); } int32_t UnhandledEngine::findBreaks( UText *text, - int32_t /* startPos */, + int32_t startPos, int32_t endPos, UVector32 &/*foundBreaks*/, UBool /* isPhraseBreaking */, UErrorCode &status) const { if (U_FAILURE(status)) return 0; - UChar32 c = utext_current32(text); + utext_setNativeIndex(text, startPos); + UChar32 c = utext_current32(text); while((int32_t)utext_getNativeIndex(text) < endPos && fHandled->contains(c)) { utext_next32(text); // TODO: recast loop to work with post-increment operations. c = utext_current32(text); @@ -111,50 +114,46 @@ UnhandledEngine::handleCharacter(UChar32 c) { */ ICULanguageBreakFactory::ICULanguageBreakFactory(UErrorCode &/*status*/) { - fEngines = 0; + fEngines = nullptr; } ICULanguageBreakFactory::~ICULanguageBreakFactory() { - if (fEngines != 0) { - delete fEngines; - } + delete fEngines; } -U_NAMESPACE_END -U_CDECL_BEGIN -static void U_CALLCONV _deleteEngine(void *obj) { - delete (const icu::LanguageBreakEngine *) obj; +void ICULanguageBreakFactory::ensureEngines(UErrorCode& status) { + static UMutex gBreakEngineMutex; + Mutex m(&gBreakEngineMutex); + if (fEngines == nullptr) { + LocalPointer<UStack> engines(new UStack(uprv_deleteUObject, nullptr, status), status); + if (U_SUCCESS(status)) { + fEngines = engines.orphan(); + } + } } -U_CDECL_END -U_NAMESPACE_BEGIN const LanguageBreakEngine * -ICULanguageBreakFactory::getEngineFor(UChar32 c) { +ICULanguageBreakFactory::getEngineFor(UChar32 c, const char* locale) { const LanguageBreakEngine *lbe = nullptr; UErrorCode status = U_ZERO_ERROR; + ensureEngines(status); + if (U_FAILURE(status) ) { + // Note: no way to return error code to caller. + return nullptr; + } static UMutex gBreakEngineMutex; Mutex m(&gBreakEngineMutex); - - if (fEngines == nullptr) { - LocalPointer<UStack> engines(new UStack(_deleteEngine, nullptr, status), status); - if (U_FAILURE(status) ) { - // Note: no way to return error code to caller. - return nullptr; - } - fEngines = engines.orphan(); - } else { - int32_t i = fEngines->size(); - while (--i >= 0) { - lbe = (const LanguageBreakEngine *)(fEngines->elementAt(i)); - if (lbe != nullptr && lbe->handles(c)) { - return lbe; - } + int32_t i = fEngines->size(); + while (--i >= 0) { + lbe = (const LanguageBreakEngine *)(fEngines->elementAt(i)); + if (lbe != nullptr && lbe->handles(c, locale)) { + return lbe; } } - + // We didn't find an engine. Create one. - lbe = loadEngineFor(c); + lbe = loadEngineFor(c, locale); if (lbe != nullptr) { fEngines->push((void *)lbe, status); } @@ -162,7 +161,7 @@ ICULanguageBreakFactory::getEngineFor(UChar32 c) { } const LanguageBreakEngine * -ICULanguageBreakFactory::loadEngineFor(UChar32 c) { +ICULanguageBreakFactory::loadEngineFor(UChar32 c, const char*) { UErrorCode status = U_ZERO_ERROR; UScriptCode code = uscript_getScript(c, &status); if (U_SUCCESS(status)) { @@ -299,6 +298,70 @@ ICULanguageBreakFactory::loadDictionaryMatcherFor(UScriptCode script) { return nullptr; } + +void ICULanguageBreakFactory::addExternalEngine( + ExternalBreakEngine* external, UErrorCode& status) { + LocalPointer<ExternalBreakEngine> engine(external, status); + ensureEngines(status); + LocalPointer<BreakEngineWrapper> wrapper( + new BreakEngineWrapper(engine.orphan(), status), status); + static UMutex gBreakEngineMutex; + Mutex m(&gBreakEngineMutex); + fEngines->push(wrapper.getAlias(), status); + wrapper.orphan(); +} + +BreakEngineWrapper::BreakEngineWrapper( + ExternalBreakEngine* engine, UErrorCode &status) : delegate(engine, status) { +} + +BreakEngineWrapper::~BreakEngineWrapper() { +} + +UBool BreakEngineWrapper::handles(UChar32 c, const char* locale) const { + return delegate->isFor(c, locale); +} + +int32_t BreakEngineWrapper::findBreaks( + UText *text, + int32_t startPos, + int32_t endPos, + UVector32 &foundBreaks, + UBool /* isPhraseBreaking */, + UErrorCode &status) const { + if (U_FAILURE(status)) return 0; + int32_t result = 0; + + // Find the span of characters included in the set. + // The span to break begins at the current position in the text, and + // extends towards the start or end of the text, depending on 'reverse'. + + utext_setNativeIndex(text, startPos); + int32_t start = (int32_t)utext_getNativeIndex(text); + int32_t current; + int32_t rangeStart; + int32_t rangeEnd; + UChar32 c = utext_current32(text); + while((current = (int32_t)utext_getNativeIndex(text)) < endPos && delegate->handles(c)) { + utext_next32(text); // TODO: recast loop for postincrement + c = utext_current32(text); + } + rangeStart = start; + rangeEnd = current; + int32_t beforeSize = foundBreaks.size(); + int32_t additionalCapacity = rangeEnd - rangeStart + 1; + // enlarge to contains (rangeEnd-rangeStart+1) more items + foundBreaks.ensureCapacity(beforeSize+additionalCapacity, status); + if (U_FAILURE(status)) return 0; + foundBreaks.setSize(beforeSize + beforeSize+additionalCapacity); + result = delegate->fillBreaks(text, rangeStart, rangeEnd, foundBreaks.getBuffer()+beforeSize, + additionalCapacity, status); + if (U_FAILURE(status)) return 0; + foundBreaks.setSize(beforeSize + result); + utext_setNativeIndex(text, current); + return result; +} + U_NAMESPACE_END #endif /* #if !UCONFIG_NO_BREAK_ITERATION */ diff --git a/contrib/libs/icu/common/brkeng.h b/contrib/libs/icu/common/brkeng.h index 240dc8f4d3..42a3d697cf 100644 --- a/contrib/libs/icu/common/brkeng.h +++ b/contrib/libs/icu/common/brkeng.h @@ -10,6 +10,7 @@ #ifndef BRKENG_H #define BRKENG_H +#include "unicode/umisc.h" #include "unicode/utypes.h" #include "unicode/uobject.h" #include "unicode/utext.h" @@ -21,6 +22,7 @@ class UnicodeSet; class UStack; class UVector32; class DictionaryMatcher; +class ExternalBreakEngine; /******************************************************************* * LanguageBreakEngine @@ -35,7 +37,7 @@ class DictionaryMatcher; * <p>LanguageBreakEngines should normally be implemented so as to * be shared between threads without locking.</p> */ -class LanguageBreakEngine : public UMemory { +class LanguageBreakEngine : public UObject { public: /** @@ -54,10 +56,11 @@ class LanguageBreakEngine : public UMemory { * a particular kind of break.</p> * * @param c A character which begins a run that the engine might handle + * @param locale The locale. * @return true if this engine handles the particular character and break * type. */ - virtual UBool handles(UChar32 c) const = 0; + virtual UBool handles(UChar32 c, const char* locale) const = 0; /** * <p>Find any breaks within a run in the supplied text.</p> @@ -81,6 +84,35 @@ class LanguageBreakEngine : public UMemory { }; /******************************************************************* + * BreakEngineWrapper + */ + +/** + * <p>BreakEngineWrapper implement LanguageBreakEngine by + * a thin wrapper that delegate the task to ExternalBreakEngine + * </p> + */ +class BreakEngineWrapper : public LanguageBreakEngine { + public: + + BreakEngineWrapper(ExternalBreakEngine* engine, UErrorCode &status); + + virtual ~BreakEngineWrapper(); + + virtual UBool handles(UChar32 c, const char* locale) const override; + + virtual int32_t findBreaks( UText *text, + int32_t startPos, + int32_t endPos, + UVector32 &foundBreaks, + UBool isPhraseBreaking, + UErrorCode &status) const override; + + private: + LocalPointer<ExternalBreakEngine> delegate; +}; + +/******************************************************************* * LanguageBreakFactory */ @@ -125,9 +157,10 @@ class LanguageBreakFactory : public UMemory { * * @param c A character that begins a run for which a LanguageBreakEngine is * sought. + * @param locale The locale. * @return A LanguageBreakEngine with the desired characteristics, or 0. */ - virtual const LanguageBreakEngine *getEngineFor(UChar32 c) = 0; + virtual const LanguageBreakEngine *getEngineFor(UChar32 c, const char* locale) = 0; }; @@ -174,10 +207,11 @@ class UnhandledEngine : public LanguageBreakEngine { * a particular kind of break.</p> * * @param c A character which begins a run that the engine might handle + * @param locale The locale. * @return true if this engine handles the particular character and break * type. */ - virtual UBool handles(UChar32 c) const override; + virtual UBool handles(UChar32 c, const char* locale) const override; /** * <p>Find any breaks within a run in the supplied text.</p> @@ -247,9 +281,18 @@ class ICULanguageBreakFactory : public LanguageBreakFactory { * * @param c A character that begins a run for which a LanguageBreakEngine is * sought. + * @param locale The locale. * @return A LanguageBreakEngine with the desired characteristics, or 0. */ - virtual const LanguageBreakEngine *getEngineFor(UChar32 c) override; + virtual const LanguageBreakEngine *getEngineFor(UChar32 c, const char* locale) override; + + /** + * Add and adopt the engine and return an URegistryKey. + * @param engine The ExternalBreakEngine to be added and adopt. The caller + * pass the ownership and should not release the memory after this. + * @param status the error code. + */ + virtual void addExternalEngine(ExternalBreakEngine* engine, UErrorCode& status); protected: /** @@ -258,9 +301,10 @@ protected: * * @param c A character that begins a run for which a LanguageBreakEngine is * sought. + * @param locale The locale. * @return A LanguageBreakEngine with the desired characteristics, or 0. */ - virtual const LanguageBreakEngine *loadEngineFor(UChar32 c); + virtual const LanguageBreakEngine *loadEngineFor(UChar32 c, const char* locale); /** * <p>Create a DictionaryMatcher for the specified script and break type.</p> @@ -269,6 +313,9 @@ protected: * @return A DictionaryMatcher with the desired characteristics, or nullptr. */ virtual DictionaryMatcher *loadDictionaryMatcherFor(UScriptCode script); + + private: + void ensureEngines(UErrorCode& status); }; U_NAMESPACE_END diff --git a/contrib/libs/icu/common/brkiter.cpp b/contrib/libs/icu/common/brkiter.cpp index 41e4e0dff5..4f2f0f3ace 100644 --- a/contrib/libs/icu/common/brkiter.cpp +++ b/contrib/libs/icu/common/brkiter.cpp @@ -27,6 +27,7 @@ #include "unicode/rbbi.h" #include "unicode/brkiter.h" #include "unicode/udata.h" +#include "unicode/uloc.h" #include "unicode/ures.h" #include "unicode/ustring.h" #include "unicode/filteredbrk.h" @@ -121,8 +122,11 @@ BreakIterator::buildInstance(const Locale& loc, const char *type, UErrorCode &st // If there is a result, set the valid locale and actual locale, and the kind if (U_SUCCESS(status) && result != nullptr) { U_LOCALE_BASED(locBased, *(BreakIterator*)result); + locBased.setLocaleIDs(ures_getLocaleByType(b, ULOC_VALID_LOCALE, &status), actualLocale.data()); + uprv_strncpy(result->requestLocale, loc.getName(), ULOC_FULLNAME_CAPACITY); + result->requestLocale[ULOC_FULLNAME_CAPACITY-1] = 0; // always terminate } ures_close(b); @@ -202,18 +206,20 @@ BreakIterator::getAvailableLocales(int32_t& count) BreakIterator::BreakIterator() { - *validLocale = *actualLocale = 0; + *validLocale = *actualLocale = *requestLocale = 0; } BreakIterator::BreakIterator(const BreakIterator &other) : UObject(other) { uprv_strncpy(actualLocale, other.actualLocale, sizeof(actualLocale)); uprv_strncpy(validLocale, other.validLocale, sizeof(validLocale)); + uprv_strncpy(requestLocale, other.requestLocale, sizeof(requestLocale)); } BreakIterator &BreakIterator::operator =(const BreakIterator &other) { if (this != &other) { uprv_strncpy(actualLocale, other.actualLocale, sizeof(actualLocale)); uprv_strncpy(validLocale, other.validLocale, sizeof(validLocale)); + uprv_strncpy(requestLocale, other.requestLocale, sizeof(requestLocale)); } return *this; } @@ -432,17 +438,14 @@ BreakIterator::makeInstance(const Locale& loc, int32_t kind, UErrorCode& status) UTRACE_ENTRY(UTRACE_UBRK_CREATE_LINE); uprv_strcpy(lb_lw, "line"); UErrorCode kvStatus = U_ZERO_ERROR; - CharString value; - CharStringByteSink valueSink(&value); - loc.getKeywordValue("lb", valueSink, kvStatus); + auto value = loc.getKeywordValue<CharString>("lb", kvStatus); if (U_SUCCESS(kvStatus) && (value == "strict" || value == "normal" || value == "loose")) { uprv_strcat(lb_lw, "_"); uprv_strcat(lb_lw, value.data()); } // lw=phrase is only supported in Japanese and Korean if (uprv_strcmp(loc.getLanguage(), "ja") == 0 || uprv_strcmp(loc.getLanguage(), "ko") == 0) { - value.clear(); - loc.getKeywordValue("lw", valueSink, kvStatus); + value = loc.getKeywordValue<CharString>("lw", kvStatus); if (U_SUCCESS(kvStatus) && value == "phrase") { uprv_strcat(lb_lw, "_"); uprv_strcat(lb_lw, value.data()); @@ -493,12 +496,18 @@ BreakIterator::makeInstance(const Locale& loc, int32_t kind, UErrorCode& status) Locale BreakIterator::getLocale(ULocDataLocaleType type, UErrorCode& status) const { + if (type == ULOC_REQUESTED_LOCALE) { + return {requestLocale}; + } U_LOCALE_BASED(locBased, *this); return locBased.getLocale(type, status); } const char * BreakIterator::getLocaleID(ULocDataLocaleType type, UErrorCode& status) const { + if (type == ULOC_REQUESTED_LOCALE) { + return requestLocale; + } U_LOCALE_BASED(locBased, *this); return locBased.getLocaleID(type, status); } diff --git a/contrib/libs/icu/common/bytesinkutil.h b/contrib/libs/icu/common/bytesinkutil.h index 929c71fbee..b3bd487be1 100644 --- a/contrib/libs/icu/common/bytesinkutil.h +++ b/contrib/libs/icu/common/bytesinkutil.h @@ -7,18 +7,52 @@ #ifndef BYTESINKUTIL_H #define BYTESINKUTIL_H +#include <type_traits> + #include "unicode/utypes.h" #include "unicode/bytestream.h" #include "unicode/edits.h" +#include "charstr.h" #include "cmemory.h" #include "uassert.h" +#include "ustr_imp.h" U_NAMESPACE_BEGIN class ByteSink; -class CharString; class Edits; +class U_COMMON_API CharStringByteSink : public ByteSink { +public: + CharStringByteSink(CharString* dest); + ~CharStringByteSink() override; + + CharStringByteSink() = delete; + CharStringByteSink(const CharStringByteSink&) = delete; + CharStringByteSink& operator=(const CharStringByteSink&) = delete; + + void Append(const char* bytes, int32_t n) override; + + char* GetAppendBuffer(int32_t min_capacity, + int32_t desired_capacity_hint, + char* scratch, + int32_t scratch_capacity, + int32_t* result_capacity) override; + +private: + CharString& dest_; +}; + +// CharString doesn't provide the public API that StringByteSink requires a +// string class to have so this template specialization replaces the default +// implementation of StringByteSink<CharString> with CharStringByteSink. +template<> +class StringByteSink<CharString> : public CharStringByteSink { + public: + StringByteSink(CharString* dest) : CharStringByteSink(dest) { } + StringByteSink(CharString* dest, int32_t /*initialAppendCapacity*/) : CharStringByteSink(dest) { } +}; + class U_COMMON_API ByteSinkUtil { public: ByteSinkUtil() = delete; // all static @@ -57,30 +91,64 @@ public: ByteSink &sink, uint32_t options, Edits *edits, UErrorCode &errorCode); -private: - static void appendNonEmptyUnchanged(const uint8_t *s, int32_t length, - ByteSink &sink, uint32_t options, Edits *edits); -}; - -class U_COMMON_API CharStringByteSink : public ByteSink { -public: - CharStringByteSink(CharString* dest); - ~CharStringByteSink() override; - - CharStringByteSink() = delete; - CharStringByteSink(const CharStringByteSink&) = delete; - CharStringByteSink& operator=(const CharStringByteSink&) = delete; - - void Append(const char* bytes, int32_t n) override; + /** + * Calls a lambda that writes to a ByteSink with a CheckedArrayByteSink + * and then returns through u_terminateChars(), in order to implement + * the classic ICU4C C API writing to a fix sized buffer on top of a + * contemporary C++ API. + * + * @param buffer receiving buffer + * @param capacity capacity of receiving buffer + * @param lambda that gets called with the sink as an argument + * @param status set to U_BUFFER_OVERFLOW_ERROR on overflow + * @return number of bytes written, or needed (in case of overflow) + * @internal + */ + template <typename F, + typename = std::enable_if_t< + std::is_invocable_r_v<void, F, ByteSink&, UErrorCode&>>> + static int32_t viaByteSinkToTerminatedChars(char* buffer, int32_t capacity, + F&& lambda, + UErrorCode& status) { + if (U_FAILURE(status)) { return 0; } + CheckedArrayByteSink sink(buffer, capacity); + lambda(sink, status); + if (U_FAILURE(status)) { return 0; } + + int32_t reslen = sink.NumberOfBytesAppended(); + + if (sink.Overflowed()) { + status = U_BUFFER_OVERFLOW_ERROR; + return reslen; + } + + return u_terminateChars(buffer, capacity, reslen, &status); + } - char* GetAppendBuffer(int32_t min_capacity, - int32_t desired_capacity_hint, - char* scratch, - int32_t scratch_capacity, - int32_t* result_capacity) override; + /** + * Calls a lambda that writes to a ByteSink with a CharStringByteSink and + * then returns a CharString, in order to implement a contemporary C++ API + * on top of a C/C++ compatibility ByteSink API. + * + * @param lambda that gets called with the sink as an argument + * @param status to check and report + * @return the resulting string, or an empty string (in case of error) + * @internal + */ + template <typename F, + typename = std::enable_if_t< + std::is_invocable_r_v<void, F, ByteSink&, UErrorCode&>>> + static CharString viaByteSinkToCharString(F&& lambda, UErrorCode& status) { + if (U_FAILURE(status)) { return {}; } + CharString result; + CharStringByteSink sink(&result); + lambda(sink, status); + return result; + } private: - CharString& dest_; + static void appendNonEmptyUnchanged(const uint8_t *s, int32_t length, + ByteSink &sink, uint32_t options, Edits *edits); }; U_NAMESPACE_END diff --git a/contrib/libs/icu/common/caniter.cpp b/contrib/libs/icu/common/caniter.cpp index 64a3c65d29..2c987306ec 100644 --- a/contrib/libs/icu/common/caniter.cpp +++ b/contrib/libs/icu/common/caniter.cpp @@ -64,6 +64,7 @@ U_NAMESPACE_BEGIN UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CanonicalIterator) + /** *@param source string to get results for */ @@ -73,10 +74,10 @@ CanonicalIterator::CanonicalIterator(const UnicodeString &sourceStr, UErrorCode pieces_lengths(nullptr), current(nullptr), current_length(0), - nfd(*Normalizer2::getNFDInstance(status)), - nfcImpl(*Normalizer2Factory::getNFCImpl(status)) + nfd(Normalizer2::getNFDInstance(status)), + nfcImpl(Normalizer2Factory::getNFCImpl(status)) { - if(U_SUCCESS(status) && nfcImpl.ensureCanonIterData(status)) { + if(U_SUCCESS(status) && nfcImpl->ensureCanonIterData(status)) { setSource(sourceStr, status); } } @@ -172,7 +173,7 @@ void CanonicalIterator::setSource(const UnicodeString &newSource, UErrorCode &st int32_t i = 0; UnicodeString *list = nullptr; - nfd.normalize(newSource, source, status); + nfd->normalize(newSource, source, status); if(U_FAILURE(status)) { return; } @@ -194,7 +195,7 @@ void CanonicalIterator::setSource(const UnicodeString &newSource, UErrorCode &st current[0] = 0; pieces[0] = new UnicodeString[1]; pieces_lengths[0] = 1; - if (pieces[0] == 0) { + if (pieces[0] == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; goto CleanPartialInitialization; } @@ -203,7 +204,7 @@ void CanonicalIterator::setSource(const UnicodeString &newSource, UErrorCode &st list = new UnicodeString[source.length()]; - if (list == 0) { + if (list == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; goto CleanPartialInitialization; } @@ -219,7 +220,7 @@ void CanonicalIterator::setSource(const UnicodeString &newSource, UErrorCode &st // on the NFD form - see above). for (; i < source.length(); i += U16_LENGTH(cp)) { cp = source.char32At(i); - if (nfcImpl.isCanonSegmentStarter(cp)) { + if (nfcImpl->isCanonSegmentStarter(cp)) { source.extract(start, i-start, list[list_length++]); // add up to i start = i; } @@ -252,9 +253,7 @@ void CanonicalIterator::setSource(const UnicodeString &newSource, UErrorCode &st return; // Common section to cleanup all local variables and reset object variables. CleanPartialInitialization: - if (list != nullptr) { - delete[] list; - } + delete[] list; cleanPieces(); } @@ -264,10 +263,19 @@ CleanPartialInitialization: * @param source the string to find permutations for * @return the results in a set. */ -void U_EXPORT2 CanonicalIterator::permute(UnicodeString &source, UBool skipZeros, Hashtable *result, UErrorCode &status) { +void U_EXPORT2 CanonicalIterator::permute(UnicodeString &source, UBool skipZeros, Hashtable *result, UErrorCode &status, int32_t depth) { if(U_FAILURE(status)) { return; } + // To avoid infinity loop caused by permute, we limit the depth of recursive + // call to permute and return U_UNSUPPORTED_ERROR. + // We know in some unit test we need at least 4. Set to 8 just in case some + // unforseen use cases. + constexpr int32_t kPermuteDepthLimit = 8; + if (depth > kPermuteDepthLimit) { + status = U_UNSUPPORTED_ERROR; + return; + } //if (PROGRESS) printf("Permute: %s\n", UToS(Tr(source))); int32_t i = 0; @@ -277,7 +285,7 @@ void U_EXPORT2 CanonicalIterator::permute(UnicodeString &source, UBool skipZeros if (source.length() <= 2 && source.countChar32() <= 1) { UnicodeString *toPut = new UnicodeString(source); /* test for nullptr */ - if (toPut == 0) { + if (toPut == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return; } @@ -311,7 +319,7 @@ void U_EXPORT2 CanonicalIterator::permute(UnicodeString &source, UBool skipZeros // see what the permutations of the characters before and after this one are //Hashtable *subpermute = permute(source.substring(0,i) + source.substring(i + UTF16.getCharCount(cp))); - permute(subPermuteString.remove(i, U16_LENGTH(cp)), skipZeros, &subpermute, status); + permute(subPermuteString.remove(i, U16_LENGTH(cp)), skipZeros, &subpermute, status, depth+1); /* Test for buffer overflows */ if(U_FAILURE(status)) { return; @@ -346,7 +354,7 @@ UnicodeString* CanonicalIterator::getEquivalents(const UnicodeString &segment, i Hashtable permutations(status); Hashtable basic(status); if (U_FAILURE(status)) { - return 0; + return nullptr; } result.setValueDeleter(uprv_deleteUObject); permutations.setValueDeleter(uprv_deleteUObject); @@ -381,7 +389,7 @@ UnicodeString* CanonicalIterator::getEquivalents(const UnicodeString &segment, i //UnicodeString *possible = new UnicodeString(*((UnicodeString *)(ne2->value.pointer))); UnicodeString possible(*((UnicodeString *)(ne2->value.pointer))); UnicodeString attempt; - nfd.normalize(possible, attempt, status); + nfd->normalize(possible, attempt, status); // TODO: check if operator == is semanticaly the same as attempt.equals(segment) if (attempt==segment) { @@ -399,7 +407,7 @@ UnicodeString* CanonicalIterator::getEquivalents(const UnicodeString &segment, i /* Test for buffer overflows */ if(U_FAILURE(status)) { - return 0; + return nullptr; } // convert into a String[] to clean up storage //String[] finalResult = new String[result.size()]; @@ -407,7 +415,7 @@ UnicodeString* CanonicalIterator::getEquivalents(const UnicodeString &segment, i int32_t resultCount; if((resultCount = result.count()) != 0) { finalResult = new UnicodeString[resultCount]; - if (finalResult == 0) { + if (finalResult == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return nullptr; } @@ -448,7 +456,7 @@ Hashtable *CanonicalIterator::getEquivalents2(Hashtable *fillinResult, const cha for (int32_t i = 0; i < segLen; i += U16_LENGTH(cp)) { // see if any character is at the start of some decomposition U16_GET(segment, 0, i, segLen, cp); - if (!nfcImpl.getCanonStartSet(cp, starts)) { + if (!nfcImpl->getCanonStartSet(cp, starts)) { continue; } // if so, see which decompositions match @@ -471,7 +479,7 @@ Hashtable *CanonicalIterator::getEquivalents2(Hashtable *fillinResult, const cha UnicodeString item = *((UnicodeString *)(ne->value.pointer)); UnicodeString *toAdd = new UnicodeString(prefix); /* test for nullptr */ - if (toAdd == 0) { + if (toAdd == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return nullptr; } @@ -509,7 +517,7 @@ Hashtable *CanonicalIterator::extract(Hashtable *fillinResult, UChar32 comp, con UnicodeString temp(comp); int32_t inputLen=temp.length(); UnicodeString decompString; - nfd.normalize(temp, decompString, status); + nfd->normalize(temp, decompString, status); if (U_FAILURE(status)) { return nullptr; } @@ -573,7 +581,7 @@ Hashtable *CanonicalIterator::extract(Hashtable *fillinResult, UChar32 comp, con // brute force approach // check to make sure result is canonically equivalent UnicodeString trial; - nfd.normalize(temp, trial, status); + nfd->normalize(temp, trial, status); if(U_FAILURE(status) || trial.compare(segment+segmentPos, segLen - segmentPos) != 0) { return nullptr; } diff --git a/contrib/libs/icu/common/characterproperties.cpp b/contrib/libs/icu/common/characterproperties.cpp index 978e6761ce..f1e15b488d 100644 --- a/contrib/libs/icu/common/characterproperties.cpp +++ b/contrib/libs/icu/common/characterproperties.cpp @@ -169,7 +169,7 @@ void U_CALLCONV initInclusion(UPropertySource src, UErrorCode &errorCode) { case UPROPS_SRC_INPC: case UPROPS_SRC_INSC: case UPROPS_SRC_VO: - uprops_addPropertyStarts((UPropertySource)src, &sa, &errorCode); + uprops_addPropertyStarts(src, &sa, &errorCode); break; case UPROPS_SRC_EMOJI: { const icu::EmojiProps *ep = icu::EmojiProps::getSingleton(errorCode); @@ -178,6 +178,14 @@ void U_CALLCONV initInclusion(UPropertySource src, UErrorCode &errorCode) { } break; } + case UPROPS_SRC_IDSU: + // New in Unicode 15.1 for just two characters. + sa.add(sa.set, 0x2FFE); + sa.add(sa.set, 0x2FFF + 1); + break; + case UPROPS_SRC_ID_COMPAT_MATH: + uprops_addPropertyStarts(src, &sa, &errorCode); + break; default: errorCode = U_INTERNAL_PROGRAM_ERROR; break; diff --git a/contrib/libs/icu/common/charstr.h b/contrib/libs/icu/common/charstr.h index 7749a804b9..08283ca452 100644 --- a/contrib/libs/icu/common/charstr.h +++ b/contrib/libs/icu/common/charstr.h @@ -104,6 +104,13 @@ public: */ int32_t extract(char *dest, int32_t capacity, UErrorCode &errorCode) const; + bool operator==(const CharString& other) const { + return len == other.length() && (len == 0 || uprv_memcmp(data(), other.data(), len) == 0); + } + bool operator!=(const CharString& other) const { + return !operator==(other); + } + bool operator==(StringPiece other) const { return len == other.length() && (len == 0 || uprv_memcmp(data(), other.data(), len) == 0); } diff --git a/contrib/libs/icu/common/dictbe.cpp b/contrib/libs/icu/common/dictbe.cpp index 0e420c67c5..3d672c03bf 100644 --- a/contrib/libs/icu/common/dictbe.cpp +++ b/contrib/libs/icu/common/dictbe.cpp @@ -42,7 +42,7 @@ DictionaryBreakEngine::~DictionaryBreakEngine() { } UBool -DictionaryBreakEngine::handles(UChar32 c) const { +DictionaryBreakEngine::handles(UChar32 c, const char*) const { return fSet.contains(c); } @@ -54,13 +54,13 @@ DictionaryBreakEngine::findBreaks( UText *text, UBool isPhraseBreaking, UErrorCode& status) const { if (U_FAILURE(status)) return 0; - (void)startPos; // TODO: remove this param? int32_t result = 0; // Find the span of characters included in the set. // The span to break begins at the current position in the text, and // extends towards the start or end of the text, depending on 'reverse'. + utext_setNativeIndex(text, startPos); int32_t start = (int32_t)utext_getNativeIndex(text); int32_t current; int32_t rangeStart; diff --git a/contrib/libs/icu/common/dictbe.h b/contrib/libs/icu/common/dictbe.h index a2c761bdc3..e512071fa4 100644 --- a/contrib/libs/icu/common/dictbe.h +++ b/contrib/libs/icu/common/dictbe.h @@ -62,10 +62,11 @@ class DictionaryBreakEngine : public LanguageBreakEngine { * a particular kind of break.</p> * * @param c A character which begins a run that the engine might handle + * @param locale The locale. * @return true if this engine handles the particular character and break * type. */ - virtual UBool handles(UChar32 c) const override; + virtual UBool handles(UChar32 c, const char* locale) const override; /** * <p>Find any breaks within a run in the supplied text.</p> diff --git a/contrib/libs/icu/common/filteredbrk.cpp b/contrib/libs/icu/common/filteredbrk.cpp index a705b037c4..a1490b6121 100644 --- a/contrib/libs/icu/common/filteredbrk.cpp +++ b/contrib/libs/icu/common/filteredbrk.cpp @@ -147,7 +147,7 @@ public: if(umtx_atomic_dec(&refcount) <= 0) { delete this; } - return 0; + return nullptr; } virtual ~SimpleFilteredSentenceBreakData(); diff --git a/contrib/libs/icu/common/hash.h b/contrib/libs/icu/common/hash.h index bc103ee72c..c1a1c5c65a 100644 --- a/contrib/libs/icu/common/hash.h +++ b/contrib/libs/icu/common/hash.h @@ -148,12 +148,12 @@ inline void Hashtable::initSize(UHashFunction *keyHash, UKeyComparator *keyComp, } inline Hashtable::Hashtable(UKeyComparator *keyComp, UValueComparator *valueComp, - UErrorCode& status) : hash(0) { + UErrorCode& status) : hash(nullptr) { init( uhash_hashUnicodeString, keyComp, valueComp, status); } inline Hashtable::Hashtable(UBool ignoreKeyCase, UErrorCode& status) - : hash(0) + : hash(nullptr) { init(ignoreKeyCase ? uhash_hashCaselessUnicodeString : uhash_hashUnicodeString, @@ -164,7 +164,7 @@ inline Hashtable::Hashtable(UBool ignoreKeyCase, UErrorCode& status) } inline Hashtable::Hashtable(UBool ignoreKeyCase, int32_t size, UErrorCode& status) - : hash(0) + : hash(nullptr) { initSize(ignoreKeyCase ? uhash_hashCaselessUnicodeString : uhash_hashUnicodeString, @@ -175,13 +175,13 @@ inline Hashtable::Hashtable(UBool ignoreKeyCase, int32_t size, UErrorCode& statu } inline Hashtable::Hashtable(UErrorCode& status) - : hash(0) + : hash(nullptr) { init(uhash_hashUnicodeString, uhash_compareUnicodeString, nullptr, status); } inline Hashtable::Hashtable() - : hash(0) + : hash(nullptr) { UErrorCode status = U_ZERO_ERROR; init(uhash_hashUnicodeString, uhash_compareUnicodeString, nullptr, status); diff --git a/contrib/libs/icu/common/loadednormalizer2impl.cpp b/contrib/libs/icu/common/loadednormalizer2impl.cpp index 768564edc8..99b8f3e86c 100644 --- a/contrib/libs/icu/common/loadednormalizer2impl.cpp +++ b/contrib/libs/icu/common/loadednormalizer2impl.cpp @@ -143,6 +143,9 @@ static icu::UInitOnce nfkcInitOnce {}; static Norm2AllModes *nfkc_cfSingleton; static icu::UInitOnce nfkc_cfInitOnce {}; +static Norm2AllModes *nfkc_scfSingleton; +static icu::UInitOnce nfkc_scfInitOnce {}; + static UHashtable *cache=nullptr; // UInitOnce singleton initialization function @@ -156,6 +159,8 @@ static void U_CALLCONV initSingletons(const char *what, UErrorCode &errorCode) { nfkcSingleton = Norm2AllModes::createInstance(nullptr, "nfkc", errorCode); } else if (uprv_strcmp(what, "nfkc_cf") == 0) { nfkc_cfSingleton = Norm2AllModes::createInstance(nullptr, "nfkc_cf", errorCode); + } else if (uprv_strcmp(what, "nfkc_scf") == 0) { + nfkc_scfSingleton = Norm2AllModes::createInstance(nullptr, "nfkc_scf", errorCode); } else { UPRV_UNREACHABLE_EXIT; // Unknown singleton } @@ -183,6 +188,10 @@ static UBool U_CALLCONV uprv_loaded_normalizer2_cleanup() { nfkc_cfSingleton = nullptr; nfkc_cfInitOnce.reset(); + delete nfkc_scfSingleton; + nfkc_scfSingleton = nullptr; + nfkc_scfInitOnce.reset(); + uhash_close(cache); cache=nullptr; return true; @@ -213,6 +222,13 @@ Norm2AllModes::getNFKC_CFInstance(UErrorCode &errorCode) { return nfkc_cfSingleton; } +const Norm2AllModes * +Norm2AllModes::getNFKC_SCFInstance(UErrorCode &errorCode) { + if(U_FAILURE(errorCode)) { return nullptr; } + umtx_initOnce(nfkc_scfInitOnce, &initSingletons, "nfkc_scf", errorCode); + return nfkc_scfSingleton; +} + #if !NORM2_HARDCODE_NFC_DATA const Normalizer2 * Normalizer2::getNFCInstance(UErrorCode &errorCode) { @@ -262,6 +278,12 @@ Normalizer2::getNFKCCasefoldInstance(UErrorCode &errorCode) { } const Normalizer2 * +Normalizer2::getNFKCSimpleCasefoldInstance(UErrorCode &errorCode) { + const Norm2AllModes *allModes=Norm2AllModes::getNFKC_SCFInstance(errorCode); + return allModes!=nullptr ? &allModes->comp : nullptr; +} + +const Normalizer2 * Normalizer2::getInstance(const char *packageName, const char *name, UNormalization2Mode mode, @@ -281,6 +303,8 @@ Normalizer2::getInstance(const char *packageName, allModes=Norm2AllModes::getNFKCInstance(errorCode); } else if(0==uprv_strcmp(name, "nfkc_cf")) { allModes=Norm2AllModes::getNFKC_CFInstance(errorCode); + } else if(0==uprv_strcmp(name, "nfkc_scf")) { + allModes=Norm2AllModes::getNFKC_SCFInstance(errorCode); } } if(allModes==nullptr && U_SUCCESS(errorCode)) { @@ -394,6 +418,11 @@ unorm2_getNFKCCasefoldInstance(UErrorCode *pErrorCode) { } U_CAPI const UNormalizer2 * U_EXPORT2 +unorm2_getNFKCSimpleCasefoldInstance(UErrorCode *pErrorCode) { + return (const UNormalizer2 *)Normalizer2::getNFKCSimpleCasefoldInstance(*pErrorCode); +} + +U_CAPI const UNormalizer2 * U_EXPORT2 unorm2_getInstance(const char *packageName, const char *name, UNormalization2Mode mode, diff --git a/contrib/libs/icu/common/localebuilder.cpp b/contrib/libs/icu/common/localebuilder.cpp index c1e1f2ad68..e53065a8a6 100644 --- a/contrib/libs/icu/common/localebuilder.cpp +++ b/contrib/libs/icu/common/localebuilder.cpp @@ -3,21 +3,21 @@ #include <utility> -#include "bytesinkutil.h" // CharStringByteSink +#include "bytesinkutil.h" // StringByteSink<CharString> #include "charstr.h" #include "cstring.h" #include "ulocimp.h" #include "unicode/localebuilder.h" #include "unicode/locid.h" -U_NAMESPACE_BEGIN +namespace { -#define UPRV_ISDIGIT(c) (((c) >= '0') && ((c) <= '9')) -#define UPRV_ISALPHANUM(c) (uprv_isASCIILetter(c) || UPRV_ISDIGIT(c) ) +inline bool UPRV_ISDIGIT(char c) { return c >= '0' && c <= '9'; } +inline bool UPRV_ISALPHANUM(char c) { return uprv_isASCIILetter(c) || UPRV_ISDIGIT(c); } constexpr const char* kAttributeKey = "attribute"; -static bool _isExtensionSubtags(char key, const char* s, int32_t len) { +bool _isExtensionSubtags(char key, const char* s, int32_t len) { switch (uprv_tolower(key)) { case 'u': return ultag_isUnicodeExtensionSubtags(s, len); @@ -30,6 +30,10 @@ static bool _isExtensionSubtags(char key, const char* s, int32_t len) { } } +} // namespace + +U_NAMESPACE_BEGIN + LocaleBuilder::LocaleBuilder() : UObject(), status_(U_ZERO_ERROR), language_(), script_(), region_(), variant_(nullptr), extensions_(nullptr) { @@ -68,8 +72,10 @@ LocaleBuilder& LocaleBuilder::setLanguageTag(StringPiece tag) return *this; } -static void setField(StringPiece input, char* dest, UErrorCode& errorCode, - UBool (*test)(const char*, int32_t)) { +namespace { + +void setField(StringPiece input, char* dest, UErrorCode& errorCode, + bool (*test)(const char*, int32_t)) { if (U_FAILURE(errorCode)) { return; } if (input.empty()) { dest[0] = '\0'; @@ -81,6 +87,8 @@ static void setField(StringPiece input, char* dest, UErrorCode& errorCode, } } +} // namespace + LocaleBuilder& LocaleBuilder::setLanguage(StringPiece language) { setField(language, language_, status_, &ultag_isLanguageSubtag); @@ -99,7 +107,9 @@ LocaleBuilder& LocaleBuilder::setRegion(StringPiece region) return *this; } -static void transform(char* data, int32_t len) { +namespace { + +void transform(char* data, int32_t len) { for (int32_t i = 0; i < len; i++, data++) { if (*data == '_') { *data = '-'; @@ -109,6 +119,8 @@ static void transform(char* data, int32_t len) { } } +} // namespace + LocaleBuilder& LocaleBuilder::setVariant(StringPiece variant) { if (U_FAILURE(status_)) { return *this; } @@ -134,7 +146,9 @@ LocaleBuilder& LocaleBuilder::setVariant(StringPiece variant) return *this; } -static bool +namespace { + +bool _isKeywordValue(const char* key, const char* value, int32_t value_len) { if (key[1] == '\0') { @@ -156,7 +170,7 @@ _isKeywordValue(const char* key, const char* value, int32_t value_len) ultag_isUnicodeLocaleType(unicode_locale_type, -1); } -static void +void _copyExtensions(const Locale& from, icu::StringEnumeration *keywords, Locale& to, bool validate, UErrorCode& errorCode) { @@ -169,9 +183,7 @@ _copyExtensions(const Locale& from, icu::StringEnumeration *keywords, } const char* key; while ((key = keywords->next(nullptr, errorCode)) != nullptr) { - CharString value; - CharStringByteSink sink(&value); - from.getKeywordValue(key, sink, errorCode); + auto value = from.getKeywordValue<CharString>(key, errorCode); if (U_FAILURE(errorCode)) { return; } if (uprv_strcmp(key, kAttributeKey) == 0) { transform(value.data(), value.length()); @@ -186,9 +198,10 @@ _copyExtensions(const Locale& from, icu::StringEnumeration *keywords, } } -void static +void _clearUAttributesAndKeyType(Locale& locale, UErrorCode& errorCode) { + if (U_FAILURE(errorCode)) { return; } // Clear Unicode attributes locale.setKeywordValue(kAttributeKey, "", errorCode); @@ -201,9 +214,10 @@ _clearUAttributesAndKeyType(Locale& locale, UErrorCode& errorCode) } } -static void +void _setUnicodeExtensions(Locale& locale, const CharString& value, UErrorCode& errorCode) { + if (U_FAILURE(errorCode)) { return; } // Add the unicode extensions to extensions_ CharString locale_str("und-u-", errorCode); locale_str.append(value, errorCode); @@ -212,6 +226,8 @@ _setUnicodeExtensions(Locale& locale, const CharString& value, UErrorCode& error locale, false, errorCode); } +} // namespace + LocaleBuilder& LocaleBuilder::setExtension(char key, StringPiece value) { if (U_FAILURE(status_)) { return *this; } @@ -289,10 +305,8 @@ LocaleBuilder& LocaleBuilder::addUnicodeLocaleAttribute( return *this; } - CharString attributes; - CharStringByteSink sink(&attributes); UErrorCode localErrorCode = U_ZERO_ERROR; - extensions_->getKeywordValue(kAttributeKey, sink, localErrorCode); + auto attributes = extensions_->getKeywordValue<CharString>(kAttributeKey, localErrorCode); if (U_FAILURE(localErrorCode)) { CharString new_attributes(value_str.data(), status_); // No attributes, set the attribute. @@ -344,9 +358,7 @@ LocaleBuilder& LocaleBuilder::removeUnicodeLocaleAttribute( } if (extensions_ == nullptr) { return *this; } UErrorCode localErrorCode = U_ZERO_ERROR; - CharString attributes; - CharStringByteSink sink(&attributes); - extensions_->getKeywordValue(kAttributeKey, sink, localErrorCode); + auto attributes = extensions_->getKeywordValue<CharString>(kAttributeKey, localErrorCode); // get failure, just return if (U_FAILURE(localErrorCode)) { return *this; } // Do not have any attributes, just return. diff --git a/contrib/libs/icu/common/localefallback_data.h b/contrib/libs/icu/common/localefallback_data.h index d2eb7eaafd..7441ee307a 100644 --- a/contrib/libs/icu/common/localefallback_data.h +++ b/contrib/libs/icu/common/localefallback_data.h @@ -18,94 +18,93 @@ const char scriptCodeChars[] = "Kana\0Kawi\0Khar\0Khmr\0Kits\0Knda\0Kore\0Lana\0Laoo\0Lepc\0Lina\0" "Linb\0Lisu\0Lyci\0Lydi\0Mand\0Mani\0Marc\0Medf\0Merc\0Mlym\0Modi\0" "Mong\0Mroo\0Mtei\0Mymr\0Narb\0Newa\0Nkoo\0Nshu\0Ogam\0Olck\0Orkh\0" - "Orya\0Osge\0Ougr\0Pauc\0Phli\0Phnx\0Plrd\0Prti\0Rjng\0Rohg\0Runr\0" - "Samr\0Sarb\0Saur\0Sgnw\0Sinh\0Sogd\0Sora\0Soyo\0Syrc\0Tagb\0Takr\0" - "Tale\0Talu\0Taml\0Tang\0Tavt\0Telu\0Tfng\0Thaa\0Thai\0Tibt\0Tnsa\0" - "Toto\0Ugar\0Vaii\0Wcho\0Xpeo\0Xsux\0Yiii\0"; + "Orya\0Osge\0Pauc\0Phli\0Phnx\0Plrd\0Prti\0Rjng\0Rohg\0Runr\0Samr\0" + "Sarb\0Saur\0Sgnw\0Sinh\0Sogd\0Sora\0Soyo\0Syrc\0Tagb\0Takr\0Tale\0" + "Talu\0Taml\0Tang\0Tavt\0Telu\0Tfng\0Thaa\0Thai\0Tibt\0Tnsa\0Toto\0" + "Ugar\0Vaii\0Wcho\0Xpeo\0Xsux\0Yiii\0"; const char dsLocaleIDChars[] = - "aaf\0aao\0aat\0ab\0abh\0abl\0abq\0abv\0acm\0acq\0acw\0acx\0adf\0" - "adp\0adx\0ady\0ae\0aeb\0aec\0aee\0aeq\0afb\0agi\0agj\0agx\0ahg\0" - "aho\0ahr\0aib\0aij\0ain\0aio\0aiq\0ajp\0ajt\0akk\0akv\0alk\0all\0" - "alr\0alt\0alw\0am\0ams\0amw\0ani\0anp\0anr\0anu\0aot\0apc\0apd\0" - "aph\0aqc\0ar\0arc\0arq\0ars\0ary\0arz\0as\0ase\0ask\0atn\0atv\0" - "auj\0auz\0av\0avd\0avl\0awa\0awn\0axm\0ayh\0ayl\0ayn\0ayp\0az_IQ\0" - "az_IR\0az_RU\0azb\0ba\0bal\0bap\0bax\0bbl\0bcq\0bdv\0bdz\0be\0" - "bee\0bej\0bfb\0bfq\0bft\0bfu\0bfw\0bfy\0bfz\0bg\0bgc\0bgd\0bgn\0" - "bgp\0bgq\0bgw\0bgx\0bha\0bhb\0bhd\0bhe\0bhh\0bhi\0bhj\0bhm\0bhn\0" - "bho\0bht\0bhu\0biy\0bjf\0bji\0bjj\0bjm\0blk\0blt\0bmj\0bn\0bns\0" - "bo\0bph\0bpx\0bpy\0bqi\0bra\0brb\0brd\0brh\0brk\0brv\0brx\0bsh\0" - "bsk\0bsq\0bst\0btd\0btm\0btv\0bua\0bwe\0bxm\0bxu\0byh\0byn\0byw\0" - "bzi\0cbn\0ccp\0cde\0cdh\0cdi\0cdj\0cdm\0cdo\0cdz\0ce\0cgk\0chg\0" - "chm\0chr\0chx\0cih\0cja\0cji\0cjm\0cjy\0ckb\0ckt\0clh\0clw\0cmg\0" - "cna\0cnp\0cog\0cop\0cpg\0cr\0crh\0crj\0crk\0crl\0crm\0csh\0csp\0" - "csw\0ctd\0ctg\0ctn\0ctt\0cu\0cuu\0cv\0czh\0czk\0daq\0dar\0dcc\0" - "ddo\0def\0deh\0der\0dgl\0dhi\0dhn\0dho\0dhw\0dka\0dlg\0dmf\0dmk\0" - "dml\0dng\0dnu\0dnv\0doi\0dox\0dre\0drh\0drq\0drs\0dry\0dso\0dty\0" - "dub\0duh\0dus\0dv\0dwk\0dwz\0dz\0dzl\0ecr\0ecy\0egy\0eky\0el\0" - "emg\0emu\0enf\0enh\0era\0esg\0esh\0ett\0eve\0evn\0fa\0fay\0faz\0" - "fia\0fmu\0fub\0gan\0gaq\0gas\0gau\0gbj\0gbk\0gbl\0gbm\0gbz\0gdb\0" - "gdo\0gdx\0gez\0ggg\0ggn\0gha\0ghe\0ghr\0ght\0gig\0gin\0gjk\0gju\0" - "gld\0glh\0glk\0gmv\0gmy\0goe\0gof\0gok\0gom\0gon\0got\0gra\0grc\0" - "grt\0gru\0gu\0gvr\0gwc\0gwf\0gwt\0gyo\0gzi\0ha_CM\0ha_SD\0hac\0" - "hak\0har\0haz\0hbo\0hdy\0he\0hi\0hii\0hit\0hkh\0hlb\0hlu\0hmd\0" - "hmj\0hmq\0hnd\0hne\0hnj\0hnj_AU\0hnj_CN\0hnj_FR\0hnj_GF\0hnj_LA\0" - "hnj_MM\0hnj_SR\0hnj_TH\0hnj_US\0hnj_VN\0hno\0hoc\0hoh\0hoj\0how\0" - "hoy\0hpo\0hrt\0hrz\0hsn\0hss\0htx\0hut\0huy\0huz\0hy\0hyw\0ii\0" - "imy\0inh\0int\0ior\0iru\0isk\0itk\0itl\0iu\0iw\0ja\0jad\0jat\0" - "jbe\0jbn\0jct\0jda\0jdg\0jdt\0jee\0jge\0ji\0jje\0jkm\0jml\0jna\0" - "jnd\0jnl\0jns\0jog\0jpa\0jpr\0jul\0jun\0juy\0jya\0jye\0ka\0kaa\0" - "kap\0kaw\0kbd\0kbu\0kby\0kca\0kdq\0kdt\0ket\0kex\0key\0kfa\0kfb\0" - "kfc\0kfd\0kfe\0kfh\0kfi\0kfk\0kfm\0kfp\0kfq\0kfr\0kfs\0kfx\0kfy\0" - "kgj\0kgy\0khb\0khf\0khg\0khn\0kht\0khv\0khw\0kif\0kim\0kip\0kjg\0" - "kjh\0kjl\0kjo\0kjp\0kjt\0kk\0kk_AF\0kk_CN\0kk_IR\0kk_MN\0kkf\0" - "kkh\0kkt\0kle\0klj\0klr\0km\0kmj\0kmz\0kn\0ko\0koi\0kok\0kpt\0" - "kpy\0kqd\0kqy\0kra\0krc\0krk\0krr\0kru\0krv\0ks\0ksu\0ksw\0ksz\0" - "ktb\0ktl\0ktp\0ku_LB\0kuf\0kum\0kv\0kva\0kvq\0kvt\0kvx\0kvy\0" - "kxc\0kxf\0kxk\0kxl\0kxm\0kxp\0kxv\0ky\0ky_CN\0kyu\0kyv\0kyw\0" - "kzh\0lab\0lad\0lae\0lah\0lbc\0lbe\0lbf\0lbj\0lbm\0lbo\0lbr\0lcp\0" - "lep\0lez\0lhm\0lhs\0lif\0lis\0lkh\0lki\0lmh\0lmn\0lo\0loy\0lpo\0" - "lrc\0lrk\0lrl\0lsa\0lsd\0lss\0luk\0luu\0luv\0luz\0lwl\0lwm\0lya\0" - "lzh\0mag\0mai\0man_GN\0mby\0mde\0mdf\0mdx\0mdy\0mfa\0mfi\0mgp\0" - "mhj\0mid\0mjl\0mjq\0mjr\0mjt\0mju\0mjv\0mjz\0mk\0mkb\0mke\0mki\0" - "mkm\0ml\0mlf\0mn\0mn_CN\0mni\0mnj\0mns\0mnw\0mpz\0mr\0mra\0mrd\0" - "mrj\0mro\0mrr\0ms_CC\0mtm\0mtr\0mud\0muk\0mut\0muv\0muz\0mvf\0" - "mvy\0mvz\0mwr\0mwt\0mww\0my\0mym\0myv\0myz\0mzn\0nan\0nao\0ncd\0" - "ncq\0ndf\0ne\0neg\0neh\0nei\0new\0ngt\0nio\0nit\0niv\0nli\0nlm\0" - "nlx\0nmm\0nnp\0nod\0noe\0nog\0noi\0non\0nos\0npb\0nqo\0nsd\0nsf\0" - "nsk\0nst\0nsv\0nty\0ntz\0nwc\0nwx\0nyl\0nyq\0oaa\0oac\0oar\0oav\0" - "obm\0obr\0odk\0oht\0oj\0ojs\0okm\0oko\0okz\0ola\0ole\0omk\0omp\0" - "omr\0oon\0or\0ort\0oru\0orv\0os\0osa\0osc\0osi\0ota\0otb\0otk\0" - "oty\0oui\0pa\0pa_PK\0pal\0paq\0pbt\0pcb\0pce\0pcf\0pcg\0pch\0" - "pci\0pcj\0peg\0peo\0pgd\0pgg\0pgl\0pgn\0phd\0phk\0phl\0phn\0pho\0" - "phr\0pht\0phv\0phw\0pi\0pka\0pkr\0plk\0pll\0pmh\0pnt\0ppa\0pra\0" - "prc\0prd\0prp\0prt\0prx\0ps\0psh\0psi\0pst\0pum\0pwo\0pwr\0pww\0" - "pyx\0qxq\0raa\0rab\0raf\0rah\0raj\0rav\0rbb\0rdb\0rei\0rhg\0rji\0" - "rjs\0rka\0rki\0rkt\0rmi\0rmt\0rmz\0rsk\0rtw\0ru\0rue\0rut\0rwr\0" - "ryu\0sa\0sah\0sam\0sat\0saz\0sbn\0sbu\0sck\0scl\0scp\0sct\0scu\0" - "scx\0sd\0sd_IN\0sdb\0sdf\0sdg\0sdh\0sds\0sel\0sfm\0sga\0sgh\0" - "sgj\0sgr\0sgt\0sgw\0sgy\0shd\0shi\0shm\0shn\0shu\0shv\0si\0sia\0" - "sip\0siy\0siz\0sjd\0sjp\0sjt\0skb\0skj\0skr\0slq\0smh\0smp\0smu\0" - "smy\0soa\0sog\0soi\0sou\0spt\0spv\0sqo\0sqq\0sqt\0sr\0srb\0srh\0" - "srx\0srz\0ssh\0sss\0sts\0stv\0sty\0suz\0sva\0swb\0swi\0swv\0syc\0" - "syl\0syn\0syr\0syw\0ta\0tab\0taj\0tbk\0tcn\0tco\0tcx\0tcy\0tda\0" - "tdb\0tdd\0tdg\0tdh\0te\0tes\0tg\0tg_PK\0tge\0tgf\0th\0the\0thf\0" - "thi\0thl\0thm\0thq\0thr\0ths\0ti\0tig\0tij\0tin\0tjl\0tjo\0tkb\0" - "tks\0tkt\0tmk\0tmr\0tnv\0tov\0tpu\0tra\0trg\0trm\0trw\0tsd\0tsf\0" + "aaf\0aao\0aat\0ab\0abh\0abl\0abv\0acm\0acq\0acw\0acx\0adf\0adx\0" + "ady\0ae\0aeb\0aec\0aee\0aeq\0afb\0agi\0agj\0agx\0ahg\0aho\0ahr\0" + "aib\0aij\0ain\0aio\0aiq\0akk\0akv\0alk\0all\0alr\0alt\0alw\0am\0" + "ams\0amw\0ani\0anp\0anr\0anu\0aot\0apc\0apd\0aph\0aqc\0ar\0arc\0" + "arq\0ars\0ary\0arz\0as\0ase\0ask\0atn\0atv\0auj\0auz\0av\0avd\0" + "avl\0awa\0awn\0axm\0ayh\0ayl\0ayn\0ayp\0az_IQ\0az_IR\0az_RU\0" + "azb\0ba\0bal\0bap\0bax\0bbl\0bcq\0bdv\0bdz\0be\0bee\0bej\0bfb\0" + "bfq\0bft\0bfu\0bfw\0bfy\0bfz\0bg\0bgc\0bgd\0bgn\0bgp\0bgq\0bgw\0" + "bgx\0bha\0bhb\0bhd\0bhe\0bhh\0bhi\0bhj\0bhm\0bhn\0bho\0bht\0bhu\0" + "biy\0bjf\0bjj\0bjm\0blk\0blt\0bmj\0bn\0bns\0bo\0bph\0bpx\0bpy\0" + "bqi\0bra\0brb\0brd\0brh\0brk\0brv\0brx\0bsh\0bsk\0bsq\0bst\0btd\0" + "btm\0btv\0bua\0bwe\0bxm\0bxu\0byh\0byn\0byw\0bzi\0cbn\0ccp\0cde\0" + "cdh\0cdi\0cdj\0cdm\0cdo\0cdz\0ce\0cgk\0chg\0chm\0chr\0chx\0cih\0" + "cja\0cji\0cjm\0cjy\0ckb\0ckt\0clh\0clw\0cmg\0cna\0cnp\0cog\0cop\0" + "cpg\0cr\0crh\0crj\0crk\0crl\0crm\0csh\0csp\0csw\0ctd\0ctg\0ctn\0" + "ctt\0cu\0cuu\0cv\0czh\0czk\0daq\0dar\0dcc\0ddo\0def\0deh\0der\0" + "dhi\0dhn\0dho\0dhw\0dka\0dlg\0dmf\0dmk\0dml\0dng\0dnu\0dnv\0doi\0" + "dox\0dre\0drq\0drs\0dry\0dso\0dty\0dub\0duh\0dus\0dv\0dwk\0dwz\0" + "dz\0dzl\0ecr\0ecy\0egy\0eky\0el\0emg\0emu\0enf\0enh\0era\0esg\0" + "esh\0ett\0eve\0evn\0fa\0fay\0faz\0fia\0fmu\0fub\0gan\0gaq\0gas\0" + "gau\0gbj\0gbk\0gbl\0gbm\0gbz\0gdb\0gdo\0gdx\0gez\0ggg\0gha\0ghe\0" + "ghr\0ght\0gig\0gin\0gjk\0gju\0gld\0glh\0glk\0gmv\0gmy\0goe\0gof\0" + "gok\0gom\0gon\0got\0gra\0grc\0grt\0gru\0gu\0gvr\0gwc\0gwf\0gwt\0" + "gyo\0gzi\0ha_CM\0ha_SD\0hac\0hak\0har\0haz\0hbo\0hdy\0he\0hi\0" + "hii\0hit\0hkh\0hlb\0hlu\0hmd\0hmj\0hmq\0hnd\0hne\0hnj\0hnj_AU\0" + "hnj_CN\0hnj_FR\0hnj_GF\0hnj_LA\0hnj_MM\0hnj_SR\0hnj_TH\0hnj_VN\0" + "hno\0hoc\0hoh\0hoj\0how\0hoy\0hpo\0hrt\0hrz\0hsn\0hss\0htx\0hut\0" + "huy\0huz\0hy\0hyw\0ii\0imy\0inh\0int\0ior\0iru\0isk\0itk\0itl\0" + "iu\0iw\0ja\0jad\0jat\0jbe\0jbn\0jct\0jda\0jdg\0jdt\0jee\0jge\0" + "ji\0jje\0jkm\0jml\0jna\0jnd\0jnl\0jns\0jog\0jpa\0jpr\0jrb\0jrb_MA\0" + "jul\0jun\0juy\0jya\0jye\0ka\0kaa\0kap\0kaw\0kbd\0kbu\0kby\0kca\0" + "kdq\0kdt\0ket\0kex\0key\0kfa\0kfb\0kfc\0kfd\0kfe\0kfh\0kfi\0kfk\0" + "kfm\0kfp\0kfq\0kfr\0kfs\0kfx\0kfy\0kgj\0kgy\0khb\0khf\0khg\0khn\0" + "kht\0khv\0khw\0kif\0kim\0kip\0kjg\0kjh\0kjl\0kjo\0kjp\0kjt\0kk\0" + "kk_AF\0kk_CN\0kk_IR\0kk_MN\0kkf\0kkh\0kkt\0kle\0klj\0klr\0km\0" + "kmj\0kmz\0kn\0ko\0koi\0kok\0kpt\0kpy\0kqd\0kqy\0kra\0krc\0krk\0" + "krr\0kru\0krv\0ks\0ksu\0ksw\0ksz\0ktb\0ktl\0ktp\0ku_LB\0kuf\0" + "kum\0kv\0kva\0kvq\0kvt\0kvx\0kvy\0kxf\0kxk\0kxm\0kxp\0ky\0ky_CN\0" + "kyu\0kyv\0kyw\0lab\0lad\0lae\0lah\0lbc\0lbe\0lbf\0lbj\0lbm\0lbo\0" + "lbr\0lcp\0lep\0lez\0lhm\0lhs\0lif\0lis\0lkh\0lki\0lmh\0lmn\0lo\0" + "loy\0lpo\0lrc\0lrk\0lrl\0lsa\0lsd\0lss\0luk\0luu\0luv\0luz\0lwl\0" + "lwm\0lya\0lzh\0mag\0mai\0man_GN\0mby\0mde\0mdf\0mdx\0mdy\0mfa\0" + "mfi\0mgp\0mhj\0mid\0mjl\0mjq\0mjr\0mjt\0mju\0mjv\0mjz\0mk\0mkb\0" + "mke\0mki\0mkm\0ml\0mlf\0mn\0mn_CN\0mni\0mnj\0mns\0mnw\0mpz\0mr\0" + "mra\0mrd\0mrj\0mro\0mrr\0ms_CC\0mtm\0mtr\0mud\0muk\0mut\0muv\0" + "muz\0mvf\0mvy\0mvz\0mwr\0mwt\0mww\0my\0mym\0myv\0myz\0mzn\0nan\0" + "nao\0ncd\0ncq\0ndf\0ne\0neg\0neh\0nei\0new\0ngt\0nio\0nit\0niv\0" + "nli\0nlm\0nlx\0nmm\0nnp\0nod\0noe\0nog\0noi\0non\0nos\0npb\0nqo\0" + "nsd\0nsf\0nsk\0nst\0nsv\0nty\0ntz\0nwc\0nwx\0nyl\0nyq\0oaa\0oac\0" + "oar\0oav\0obm\0obr\0odk\0oht\0oj\0ojs\0okm\0oko\0okz\0ola\0ole\0" + "omk\0omp\0omr\0oon\0or\0ort\0oru\0orv\0os\0osa\0osc\0osi\0ota\0" + "otb\0otk\0oty\0pa\0pa_PK\0pal\0paq\0pbt\0pcb\0pce\0pcf\0pcg\0" + "pch\0pci\0pcj\0peg\0peo\0pgd\0pgg\0pgl\0pgn\0phd\0phk\0phl\0phn\0" + "pho\0phr\0pht\0phv\0phw\0pi\0pka\0pkr\0plk\0pll\0pmh\0pnt\0pra\0" + "prc\0prd\0prt\0prx\0ps\0psh\0psi\0pst\0pum\0pwo\0pwr\0pww\0pyx\0" + "qxq\0raa\0rab\0raf\0rah\0raj\0rav\0rbb\0rdb\0rei\0rhg\0rji\0rjs\0" + "rka\0rki\0rkt\0rmi\0rmt\0rmz\0rom_BG\0rsk\0rtw\0ru\0rue\0rut\0" + "rwr\0ryu\0sa\0sah\0sam\0sat\0saz\0sbn\0sbu\0sck\0scl\0scl_IN\0" + "scp\0sct\0scu\0scx\0sd\0sd_IN\0sdb\0sdf\0sdg\0sdh\0sds\0sel\0" + "sfm\0sga\0sgh\0sgj\0sgr\0sgt\0sgw\0sgy\0shd\0shi\0shm\0shn\0shu\0" + "shv\0si\0sia\0sip\0siy\0siz\0sjd\0sjp\0sjt\0skb\0skj\0skr\0smh\0" + "smp\0smu\0smy\0soa\0sog\0soi\0sou\0spt\0spv\0sqo\0sqq\0sqt\0sr\0" + "srb\0srh\0srx\0srz\0ssh\0sss\0sts\0stv\0sty\0suz\0sva\0swb\0swi\0" + "swv\0syc\0syl\0syn\0syr\0syw\0ta\0tab\0taj\0tbk\0tcn\0tco\0tcx\0" + "tcy\0tda\0tdb\0tdd\0tdg\0tdh\0te\0tes\0tg\0tg_PK\0tge\0tgf\0th\0" + "the\0thf\0thi\0thl\0thm\0thq\0thr\0ths\0ti\0tig\0tij\0tin\0tjl\0" + "tjo\0tkb\0tks\0tkt\0tmr\0tnv\0tov\0tpu\0tra\0trg\0trm\0trw\0tsd\0" "tsj\0tt\0tth\0tto\0tts\0tvn\0twm\0txg\0txo\0tyr\0tyv\0ude\0udg\0" "udi\0udm\0ug\0ug_KZ\0ug_MN\0uga\0ugh\0ugo\0uk\0uki\0ulc\0unr\0" "unr_NP\0unx\0ur\0urk\0ush\0uum\0uz_AF\0uz_CN\0uzs\0vaa\0vaf\0" "vah\0vai\0vas\0vav\0vay\0vgr\0vmd\0vmh\0wal\0wbk\0wbq\0wbr\0wlo\0" "wme\0wne\0wni\0wsg\0wsv\0wtm\0wuu\0xal\0xan\0xas\0xco\0xcr\0xdq\0" "xhe\0xhm\0xis\0xka\0xkc\0xkj\0xkp\0xlc\0xld\0xly\0xmf\0xmn\0xmr\0" - "xna\0xnr\0xpg\0xpi\0xpm\0xpr\0xrm\0xrn\0xsa\0xsr\0xss\0xub\0xuj\0" - "xve\0xvi\0xwo\0xzh\0yai\0ybh\0ybi\0ydg\0yea\0yej\0yeu\0ygp\0yhd\0" - "yi\0yig\0yih\0yiv\0ykg\0yna\0ynk\0yoi\0yoy\0yrk\0ysd\0ysn\0ysp\0" - "ysr\0ysy\0yud\0yue\0yue_CN\0yug\0yux\0ywq\0ywu\0zau\0zba\0zch\0" - "zdj\0zeh\0zen\0zgb\0zgh\0zgm\0zgn\0zh\0zh_AU\0zh_BN\0zh_GB\0zh_GF\0" + "xna\0xnr\0xpg\0xpi\0xpm\0xpr\0xrm\0xrn\0xsa\0xsr\0xub\0xuj\0xve\0" + "xvi\0xwo\0xzh\0yai\0ybh\0ybi\0ydg\0yea\0yej\0yeu\0ygp\0yhd\0yi\0" + "yig\0yih\0yiv\0ykg\0yna\0ynk\0yoi\0yoy\0yrk\0ysd\0ysn\0ysp\0ysr\0" + "ysy\0yud\0yue\0yue_CN\0yug\0yux\0ywq\0ywu\0zau\0zba\0zch\0zdj\0" + "zeh\0zen\0zgb\0zgh\0zgm\0zgn\0zh\0zh_AU\0zh_BN\0zh_GB\0zh_GF\0" "zh_HK\0zh_ID\0zh_MO\0zh_PA\0zh_PF\0zh_PH\0zh_SR\0zh_TH\0zh_TW\0" - "zh_US\0zh_VN\0zhd\0zhx\0zkb\0zko\0zkt\0zkz\0zlj\0zln\0zlq\0zqe\0" - "zrp\0zum\0zyg\0zyn\0zzj\0"; + "zh_US\0zh_VN\0zhd\0zhx\0zko\0zkt\0zkz\0zlj\0zln\0zlq\0zqe\0zrp\0" + "zum\0zyg\0zyn\0zzj\0"; const int32_t defaultScriptTable[] = { 0, 320, // aaf -> Mlym @@ -113,1033 +112,1016 @@ const int32_t defaultScriptTable[] = { 8, 150, // aat -> Grek 12, 100, // ab -> Cyrl 15, 10, // abh -> Arab - 19, 425, // abl -> Rjng - 23, 100, // abq -> Cyrl - 27, 10, // abv -> Arab - 31, 10, // acm -> Arab - 35, 10, // acq -> Arab - 39, 10, // acw -> Arab - 43, 10, // acx -> Arab - 47, 10, // adf -> Arab - 51, 540, // adp -> Tibt - 55, 540, // adx -> Tibt - 59, 100, // ady -> Cyrl - 63, 25, // ae -> Avst - 66, 10, // aeb -> Arab - 70, 10, // aec -> Arab - 74, 10, // aee -> Arab - 78, 10, // aeq -> Arab - 82, 10, // afb -> Arab - 86, 105, // agi -> Deva - 90, 120, // agj -> Ethi - 94, 100, // agx -> Cyrl - 98, 120, // ahg -> Ethi - 102, 5, // aho -> Ahom - 106, 105, // ahr -> Deva - 110, 10, // aib -> Arab - 114, 185, // aij -> Hebr - 118, 220, // ain -> Kana - 122, 345, // aio -> Mymr - 126, 10, // aiq -> Arab - 130, 10, // ajp -> Arab - 134, 10, // ajt -> Arab - 138, 575, // akk -> Xsux - 142, 100, // akv -> Cyrl - 146, 260, // alk -> Laoo - 150, 320, // all -> Mlym - 154, 100, // alr -> Cyrl - 158, 100, // alt -> Cyrl - 162, 120, // alw -> Ethi - 166, 120, // am -> Ethi - 169, 210, // ams -> Jpan - 173, 480, // amw -> Syrc - 177, 100, // ani -> Cyrl - 181, 105, // anp -> Deva - 185, 105, // anr -> Deva - 189, 120, // anu -> Ethi - 193, 45, // aot -> Beng - 197, 10, // apc -> Arab - 201, 10, // apd -> Arab - 205, 105, // aph -> Deva - 209, 100, // aqc -> Cyrl - 213, 10, // ar -> Arab - 216, 15, // arc -> Armi - 220, 10, // arq -> Arab - 224, 10, // ars -> Arab - 228, 10, // ary -> Arab - 232, 10, // arz -> Arab - 236, 45, // as -> Beng - 239, 455, // ase -> Sgnw - 243, 10, // ask -> Arab - 247, 10, // atn -> Arab - 251, 100, // atv -> Cyrl - 255, 10, // auj -> Arab - 259, 10, // auz -> Arab - 263, 100, // av -> Cyrl - 266, 10, // avd -> Arab - 270, 10, // avl -> Arab - 274, 105, // awa -> Deva - 278, 120, // awn -> Ethi - 282, 20, // axm -> Armn - 286, 10, // ayh -> Arab - 290, 10, // ayl -> Arab - 294, 10, // ayn -> Arab - 298, 10, // ayp -> Arab - 302, 10, // az_IQ -> Arab - 308, 10, // az_IR -> Arab - 314, 100, // az_RU -> Cyrl - 320, 10, // azb -> Arab - 324, 100, // ba -> Cyrl - 327, 10, // bal -> Arab - 331, 105, // bap -> Deva - 335, 30, // bax -> Bamu - 339, 125, // bbl -> Geor - 343, 120, // bcq -> Ethi - 347, 385, // bdv -> Orya - 351, 10, // bdz -> Arab - 355, 100, // be -> Cyrl - 358, 105, // bee -> Deva - 362, 10, // bej -> Arab - 366, 105, // bfb -> Deva - 370, 505, // bfq -> Taml - 374, 10, // bft -> Arab - 378, 540, // bfu -> Tibt - 382, 385, // bfw -> Orya - 386, 105, // bfy -> Deva - 390, 105, // bfz -> Deva - 394, 100, // bg -> Cyrl - 397, 105, // bgc -> Deva - 401, 105, // bgd -> Deva - 405, 10, // bgn -> Arab - 409, 10, // bgp -> Arab - 413, 105, // bgq -> Deva - 417, 105, // bgw -> Deva - 421, 150, // bgx -> Grek - 425, 105, // bha -> Deva - 429, 105, // bhb -> Deva - 433, 105, // bhd -> Deva - 437, 10, // bhe -> Arab - 441, 100, // bhh -> Cyrl - 445, 105, // bhi -> Deva - 449, 105, // bhj -> Deva - 453, 10, // bhm -> Arab - 457, 480, // bhn -> Syrc - 461, 105, // bho -> Deva - 465, 490, // bht -> Takr - 469, 105, // bhu -> Deva - 473, 105, // biy -> Deva - 477, 480, // bjf -> Syrc - 481, 120, // bji -> Ethi - 485, 105, // bjj -> Deva - 489, 10, // bjm -> Arab - 493, 345, // blk -> Mymr - 497, 515, // blt -> Tavt - 501, 105, // bmj -> Deva - 505, 45, // bn -> Beng - 508, 105, // bns -> Deva - 512, 540, // bo -> Tibt - 515, 100, // bph -> Cyrl - 519, 105, // bpx -> Deva - 523, 45, // bpy -> Beng - 527, 10, // bqi -> Arab - 531, 105, // bra -> Deva - 535, 235, // brb -> Khmr - 539, 105, // brd -> Deva - 543, 10, // brh -> Arab - 547, 10, // brk -> Arab - 551, 260, // brv -> Laoo - 555, 105, // brx -> Deva - 559, 10, // bsh -> Arab - 563, 10, // bsk -> Arab - 567, 35, // bsq -> Bass - 571, 120, // bst -> Ethi - 575, 40, // btd -> Batk - 579, 40, // btm -> Batk - 583, 105, // btv -> Deva - 587, 100, // bua -> Cyrl - 591, 345, // bwe -> Mymr - 595, 100, // bxm -> Cyrl - 599, 330, // bxu -> Mong - 603, 105, // byh -> Deva - 607, 120, // byn -> Ethi - 611, 105, // byw -> Deva - 615, 535, // bzi -> Thai - 619, 535, // cbn -> Thai - 623, 60, // ccp -> Cakm - 627, 520, // cde -> Telu - 631, 105, // cdh -> Deva - 635, 155, // cdi -> Gujr - 639, 105, // cdj -> Deva - 643, 105, // cdm -> Deva - 647, 175, // cdo -> Hans - 651, 45, // cdz -> Beng - 655, 100, // ce -> Cyrl - 658, 540, // cgk -> Tibt - 662, 10, // chg -> Arab - 666, 100, // chm -> Cyrl - 670, 80, // chr -> Cher - 674, 105, // chx -> Deva - 678, 105, // cih -> Deva - 682, 10, // cja -> Arab - 686, 100, // cji -> Cyrl - 690, 75, // cjm -> Cham - 694, 175, // cjy -> Hans - 698, 10, // ckb -> Arab - 702, 100, // ckt -> Cyrl - 706, 10, // clh -> Arab - 710, 100, // clw -> Cyrl - 714, 475, // cmg -> Soyo - 718, 540, // cna -> Tibt - 722, 175, // cnp -> Hans - 726, 535, // cog -> Thai - 730, 90, // cop -> Copt - 734, 150, // cpg -> Grek - 738, 65, // cr -> Cans - 741, 100, // crh -> Cyrl - 745, 65, // crj -> Cans - 749, 65, // crk -> Cans - 753, 65, // crl -> Cans - 757, 65, // crm -> Cans - 761, 345, // csh -> Mymr - 765, 175, // csp -> Hans - 769, 65, // csw -> Cans - 773, 400, // ctd -> Pauc - 777, 45, // ctg -> Beng - 781, 105, // ctn -> Deva - 785, 505, // ctt -> Taml - 789, 100, // cu -> Cyrl - 792, 255, // cuu -> Lana - 796, 100, // cv -> Cyrl - 799, 175, // czh -> Hans - 803, 185, // czk -> Hebr - 807, 105, // daq -> Deva - 811, 100, // dar -> Cyrl - 815, 10, // dcc -> Arab - 819, 100, // ddo -> Cyrl - 823, 10, // def -> Arab - 827, 10, // deh -> Arab - 831, 45, // der -> Beng - 835, 10, // dgl -> Arab - 839, 105, // dhi -> Deva - 843, 155, // dhn -> Gujr - 847, 105, // dho -> Deva - 851, 105, // dhw -> Deva - 855, 540, // dka -> Tibt - 859, 100, // dlg -> Cyrl - 863, 310, // dmf -> Medf - 867, 10, // dmk -> Arab - 871, 10, // dml -> Arab - 875, 100, // dng -> Cyrl - 879, 345, // dnu -> Mymr - 883, 345, // dnv -> Mymr - 887, 105, // doi -> Deva - 891, 120, // dox -> Ethi - 895, 540, // dre -> Tibt - 899, 330, // drh -> Mong - 903, 105, // drq -> Deva - 907, 120, // drs -> Ethi - 911, 105, // dry -> Deva - 915, 385, // dso -> Orya - 919, 105, // dty -> Deva - 923, 155, // dub -> Gujr - 927, 105, // duh -> Deva - 931, 105, // dus -> Deva - 935, 530, // dv -> Thaa - 938, 385, // dwk -> Orya - 942, 105, // dwz -> Deva - 946, 540, // dz -> Tibt - 949, 540, // dzl -> Tibt - 953, 150, // ecr -> Grek - 957, 95, // ecy -> Cprt - 961, 110, // egy -> Egyp - 965, 215, // eky -> Kali - 969, 150, // el -> Grek - 972, 105, // emg -> Deva - 976, 105, // emu -> Deva - 980, 100, // enf -> Cyrl - 984, 100, // enh -> Cyrl - 988, 505, // era -> Taml - 992, 135, // esg -> Gonm - 996, 10, // esh -> Arab - 1000, 200, // ett -> Ital - 1004, 100, // eve -> Cyrl - 1008, 100, // evn -> Cyrl - 1012, 10, // fa -> Arab - 1015, 10, // fay -> Arab - 1019, 10, // faz -> Arab - 1023, 10, // fia -> Arab - 1027, 105, // fmu -> Deva - 1031, 10, // fub -> Arab - 1035, 175, // gan -> Hans - 1039, 385, // gaq -> Orya - 1043, 155, // gas -> Gujr - 1047, 520, // gau -> Telu - 1051, 385, // gbj -> Orya - 1055, 105, // gbk -> Deva - 1059, 155, // gbl -> Gujr - 1063, 105, // gbm -> Deva - 1067, 10, // gbz -> Arab - 1071, 385, // gdb -> Orya - 1075, 100, // gdo -> Cyrl - 1079, 105, // gdx -> Deva - 1083, 120, // gez -> Ethi - 1087, 10, // ggg -> Arab - 1091, 105, // ggn -> Deva - 1095, 10, // gha -> Arab - 1099, 105, // ghe -> Deva - 1103, 10, // ghr -> Arab - 1107, 540, // ght -> Tibt - 1111, 10, // gig -> Arab - 1115, 100, // gin -> Cyrl - 1119, 10, // gjk -> Arab - 1123, 10, // gju -> Arab - 1127, 100, // gld -> Cyrl - 1131, 10, // glh -> Arab - 1135, 10, // glk -> Arab - 1139, 120, // gmv -> Ethi - 1143, 275, // gmy -> Linb - 1147, 540, // goe -> Tibt - 1151, 120, // gof -> Ethi - 1155, 105, // gok -> Deva - 1159, 105, // gom -> Deva - 1163, 520, // gon -> Telu - 1167, 140, // got -> Goth - 1171, 105, // gra -> Deva - 1175, 95, // grc -> Cprt - 1179, 45, // grt -> Beng - 1183, 120, // gru -> Ethi - 1187, 155, // gu -> Gujr - 1190, 105, // gvr -> Deva - 1194, 10, // gwc -> Arab - 1198, 10, // gwf -> Arab - 1202, 10, // gwt -> Arab - 1206, 105, // gyo -> Deva - 1210, 10, // gzi -> Arab - 1214, 10, // ha_CM -> Arab - 1220, 10, // ha_SD -> Arab - 1226, 10, // hac -> Arab - 1230, 175, // hak -> Hans - 1234, 120, // har -> Ethi - 1238, 10, // haz -> Arab - 1242, 185, // hbo -> Hebr - 1246, 120, // hdy -> Ethi - 1250, 185, // he -> Hebr - 1253, 105, // hi -> Deva - 1256, 490, // hii -> Takr - 1260, 575, // hit -> Xsux - 1264, 10, // hkh -> Arab - 1268, 105, // hlb -> Deva - 1272, 190, // hlu -> Hluw - 1276, 415, // hmd -> Plrd - 1280, 50, // hmj -> Bopo - 1284, 50, // hmq -> Bopo - 1288, 10, // hnd -> Arab - 1292, 105, // hne -> Deva - 1296, 195, // hnj -> Hmnp - 1300, 260, // hnj_AU -> Laoo - 1307, 260, // hnj_CN -> Laoo - 1314, 260, // hnj_FR -> Laoo - 1321, 260, // hnj_GF -> Laoo - 1328, 260, // hnj_LA -> Laoo - 1335, 260, // hnj_MM -> Laoo - 1342, 260, // hnj_SR -> Laoo - 1349, 260, // hnj_TH -> Laoo - 1356, 195, // hnj_US -> Hmnp - 1363, 260, // hnj_VN -> Laoo - 1370, 10, // hno -> Arab - 1374, 105, // hoc -> Deva - 1378, 10, // hoh -> Arab - 1382, 105, // hoj -> Deva - 1386, 170, // how -> Hani - 1390, 105, // hoy -> Deva - 1394, 345, // hpo -> Mymr - 1398, 480, // hrt -> Syrc - 1402, 10, // hrz -> Arab - 1406, 175, // hsn -> Hans - 1410, 10, // hss -> Arab - 1414, 575, // htx -> Xsux - 1418, 105, // hut -> Deva - 1422, 185, // huy -> Hebr - 1426, 100, // huz -> Cyrl - 1430, 20, // hy -> Armn - 1433, 20, // hyw -> Armn - 1437, 580, // ii -> Yiii - 1440, 285, // imy -> Lyci - 1444, 100, // inh -> Cyrl - 1448, 345, // int -> Mymr - 1452, 120, // ior -> Ethi - 1456, 505, // iru -> Taml - 1460, 10, // isk -> Arab - 1464, 185, // itk -> Hebr - 1468, 100, // itl -> Cyrl - 1472, 65, // iu -> Cans - 1475, 185, // iw -> Hebr - 1478, 210, // ja -> Jpan - 1481, 10, // jad -> Arab - 1485, 10, // jat -> Arab - 1489, 185, // jbe -> Hebr - 1493, 10, // jbn -> Arab - 1497, 100, // jct -> Cyrl - 1501, 540, // jda -> Tibt - 1505, 10, // jdg -> Arab - 1509, 100, // jdt -> Cyrl - 1513, 105, // jee -> Deva - 1517, 125, // jge -> Geor - 1521, 185, // ji -> Hebr - 1524, 165, // jje -> Hang - 1528, 345, // jkm -> Mymr - 1532, 105, // jml -> Deva - 1536, 490, // jna -> Takr - 1540, 10, // jnd -> Arab - 1544, 105, // jnl -> Deva - 1548, 105, // jns -> Deva - 1552, 10, // jog -> Arab - 1556, 185, // jpa -> Hebr - 1560, 185, // jpr -> Hebr - 1564, 105, // jul -> Deva - 1568, 385, // jun -> Orya - 1572, 385, // juy -> Orya - 1576, 540, // jya -> Tibt - 1580, 185, // jye -> Hebr - 1584, 125, // ka -> Geor - 1587, 100, // kaa -> Cyrl - 1591, 100, // kap -> Cyrl - 1595, 225, // kaw -> Kawi - 1599, 100, // kbd -> Cyrl - 1603, 10, // kbu -> Arab - 1607, 10, // kby -> Arab - 1611, 100, // kca -> Cyrl - 1615, 45, // kdq -> Beng - 1619, 535, // kdt -> Thai - 1623, 100, // ket -> Cyrl - 1627, 105, // kex -> Deva - 1631, 520, // key -> Telu - 1635, 245, // kfa -> Knda - 1639, 105, // kfb -> Deva - 1643, 520, // kfc -> Telu - 1647, 245, // kfd -> Knda - 1651, 505, // kfe -> Taml - 1655, 320, // kfh -> Mlym - 1659, 505, // kfi -> Taml - 1663, 105, // kfk -> Deva - 1667, 10, // kfm -> Arab - 1671, 105, // kfp -> Deva - 1675, 105, // kfq -> Deva - 1679, 105, // kfr -> Deva - 1683, 105, // kfs -> Deva - 1687, 105, // kfx -> Deva - 1691, 105, // kfy -> Deva - 1695, 105, // kgj -> Deva - 1699, 105, // kgy -> Deva - 1703, 500, // khb -> Talu - 1707, 535, // khf -> Thai - 1711, 540, // khg -> Tibt - 1715, 105, // khn -> Deva - 1719, 345, // kht -> Mymr - 1723, 100, // khv -> Cyrl - 1727, 10, // khw -> Arab - 1731, 105, // kif -> Deva - 1735, 100, // kim -> Cyrl - 1739, 105, // kip -> Deva - 1743, 260, // kjg -> Laoo - 1747, 100, // kjh -> Cyrl - 1751, 105, // kjl -> Deva - 1755, 105, // kjo -> Deva - 1759, 345, // kjp -> Mymr - 1763, 535, // kjt -> Thai - 1767, 100, // kk -> Cyrl - 1770, 10, // kk_AF -> Arab - 1776, 10, // kk_CN -> Arab - 1782, 10, // kk_IR -> Arab - 1788, 10, // kk_MN -> Arab - 1794, 540, // kkf -> Tibt - 1798, 255, // kkh -> Lana - 1802, 105, // kkt -> Deva - 1806, 105, // kle -> Deva - 1810, 10, // klj -> Arab - 1814, 105, // klr -> Deva - 1818, 235, // km -> Khmr - 1821, 105, // kmj -> Deva - 1825, 10, // kmz -> Arab - 1829, 245, // kn -> Knda - 1832, 250, // ko -> Kore - 1835, 100, // koi -> Cyrl - 1839, 105, // kok -> Deva - 1843, 100, // kpt -> Cyrl - 1847, 100, // kpy -> Cyrl - 1851, 480, // kqd -> Syrc - 1855, 120, // kqy -> Ethi - 1859, 105, // kra -> Deva - 1863, 100, // krc -> Cyrl - 1867, 100, // krk -> Cyrl - 1871, 235, // krr -> Khmr - 1875, 105, // kru -> Deva - 1879, 235, // krv -> Khmr - 1883, 10, // ks -> Arab - 1886, 345, // ksu -> Mymr - 1890, 345, // ksw -> Mymr - 1894, 105, // ksz -> Deva - 1898, 120, // ktb -> Ethi - 1902, 10, // ktl -> Arab - 1906, 415, // ktp -> Plrd - 1910, 10, // ku_LB -> Arab - 1916, 260, // kuf -> Laoo - 1920, 100, // kum -> Cyrl - 1924, 100, // kv -> Cyrl - 1927, 100, // kva -> Cyrl - 1931, 345, // kvq -> Mymr - 1935, 345, // kvt -> Mymr - 1939, 10, // kvx -> Arab - 1943, 215, // kvy -> Kali - 1947, 120, // kxc -> Ethi - 1951, 345, // kxf -> Mymr - 1955, 345, // kxk -> Mymr - 1959, 105, // kxl -> Deva - 1963, 535, // kxm -> Thai - 1967, 10, // kxp -> Arab - 1971, 385, // kxv -> Orya - 1975, 100, // ky -> Cyrl - 1978, 10, // ky_CN -> Arab - 1984, 215, // kyu -> Kali - 1988, 105, // kyv -> Deva - 1992, 105, // kyw -> Deva - 1996, 10, // kzh -> Arab - 2000, 270, // lab -> Lina - 2004, 185, // lad -> Hebr - 2008, 105, // lae -> Deva - 2012, 10, // lah -> Arab - 2016, 280, // lbc -> Lisu - 2020, 100, // lbe -> Cyrl - 2024, 105, // lbf -> Deva - 2028, 540, // lbj -> Tibt - 2032, 105, // lbm -> Deva - 2036, 260, // lbo -> Laoo - 2040, 105, // lbr -> Deva - 2044, 535, // lcp -> Thai - 2048, 265, // lep -> Lepc - 2052, 100, // lez -> Cyrl - 2056, 105, // lhm -> Deva - 2060, 480, // lhs -> Syrc - 2064, 105, // lif -> Deva - 2068, 280, // lis -> Lisu - 2072, 540, // lkh -> Tibt - 2076, 10, // lki -> Arab - 2080, 105, // lmh -> Deva - 2084, 520, // lmn -> Telu - 2088, 260, // lo -> Laoo - 2091, 105, // loy -> Deva - 2095, 415, // lpo -> Plrd - 2099, 10, // lrc -> Arab - 2103, 10, // lrk -> Arab - 2107, 10, // lrl -> Arab - 2111, 10, // lsa -> Arab - 2115, 185, // lsd -> Hebr - 2119, 10, // lss -> Arab - 2123, 540, // luk -> Tibt - 2127, 105, // luu -> Deva - 2131, 10, // luv -> Arab - 2135, 10, // luz -> Arab - 2139, 535, // lwl -> Thai - 2143, 535, // lwm -> Thai - 2147, 540, // lya -> Tibt - 2151, 175, // lzh -> Hans - 2155, 105, // mag -> Deva - 2159, 105, // mai -> Deva - 2163, 360, // man_GN -> Nkoo - 2170, 10, // mby -> Arab - 2174, 10, // mde -> Arab - 2178, 100, // mdf -> Cyrl - 2182, 120, // mdx -> Ethi - 2186, 120, // mdy -> Ethi - 2190, 10, // mfa -> Arab - 2194, 10, // mfi -> Arab - 2198, 105, // mgp -> Deva - 2202, 10, // mhj -> Arab - 2206, 295, // mid -> Mand - 2210, 105, // mjl -> Deva - 2214, 320, // mjq -> Mlym - 2218, 320, // mjr -> Mlym - 2222, 105, // mjt -> Deva - 2226, 520, // mju -> Telu - 2230, 320, // mjv -> Mlym - 2234, 105, // mjz -> Deva - 2238, 100, // mk -> Cyrl - 2241, 105, // mkb -> Deva - 2245, 105, // mke -> Deva - 2249, 10, // mki -> Arab - 2253, 535, // mkm -> Thai - 2257, 320, // ml -> Mlym - 2260, 535, // mlf -> Thai - 2264, 100, // mn -> Cyrl - 2267, 330, // mn_CN -> Mong - 2273, 45, // mni -> Beng - 2277, 10, // mnj -> Arab - 2281, 100, // mns -> Cyrl - 2285, 345, // mnw -> Mymr - 2289, 535, // mpz -> Thai - 2293, 105, // mr -> Deva - 2296, 535, // mra -> Thai - 2300, 105, // mrd -> Deva - 2304, 100, // mrj -> Cyrl - 2308, 335, // mro -> Mroo - 2312, 105, // mrr -> Deva - 2316, 10, // ms_CC -> Arab - 2322, 100, // mtm -> Cyrl - 2326, 105, // mtr -> Deva - 2330, 100, // mud -> Cyrl - 2334, 540, // muk -> Tibt - 2338, 105, // mut -> Deva - 2342, 505, // muv -> Taml - 2346, 120, // muz -> Ethi - 2350, 330, // mvf -> Mong - 2354, 10, // mvy -> Arab - 2358, 120, // mvz -> Ethi - 2362, 105, // mwr -> Deva - 2366, 345, // mwt -> Mymr - 2370, 195, // mww -> Hmnp - 2374, 345, // my -> Mymr - 2377, 120, // mym -> Ethi - 2381, 100, // myv -> Cyrl - 2385, 295, // myz -> Mand - 2389, 10, // mzn -> Arab - 2393, 175, // nan -> Hans - 2397, 105, // nao -> Deva - 2401, 105, // ncd -> Deva - 2405, 260, // ncq -> Laoo - 2409, 100, // ndf -> Cyrl - 2413, 105, // ne -> Deva - 2416, 100, // neg -> Cyrl - 2420, 540, // neh -> Tibt - 2424, 575, // nei -> Xsux - 2428, 105, // new -> Deva - 2432, 260, // ngt -> Laoo - 2436, 100, // nio -> Cyrl - 2440, 520, // nit -> Telu - 2444, 100, // niv -> Cyrl - 2448, 10, // nli -> Arab - 2452, 10, // nlm -> Arab - 2456, 105, // nlx -> Deva - 2460, 105, // nmm -> Deva - 2464, 565, // nnp -> Wcho - 2468, 255, // nod -> Lana - 2472, 105, // noe -> Deva - 2476, 100, // nog -> Cyrl - 2480, 105, // noi -> Deva - 2484, 435, // non -> Runr - 2488, 580, // nos -> Yiii - 2492, 540, // npb -> Tibt - 2496, 360, // nqo -> Nkoo - 2500, 580, // nsd -> Yiii - 2504, 580, // nsf -> Yiii - 2508, 65, // nsk -> Cans - 2512, 545, // nst -> Tnsa - 2516, 580, // nsv -> Yiii - 2520, 580, // nty -> Yiii - 2524, 10, // ntz -> Arab - 2528, 355, // nwc -> Newa - 2532, 105, // nwx -> Deva - 2536, 535, // nyl -> Thai - 2540, 10, // nyq -> Arab - 2544, 100, // oaa -> Cyrl - 2548, 100, // oac -> Cyrl - 2552, 480, // oar -> Syrc - 2556, 125, // oav -> Geor - 2560, 410, // obm -> Phnx - 2564, 345, // obr -> Mymr - 2568, 10, // odk -> Arab - 2572, 575, // oht -> Xsux - 2576, 65, // oj -> Cans - 2579, 65, // ojs -> Cans - 2583, 165, // okm -> Hang - 2587, 170, // oko -> Hani - 2591, 235, // okz -> Khmr - 2595, 105, // ola -> Deva - 2599, 540, // ole -> Tibt - 2603, 100, // omk -> Cyrl - 2607, 340, // omp -> Mtei - 2611, 325, // omr -> Modi - 2615, 105, // oon -> Deva - 2619, 385, // or -> Orya - 2622, 520, // ort -> Telu - 2626, 10, // oru -> Arab - 2630, 100, // orv -> Cyrl - 2634, 100, // os -> Cyrl - 2637, 390, // osa -> Osge - 2641, 200, // osc -> Ital - 2645, 205, // osi -> Java - 2649, 10, // ota -> Arab - 2653, 540, // otb -> Tibt - 2657, 380, // otk -> Orkh - 2661, 145, // oty -> Gran - 2665, 395, // oui -> Ougr - 2669, 160, // pa -> Guru - 2672, 10, // pa_PK -> Arab - 2678, 405, // pal -> Phli - 2682, 100, // paq -> Cyrl - 2686, 10, // pbt -> Arab - 2690, 235, // pcb -> Khmr - 2694, 345, // pce -> Mymr - 2698, 320, // pcf -> Mlym - 2702, 320, // pcg -> Mlym - 2706, 105, // pch -> Deva - 2710, 105, // pci -> Deva - 2714, 520, // pcj -> Telu - 2718, 385, // peg -> Orya - 2722, 570, // peo -> Xpeo - 2726, 230, // pgd -> Khar - 2730, 105, // pgg -> Deva - 2734, 370, // pgl -> Ogam - 2738, 200, // pgn -> Ital - 2742, 105, // phd -> Deva - 2746, 345, // phk -> Mymr - 2750, 10, // phl -> Arab - 2754, 410, // phn -> Phnx - 2758, 260, // pho -> Laoo - 2762, 10, // phr -> Arab - 2766, 535, // pht -> Thai - 2770, 10, // phv -> Arab - 2774, 105, // phw -> Deva - 2778, 460, // pi -> Sinh - 2781, 55, // pka -> Brah - 2785, 320, // pkr -> Mlym - 2789, 10, // plk -> Arab - 2793, 345, // pll -> Mymr - 2797, 55, // pmh -> Brah - 2801, 150, // pnt -> Grek - 2805, 105, // ppa -> Deva - 2809, 230, // pra -> Khar - 2813, 10, // prc -> Arab - 2817, 10, // prd -> Arab - 2821, 155, // prp -> Gujr - 2825, 535, // prt -> Thai - 2829, 10, // prx -> Arab - 2833, 10, // ps -> Arab - 2836, 10, // psh -> Arab - 2840, 10, // psi -> Arab - 2844, 10, // pst -> Arab - 2848, 105, // pum -> Deva - 2852, 345, // pwo -> Mymr - 2856, 105, // pwr -> Deva - 2860, 535, // pww -> Thai - 2864, 345, // pyx -> Mymr - 2868, 10, // qxq -> Arab - 2872, 105, // raa -> Deva - 2876, 105, // rab -> Deva - 2880, 105, // raf -> Deva - 2884, 45, // rah -> Beng - 2888, 105, // raj -> Deva - 2892, 105, // rav -> Deva - 2896, 345, // rbb -> Mymr - 2900, 10, // rdb -> Arab - 2904, 385, // rei -> Orya - 2908, 430, // rhg -> Rohg - 2912, 105, // rji -> Deva - 2916, 105, // rjs -> Deva - 2920, 235, // rka -> Khmr - 2924, 345, // rki -> Mymr - 2928, 45, // rkt -> Beng - 2932, 20, // rmi -> Armn - 2936, 10, // rmt -> Arab - 2940, 345, // rmz -> Mymr - 2944, 100, // rsk -> Cyrl - 2948, 105, // rtw -> Deva - 2952, 100, // ru -> Cyrl - 2955, 100, // rue -> Cyrl - 2959, 100, // rut -> Cyrl - 2963, 105, // rwr -> Deva - 2967, 220, // ryu -> Kana - 2971, 105, // sa -> Deva - 2974, 100, // sah -> Cyrl - 2978, 440, // sam -> Samr - 2982, 375, // sat -> Olck - 2986, 450, // saz -> Saur - 2990, 10, // sbn -> Arab - 2994, 540, // sbu -> Tibt - 2998, 105, // sck -> Deva - 3002, 10, // scl -> Arab - 3006, 105, // scp -> Deva - 3010, 260, // sct -> Laoo - 3014, 490, // scu -> Takr - 3018, 150, // scx -> Grek - 3022, 10, // sd -> Arab - 3025, 105, // sd_IN -> Deva - 3031, 10, // sdb -> Arab - 3035, 10, // sdf -> Arab - 3039, 10, // sdg -> Arab - 3043, 10, // sdh -> Arab - 3047, 10, // sds -> Arab - 3051, 100, // sel -> Cyrl - 3055, 415, // sfm -> Plrd - 3059, 370, // sga -> Ogam - 3063, 100, // sgh -> Cyrl - 3067, 105, // sgj -> Deva - 3071, 10, // sgr -> Arab - 3075, 540, // sgt -> Tibt - 3079, 120, // sgw -> Ethi - 3083, 10, // sgy -> Arab - 3087, 10, // shd -> Arab - 3091, 525, // shi -> Tfng - 3095, 10, // shm -> Arab - 3099, 345, // shn -> Mymr - 3103, 10, // shu -> Arab - 3107, 10, // shv -> Arab - 3111, 460, // si -> Sinh - 3114, 100, // sia -> Cyrl - 3118, 540, // sip -> Tibt - 3122, 10, // siy -> Arab - 3126, 10, // siz -> Arab - 3130, 100, // sjd -> Cyrl - 3134, 105, // sjp -> Deva - 3138, 100, // sjt -> Cyrl - 3142, 535, // skb -> Thai - 3146, 105, // skj -> Deva - 3150, 10, // skr -> Arab - 3154, 10, // slq -> Arab - 3158, 580, // smh -> Yiii - 3162, 440, // smp -> Samr - 3166, 235, // smu -> Khmr - 3170, 10, // smy -> Arab - 3174, 515, // soa -> Tavt - 3178, 465, // sog -> Sogd - 3182, 105, // soi -> Deva - 3186, 535, // sou -> Thai - 3190, 540, // spt -> Tibt - 3194, 385, // spv -> Orya - 3198, 10, // sqo -> Arab - 3202, 260, // sqq -> Laoo - 3206, 10, // sqt -> Arab - 3210, 100, // sr -> Cyrl - 3213, 470, // srb -> Sora - 3217, 10, // srh -> Arab - 3221, 105, // srx -> Deva - 3225, 10, // srz -> Arab - 3229, 10, // ssh -> Arab - 3233, 260, // sss -> Laoo - 3237, 10, // sts -> Arab - 3241, 120, // stv -> Ethi - 3245, 100, // sty -> Cyrl - 3249, 105, // suz -> Deva - 3253, 125, // sva -> Geor - 3257, 10, // swb -> Arab - 3261, 170, // swi -> Hani - 3265, 105, // swv -> Deva - 3269, 480, // syc -> Syrc - 3273, 45, // syl -> Beng - 3277, 480, // syn -> Syrc - 3281, 480, // syr -> Syrc - 3285, 105, // syw -> Deva - 3289, 505, // ta -> Taml - 3292, 100, // tab -> Cyrl - 3296, 105, // taj -> Deva - 3300, 485, // tbk -> Tagb - 3304, 540, // tcn -> Tibt - 3308, 345, // tco -> Mymr - 3312, 505, // tcx -> Taml - 3316, 245, // tcy -> Knda - 3320, 525, // tda -> Tfng - 3324, 105, // tdb -> Deva - 3328, 495, // tdd -> Tale - 3332, 105, // tdg -> Deva - 3336, 105, // tdh -> Deva - 3340, 520, // te -> Telu - 3343, 205, // tes -> Java - 3347, 100, // tg -> Cyrl - 3350, 10, // tg_PK -> Arab - 3356, 105, // tge -> Deva - 3360, 540, // tgf -> Tibt - 3364, 535, // th -> Thai - 3367, 105, // the -> Deva - 3371, 105, // thf -> Deva - 3375, 495, // thi -> Tale - 3379, 105, // thl -> Deva - 3383, 535, // thm -> Thai - 3387, 105, // thq -> Deva - 3391, 105, // thr -> Deva - 3395, 105, // ths -> Deva - 3399, 120, // ti -> Ethi - 3402, 120, // tig -> Ethi - 3406, 105, // tij -> Deva - 3410, 100, // tin -> Cyrl - 3414, 345, // tjl -> Mymr - 3418, 10, // tjo -> Arab - 3422, 105, // tkb -> Deva - 3426, 10, // tks -> Arab - 3430, 105, // tkt -> Deva - 3434, 105, // tmk -> Deva - 3438, 480, // tmr -> Syrc - 3442, 60, // tnv -> Cakm - 3446, 10, // tov -> Arab - 3450, 235, // tpu -> Khmr - 3454, 10, // tra -> Arab - 3458, 185, // trg -> Hebr - 3462, 10, // trm -> Arab - 3466, 10, // trw -> Arab - 3470, 150, // tsd -> Grek - 3474, 105, // tsf -> Deva - 3478, 540, // tsj -> Tibt - 3482, 100, // tt -> Cyrl - 3485, 260, // tth -> Laoo - 3489, 260, // tto -> Laoo - 3493, 535, // tts -> Thai - 3497, 345, // tvn -> Mymr - 3501, 105, // twm -> Deva - 3505, 510, // txg -> Tang - 3509, 550, // txo -> Toto - 3513, 515, // tyr -> Tavt - 3517, 100, // tyv -> Cyrl - 3521, 100, // ude -> Cyrl - 3525, 320, // udg -> Mlym - 3529, 0, // udi -> Aghb - 3533, 100, // udm -> Cyrl - 3537, 10, // ug -> Arab - 3540, 100, // ug_KZ -> Cyrl - 3546, 100, // ug_MN -> Cyrl - 3552, 555, // uga -> Ugar - 3556, 100, // ugh -> Cyrl - 3560, 535, // ugo -> Thai - 3564, 100, // uk -> Cyrl - 3567, 385, // uki -> Orya - 3571, 100, // ulc -> Cyrl - 3575, 45, // unr -> Beng - 3579, 105, // unr_NP -> Deva - 3586, 45, // unx -> Beng - 3590, 10, // ur -> Arab - 3593, 535, // urk -> Thai - 3597, 10, // ush -> Arab - 3601, 150, // uum -> Grek - 3605, 10, // uz_AF -> Arab - 3611, 100, // uz_CN -> Cyrl - 3617, 10, // uzs -> Arab - 3621, 505, // vaa -> Taml - 3625, 10, // vaf -> Arab - 3629, 105, // vah -> Deva - 3633, 560, // vai -> Vaii - 3637, 105, // vas -> Deva - 3641, 105, // vav -> Deva - 3645, 105, // vay -> Deva - 3649, 10, // vgr -> Arab - 3653, 245, // vmd -> Knda - 3657, 10, // vmh -> Arab - 3661, 120, // wal -> Ethi - 3665, 10, // wbk -> Arab - 3669, 520, // wbq -> Telu - 3673, 105, // wbr -> Deva - 3677, 10, // wlo -> Arab - 3681, 105, // wme -> Deva - 3685, 10, // wne -> Arab - 3689, 10, // wni -> Arab - 3693, 130, // wsg -> Gong - 3697, 10, // wsv -> Arab - 3701, 105, // wtm -> Deva - 3705, 175, // wuu -> Hans - 3709, 100, // xal -> Cyrl - 3713, 120, // xan -> Ethi - 3717, 100, // xas -> Cyrl - 3721, 85, // xco -> Chrs - 3725, 70, // xcr -> Cari - 3729, 100, // xdq -> Cyrl - 3733, 10, // xhe -> Arab - 3737, 235, // xhm -> Khmr - 3741, 385, // xis -> Orya - 3745, 10, // xka -> Arab - 3749, 10, // xkc -> Arab - 3753, 10, // xkj -> Arab - 3757, 10, // xkp -> Arab - 3761, 285, // xlc -> Lyci - 3765, 290, // xld -> Lydi - 3769, 115, // xly -> Elym - 3773, 125, // xmf -> Geor - 3777, 300, // xmn -> Mani - 3781, 315, // xmr -> Merc - 3785, 350, // xna -> Narb - 3789, 105, // xnr -> Deva - 3793, 150, // xpg -> Grek - 3797, 370, // xpi -> Ogam - 3801, 100, // xpm -> Cyrl - 3805, 420, // xpr -> Prti - 3809, 100, // xrm -> Cyrl - 3813, 100, // xrn -> Cyrl - 3817, 445, // xsa -> Sarb - 3821, 105, // xsr -> Deva - 3825, 100, // xss -> Cyrl - 3829, 505, // xub -> Taml - 3833, 505, // xuj -> Taml - 3837, 200, // xve -> Ital - 3841, 10, // xvi -> Arab - 3845, 100, // xwo -> Cyrl - 3849, 305, // xzh -> Marc - 3853, 100, // yai -> Cyrl - 3857, 105, // ybh -> Deva - 3861, 105, // ybi -> Deva - 3865, 10, // ydg -> Arab - 3869, 320, // yea -> Mlym - 3873, 150, // yej -> Grek - 3877, 520, // yeu -> Telu - 3881, 415, // ygp -> Plrd - 3885, 185, // yhd -> Hebr - 3889, 185, // yi -> Hebr - 3892, 580, // yig -> Yiii - 3896, 185, // yih -> Hebr - 3900, 580, // yiv -> Yiii - 3904, 100, // ykg -> Cyrl - 3908, 415, // yna -> Plrd - 3912, 100, // ynk -> Cyrl - 3916, 210, // yoi -> Jpan - 3920, 535, // yoy -> Thai - 3924, 100, // yrk -> Cyrl - 3928, 580, // ysd -> Yiii - 3932, 580, // ysn -> Yiii - 3936, 580, // ysp -> Yiii - 3940, 100, // ysr -> Cyrl - 3944, 415, // ysy -> Plrd - 3948, 185, // yud -> Hebr - 3952, 180, // yue -> Hant - 3956, 175, // yue_CN -> Hans - 3963, 100, // yug -> Cyrl - 3967, 100, // yux -> Cyrl - 3971, 415, // ywq -> Plrd - 3975, 415, // ywu -> Plrd - 3979, 540, // zau -> Tibt - 3983, 10, // zba -> Arab - 3987, 170, // zch -> Hani - 3991, 10, // zdj -> Arab - 3995, 170, // zeh -> Hani - 3999, 525, // zen -> Tfng - 4003, 170, // zgb -> Hani - 4007, 525, // zgh -> Tfng - 4011, 170, // zgm -> Hani - 4015, 170, // zgn -> Hani - 4019, 175, // zh -> Hans - 4022, 180, // zh_AU -> Hant - 4028, 180, // zh_BN -> Hant - 4034, 180, // zh_GB -> Hant - 4040, 180, // zh_GF -> Hant - 4046, 180, // zh_HK -> Hant - 4052, 180, // zh_ID -> Hant - 4058, 180, // zh_MO -> Hant - 4064, 180, // zh_PA -> Hant - 4070, 180, // zh_PF -> Hant - 4076, 180, // zh_PH -> Hant - 4082, 180, // zh_SR -> Hant - 4088, 180, // zh_TH -> Hant - 4094, 180, // zh_TW -> Hant - 4100, 180, // zh_US -> Hant - 4106, 180, // zh_VN -> Hant - 4112, 170, // zhd -> Hani - 4116, 365, // zhx -> Nshu - 4120, 100, // zkb -> Cyrl - 4124, 100, // zko -> Cyrl - 4128, 240, // zkt -> Kits - 4132, 100, // zkz -> Cyrl - 4136, 170, // zlj -> Hani - 4140, 170, // zln -> Hani - 4144, 170, // zlq -> Hani - 4148, 170, // zqe -> Hani - 4152, 185, // zrp -> Hebr - 4156, 10, // zum -> Arab - 4160, 170, // zyg -> Hani - 4164, 170, // zyn -> Hani - 4168, 170, // zzj -> Hani + 19, 420, // abl -> Rjng + 23, 10, // abv -> Arab + 27, 10, // acm -> Arab + 31, 10, // acq -> Arab + 35, 10, // acw -> Arab + 39, 10, // acx -> Arab + 43, 10, // adf -> Arab + 47, 535, // adx -> Tibt + 51, 100, // ady -> Cyrl + 55, 25, // ae -> Avst + 58, 10, // aeb -> Arab + 62, 10, // aec -> Arab + 66, 10, // aee -> Arab + 70, 10, // aeq -> Arab + 74, 10, // afb -> Arab + 78, 105, // agi -> Deva + 82, 120, // agj -> Ethi + 86, 100, // agx -> Cyrl + 90, 120, // ahg -> Ethi + 94, 5, // aho -> Ahom + 98, 105, // ahr -> Deva + 102, 10, // aib -> Arab + 106, 185, // aij -> Hebr + 110, 220, // ain -> Kana + 114, 345, // aio -> Mymr + 118, 10, // aiq -> Arab + 122, 570, // akk -> Xsux + 126, 100, // akv -> Cyrl + 130, 260, // alk -> Laoo + 134, 320, // all -> Mlym + 138, 100, // alr -> Cyrl + 142, 100, // alt -> Cyrl + 146, 120, // alw -> Ethi + 150, 120, // am -> Ethi + 153, 210, // ams -> Jpan + 157, 475, // amw -> Syrc + 161, 100, // ani -> Cyrl + 165, 105, // anp -> Deva + 169, 105, // anr -> Deva + 173, 120, // anu -> Ethi + 177, 45, // aot -> Beng + 181, 10, // apc -> Arab + 185, 10, // apd -> Arab + 189, 105, // aph -> Deva + 193, 100, // aqc -> Cyrl + 197, 10, // ar -> Arab + 200, 15, // arc -> Armi + 204, 10, // arq -> Arab + 208, 10, // ars -> Arab + 212, 10, // ary -> Arab + 216, 10, // arz -> Arab + 220, 45, // as -> Beng + 223, 450, // ase -> Sgnw + 227, 10, // ask -> Arab + 231, 10, // atn -> Arab + 235, 100, // atv -> Cyrl + 239, 10, // auj -> Arab + 243, 10, // auz -> Arab + 247, 100, // av -> Cyrl + 250, 10, // avd -> Arab + 254, 10, // avl -> Arab + 258, 105, // awa -> Deva + 262, 120, // awn -> Ethi + 266, 20, // axm -> Armn + 270, 10, // ayh -> Arab + 274, 10, // ayl -> Arab + 278, 10, // ayn -> Arab + 282, 10, // ayp -> Arab + 286, 10, // az_IQ -> Arab + 292, 10, // az_IR -> Arab + 298, 100, // az_RU -> Cyrl + 304, 10, // azb -> Arab + 308, 100, // ba -> Cyrl + 311, 10, // bal -> Arab + 315, 105, // bap -> Deva + 319, 30, // bax -> Bamu + 323, 125, // bbl -> Geor + 327, 120, // bcq -> Ethi + 331, 385, // bdv -> Orya + 335, 10, // bdz -> Arab + 339, 100, // be -> Cyrl + 342, 105, // bee -> Deva + 346, 10, // bej -> Arab + 350, 105, // bfb -> Deva + 354, 500, // bfq -> Taml + 358, 10, // bft -> Arab + 362, 535, // bfu -> Tibt + 366, 385, // bfw -> Orya + 370, 105, // bfy -> Deva + 374, 105, // bfz -> Deva + 378, 100, // bg -> Cyrl + 381, 105, // bgc -> Deva + 385, 105, // bgd -> Deva + 389, 10, // bgn -> Arab + 393, 10, // bgp -> Arab + 397, 105, // bgq -> Deva + 401, 105, // bgw -> Deva + 405, 150, // bgx -> Grek + 409, 105, // bha -> Deva + 413, 105, // bhb -> Deva + 417, 105, // bhd -> Deva + 421, 10, // bhe -> Arab + 425, 100, // bhh -> Cyrl + 429, 105, // bhi -> Deva + 433, 105, // bhj -> Deva + 437, 10, // bhm -> Arab + 441, 475, // bhn -> Syrc + 445, 105, // bho -> Deva + 449, 485, // bht -> Takr + 453, 105, // bhu -> Deva + 457, 105, // biy -> Deva + 461, 475, // bjf -> Syrc + 465, 105, // bjj -> Deva + 469, 10, // bjm -> Arab + 473, 345, // blk -> Mymr + 477, 510, // blt -> Tavt + 481, 105, // bmj -> Deva + 485, 45, // bn -> Beng + 488, 105, // bns -> Deva + 492, 535, // bo -> Tibt + 495, 100, // bph -> Cyrl + 499, 105, // bpx -> Deva + 503, 45, // bpy -> Beng + 507, 10, // bqi -> Arab + 511, 105, // bra -> Deva + 515, 235, // brb -> Khmr + 519, 105, // brd -> Deva + 523, 10, // brh -> Arab + 527, 10, // brk -> Arab + 531, 260, // brv -> Laoo + 535, 105, // brx -> Deva + 539, 10, // bsh -> Arab + 543, 10, // bsk -> Arab + 547, 35, // bsq -> Bass + 551, 120, // bst -> Ethi + 555, 40, // btd -> Batk + 559, 40, // btm -> Batk + 563, 105, // btv -> Deva + 567, 100, // bua -> Cyrl + 571, 345, // bwe -> Mymr + 575, 100, // bxm -> Cyrl + 579, 330, // bxu -> Mong + 583, 105, // byh -> Deva + 587, 120, // byn -> Ethi + 591, 105, // byw -> Deva + 595, 530, // bzi -> Thai + 599, 530, // cbn -> Thai + 603, 60, // ccp -> Cakm + 607, 515, // cde -> Telu + 611, 105, // cdh -> Deva + 615, 155, // cdi -> Gujr + 619, 105, // cdj -> Deva + 623, 105, // cdm -> Deva + 627, 175, // cdo -> Hans + 631, 45, // cdz -> Beng + 635, 100, // ce -> Cyrl + 638, 535, // cgk -> Tibt + 642, 10, // chg -> Arab + 646, 100, // chm -> Cyrl + 650, 80, // chr -> Cher + 654, 105, // chx -> Deva + 658, 105, // cih -> Deva + 662, 10, // cja -> Arab + 666, 100, // cji -> Cyrl + 670, 75, // cjm -> Cham + 674, 175, // cjy -> Hans + 678, 10, // ckb -> Arab + 682, 100, // ckt -> Cyrl + 686, 10, // clh -> Arab + 690, 100, // clw -> Cyrl + 694, 470, // cmg -> Soyo + 698, 535, // cna -> Tibt + 702, 175, // cnp -> Hans + 706, 530, // cog -> Thai + 710, 90, // cop -> Copt + 714, 150, // cpg -> Grek + 718, 65, // cr -> Cans + 721, 100, // crh -> Cyrl + 725, 65, // crj -> Cans + 729, 65, // crk -> Cans + 733, 65, // crl -> Cans + 737, 65, // crm -> Cans + 741, 345, // csh -> Mymr + 745, 175, // csp -> Hans + 749, 65, // csw -> Cans + 753, 395, // ctd -> Pauc + 757, 45, // ctg -> Beng + 761, 105, // ctn -> Deva + 765, 500, // ctt -> Taml + 769, 100, // cu -> Cyrl + 772, 255, // cuu -> Lana + 776, 100, // cv -> Cyrl + 779, 175, // czh -> Hans + 783, 185, // czk -> Hebr + 787, 105, // daq -> Deva + 791, 100, // dar -> Cyrl + 795, 10, // dcc -> Arab + 799, 100, // ddo -> Cyrl + 803, 10, // def -> Arab + 807, 10, // deh -> Arab + 811, 45, // der -> Beng + 815, 105, // dhi -> Deva + 819, 155, // dhn -> Gujr + 823, 105, // dho -> Deva + 827, 105, // dhw -> Deva + 831, 535, // dka -> Tibt + 835, 100, // dlg -> Cyrl + 839, 310, // dmf -> Medf + 843, 10, // dmk -> Arab + 847, 10, // dml -> Arab + 851, 100, // dng -> Cyrl + 855, 345, // dnu -> Mymr + 859, 345, // dnv -> Mymr + 863, 105, // doi -> Deva + 867, 120, // dox -> Ethi + 871, 535, // dre -> Tibt + 875, 105, // drq -> Deva + 879, 120, // drs -> Ethi + 883, 105, // dry -> Deva + 887, 385, // dso -> Orya + 891, 105, // dty -> Deva + 895, 155, // dub -> Gujr + 899, 105, // duh -> Deva + 903, 105, // dus -> Deva + 907, 525, // dv -> Thaa + 910, 385, // dwk -> Orya + 914, 105, // dwz -> Deva + 918, 535, // dz -> Tibt + 921, 535, // dzl -> Tibt + 925, 150, // ecr -> Grek + 929, 95, // ecy -> Cprt + 933, 110, // egy -> Egyp + 937, 215, // eky -> Kali + 941, 150, // el -> Grek + 944, 105, // emg -> Deva + 948, 105, // emu -> Deva + 952, 100, // enf -> Cyrl + 956, 100, // enh -> Cyrl + 960, 500, // era -> Taml + 964, 135, // esg -> Gonm + 968, 10, // esh -> Arab + 972, 200, // ett -> Ital + 976, 100, // eve -> Cyrl + 980, 100, // evn -> Cyrl + 984, 10, // fa -> Arab + 987, 10, // fay -> Arab + 991, 10, // faz -> Arab + 995, 10, // fia -> Arab + 999, 105, // fmu -> Deva + 1003, 10, // fub -> Arab + 1007, 175, // gan -> Hans + 1011, 385, // gaq -> Orya + 1015, 155, // gas -> Gujr + 1019, 515, // gau -> Telu + 1023, 385, // gbj -> Orya + 1027, 105, // gbk -> Deva + 1031, 155, // gbl -> Gujr + 1035, 105, // gbm -> Deva + 1039, 10, // gbz -> Arab + 1043, 385, // gdb -> Orya + 1047, 100, // gdo -> Cyrl + 1051, 105, // gdx -> Deva + 1055, 120, // gez -> Ethi + 1059, 10, // ggg -> Arab + 1063, 10, // gha -> Arab + 1067, 105, // ghe -> Deva + 1071, 10, // ghr -> Arab + 1075, 535, // ght -> Tibt + 1079, 10, // gig -> Arab + 1083, 100, // gin -> Cyrl + 1087, 10, // gjk -> Arab + 1091, 10, // gju -> Arab + 1095, 100, // gld -> Cyrl + 1099, 10, // glh -> Arab + 1103, 10, // glk -> Arab + 1107, 120, // gmv -> Ethi + 1111, 275, // gmy -> Linb + 1115, 535, // goe -> Tibt + 1119, 120, // gof -> Ethi + 1123, 105, // gok -> Deva + 1127, 105, // gom -> Deva + 1131, 515, // gon -> Telu + 1135, 140, // got -> Goth + 1139, 105, // gra -> Deva + 1143, 95, // grc -> Cprt + 1147, 45, // grt -> Beng + 1151, 120, // gru -> Ethi + 1155, 155, // gu -> Gujr + 1158, 105, // gvr -> Deva + 1162, 10, // gwc -> Arab + 1166, 10, // gwf -> Arab + 1170, 10, // gwt -> Arab + 1174, 105, // gyo -> Deva + 1178, 10, // gzi -> Arab + 1182, 10, // ha_CM -> Arab + 1188, 10, // ha_SD -> Arab + 1194, 10, // hac -> Arab + 1198, 175, // hak -> Hans + 1202, 120, // har -> Ethi + 1206, 10, // haz -> Arab + 1210, 185, // hbo -> Hebr + 1214, 120, // hdy -> Ethi + 1218, 185, // he -> Hebr + 1221, 105, // hi -> Deva + 1224, 485, // hii -> Takr + 1228, 570, // hit -> Xsux + 1232, 10, // hkh -> Arab + 1236, 105, // hlb -> Deva + 1240, 190, // hlu -> Hluw + 1244, 410, // hmd -> Plrd + 1248, 50, // hmj -> Bopo + 1252, 50, // hmq -> Bopo + 1256, 10, // hnd -> Arab + 1260, 105, // hne -> Deva + 1264, 195, // hnj -> Hmnp + 1268, 260, // hnj_AU -> Laoo + 1275, 260, // hnj_CN -> Laoo + 1282, 260, // hnj_FR -> Laoo + 1289, 260, // hnj_GF -> Laoo + 1296, 260, // hnj_LA -> Laoo + 1303, 260, // hnj_MM -> Laoo + 1310, 260, // hnj_SR -> Laoo + 1317, 260, // hnj_TH -> Laoo + 1324, 260, // hnj_VN -> Laoo + 1331, 10, // hno -> Arab + 1335, 105, // hoc -> Deva + 1339, 10, // hoh -> Arab + 1343, 105, // hoj -> Deva + 1347, 170, // how -> Hani + 1351, 105, // hoy -> Deva + 1355, 345, // hpo -> Mymr + 1359, 475, // hrt -> Syrc + 1363, 10, // hrz -> Arab + 1367, 175, // hsn -> Hans + 1371, 10, // hss -> Arab + 1375, 570, // htx -> Xsux + 1379, 105, // hut -> Deva + 1383, 185, // huy -> Hebr + 1387, 100, // huz -> Cyrl + 1391, 20, // hy -> Armn + 1394, 20, // hyw -> Armn + 1398, 575, // ii -> Yiii + 1401, 285, // imy -> Lyci + 1405, 100, // inh -> Cyrl + 1409, 345, // int -> Mymr + 1413, 120, // ior -> Ethi + 1417, 500, // iru -> Taml + 1421, 10, // isk -> Arab + 1425, 185, // itk -> Hebr + 1429, 100, // itl -> Cyrl + 1433, 65, // iu -> Cans + 1436, 185, // iw -> Hebr + 1439, 210, // ja -> Jpan + 1442, 10, // jad -> Arab + 1446, 10, // jat -> Arab + 1450, 185, // jbe -> Hebr + 1454, 10, // jbn -> Arab + 1458, 100, // jct -> Cyrl + 1462, 535, // jda -> Tibt + 1466, 10, // jdg -> Arab + 1470, 100, // jdt -> Cyrl + 1474, 105, // jee -> Deva + 1478, 125, // jge -> Geor + 1482, 185, // ji -> Hebr + 1485, 165, // jje -> Hang + 1489, 345, // jkm -> Mymr + 1493, 105, // jml -> Deva + 1497, 485, // jna -> Takr + 1501, 10, // jnd -> Arab + 1505, 105, // jnl -> Deva + 1509, 105, // jns -> Deva + 1513, 10, // jog -> Arab + 1517, 185, // jpa -> Hebr + 1521, 185, // jpr -> Hebr + 1525, 185, // jrb -> Hebr + 1529, 10, // jrb_MA -> Arab + 1536, 105, // jul -> Deva + 1540, 385, // jun -> Orya + 1544, 385, // juy -> Orya + 1548, 535, // jya -> Tibt + 1552, 185, // jye -> Hebr + 1556, 125, // ka -> Geor + 1559, 100, // kaa -> Cyrl + 1563, 100, // kap -> Cyrl + 1567, 225, // kaw -> Kawi + 1571, 100, // kbd -> Cyrl + 1575, 10, // kbu -> Arab + 1579, 10, // kby -> Arab + 1583, 100, // kca -> Cyrl + 1587, 45, // kdq -> Beng + 1591, 530, // kdt -> Thai + 1595, 100, // ket -> Cyrl + 1599, 105, // kex -> Deva + 1603, 515, // key -> Telu + 1607, 245, // kfa -> Knda + 1611, 105, // kfb -> Deva + 1615, 515, // kfc -> Telu + 1619, 245, // kfd -> Knda + 1623, 500, // kfe -> Taml + 1627, 320, // kfh -> Mlym + 1631, 500, // kfi -> Taml + 1635, 105, // kfk -> Deva + 1639, 10, // kfm -> Arab + 1643, 105, // kfp -> Deva + 1647, 105, // kfq -> Deva + 1651, 105, // kfr -> Deva + 1655, 105, // kfs -> Deva + 1659, 105, // kfx -> Deva + 1663, 105, // kfy -> Deva + 1667, 105, // kgj -> Deva + 1671, 105, // kgy -> Deva + 1675, 495, // khb -> Talu + 1679, 530, // khf -> Thai + 1683, 535, // khg -> Tibt + 1687, 105, // khn -> Deva + 1691, 345, // kht -> Mymr + 1695, 100, // khv -> Cyrl + 1699, 10, // khw -> Arab + 1703, 105, // kif -> Deva + 1707, 100, // kim -> Cyrl + 1711, 105, // kip -> Deva + 1715, 260, // kjg -> Laoo + 1719, 100, // kjh -> Cyrl + 1723, 105, // kjl -> Deva + 1727, 105, // kjo -> Deva + 1731, 345, // kjp -> Mymr + 1735, 530, // kjt -> Thai + 1739, 100, // kk -> Cyrl + 1742, 10, // kk_AF -> Arab + 1748, 10, // kk_CN -> Arab + 1754, 10, // kk_IR -> Arab + 1760, 10, // kk_MN -> Arab + 1766, 535, // kkf -> Tibt + 1770, 255, // kkh -> Lana + 1774, 105, // kkt -> Deva + 1778, 105, // kle -> Deva + 1782, 10, // klj -> Arab + 1786, 105, // klr -> Deva + 1790, 235, // km -> Khmr + 1793, 105, // kmj -> Deva + 1797, 10, // kmz -> Arab + 1801, 245, // kn -> Knda + 1804, 250, // ko -> Kore + 1807, 100, // koi -> Cyrl + 1811, 105, // kok -> Deva + 1815, 100, // kpt -> Cyrl + 1819, 100, // kpy -> Cyrl + 1823, 475, // kqd -> Syrc + 1827, 120, // kqy -> Ethi + 1831, 105, // kra -> Deva + 1835, 100, // krc -> Cyrl + 1839, 100, // krk -> Cyrl + 1843, 235, // krr -> Khmr + 1847, 105, // kru -> Deva + 1851, 235, // krv -> Khmr + 1855, 10, // ks -> Arab + 1858, 345, // ksu -> Mymr + 1862, 345, // ksw -> Mymr + 1866, 105, // ksz -> Deva + 1870, 120, // ktb -> Ethi + 1874, 10, // ktl -> Arab + 1878, 410, // ktp -> Plrd + 1882, 10, // ku_LB -> Arab + 1888, 260, // kuf -> Laoo + 1892, 100, // kum -> Cyrl + 1896, 100, // kv -> Cyrl + 1899, 100, // kva -> Cyrl + 1903, 345, // kvq -> Mymr + 1907, 345, // kvt -> Mymr + 1911, 10, // kvx -> Arab + 1915, 215, // kvy -> Kali + 1919, 345, // kxf -> Mymr + 1923, 345, // kxk -> Mymr + 1927, 530, // kxm -> Thai + 1931, 10, // kxp -> Arab + 1935, 100, // ky -> Cyrl + 1938, 10, // ky_CN -> Arab + 1944, 215, // kyu -> Kali + 1948, 105, // kyv -> Deva + 1952, 105, // kyw -> Deva + 1956, 270, // lab -> Lina + 1960, 185, // lad -> Hebr + 1964, 105, // lae -> Deva + 1968, 10, // lah -> Arab + 1972, 280, // lbc -> Lisu + 1976, 100, // lbe -> Cyrl + 1980, 105, // lbf -> Deva + 1984, 535, // lbj -> Tibt + 1988, 105, // lbm -> Deva + 1992, 260, // lbo -> Laoo + 1996, 105, // lbr -> Deva + 2000, 530, // lcp -> Thai + 2004, 265, // lep -> Lepc + 2008, 100, // lez -> Cyrl + 2012, 105, // lhm -> Deva + 2016, 475, // lhs -> Syrc + 2020, 105, // lif -> Deva + 2024, 280, // lis -> Lisu + 2028, 535, // lkh -> Tibt + 2032, 10, // lki -> Arab + 2036, 105, // lmh -> Deva + 2040, 515, // lmn -> Telu + 2044, 260, // lo -> Laoo + 2047, 105, // loy -> Deva + 2051, 410, // lpo -> Plrd + 2055, 10, // lrc -> Arab + 2059, 10, // lrk -> Arab + 2063, 10, // lrl -> Arab + 2067, 10, // lsa -> Arab + 2071, 185, // lsd -> Hebr + 2075, 10, // lss -> Arab + 2079, 535, // luk -> Tibt + 2083, 105, // luu -> Deva + 2087, 10, // luv -> Arab + 2091, 10, // luz -> Arab + 2095, 530, // lwl -> Thai + 2099, 530, // lwm -> Thai + 2103, 535, // lya -> Tibt + 2107, 175, // lzh -> Hans + 2111, 105, // mag -> Deva + 2115, 105, // mai -> Deva + 2119, 360, // man_GN -> Nkoo + 2126, 10, // mby -> Arab + 2130, 10, // mde -> Arab + 2134, 100, // mdf -> Cyrl + 2138, 120, // mdx -> Ethi + 2142, 120, // mdy -> Ethi + 2146, 10, // mfa -> Arab + 2150, 10, // mfi -> Arab + 2154, 105, // mgp -> Deva + 2158, 10, // mhj -> Arab + 2162, 295, // mid -> Mand + 2166, 105, // mjl -> Deva + 2170, 320, // mjq -> Mlym + 2174, 320, // mjr -> Mlym + 2178, 105, // mjt -> Deva + 2182, 515, // mju -> Telu + 2186, 320, // mjv -> Mlym + 2190, 105, // mjz -> Deva + 2194, 100, // mk -> Cyrl + 2197, 105, // mkb -> Deva + 2201, 105, // mke -> Deva + 2205, 10, // mki -> Arab + 2209, 530, // mkm -> Thai + 2213, 320, // ml -> Mlym + 2216, 530, // mlf -> Thai + 2220, 100, // mn -> Cyrl + 2223, 330, // mn_CN -> Mong + 2229, 45, // mni -> Beng + 2233, 10, // mnj -> Arab + 2237, 100, // mns -> Cyrl + 2241, 345, // mnw -> Mymr + 2245, 530, // mpz -> Thai + 2249, 105, // mr -> Deva + 2252, 530, // mra -> Thai + 2256, 105, // mrd -> Deva + 2260, 100, // mrj -> Cyrl + 2264, 335, // mro -> Mroo + 2268, 105, // mrr -> Deva + 2272, 10, // ms_CC -> Arab + 2278, 100, // mtm -> Cyrl + 2282, 105, // mtr -> Deva + 2286, 100, // mud -> Cyrl + 2290, 535, // muk -> Tibt + 2294, 105, // mut -> Deva + 2298, 500, // muv -> Taml + 2302, 120, // muz -> Ethi + 2306, 330, // mvf -> Mong + 2310, 10, // mvy -> Arab + 2314, 120, // mvz -> Ethi + 2318, 105, // mwr -> Deva + 2322, 345, // mwt -> Mymr + 2326, 195, // mww -> Hmnp + 2330, 345, // my -> Mymr + 2333, 120, // mym -> Ethi + 2337, 100, // myv -> Cyrl + 2341, 295, // myz -> Mand + 2345, 10, // mzn -> Arab + 2349, 175, // nan -> Hans + 2353, 105, // nao -> Deva + 2357, 105, // ncd -> Deva + 2361, 260, // ncq -> Laoo + 2365, 100, // ndf -> Cyrl + 2369, 105, // ne -> Deva + 2372, 100, // neg -> Cyrl + 2376, 535, // neh -> Tibt + 2380, 570, // nei -> Xsux + 2384, 105, // new -> Deva + 2388, 260, // ngt -> Laoo + 2392, 100, // nio -> Cyrl + 2396, 515, // nit -> Telu + 2400, 100, // niv -> Cyrl + 2404, 10, // nli -> Arab + 2408, 10, // nlm -> Arab + 2412, 105, // nlx -> Deva + 2416, 105, // nmm -> Deva + 2420, 560, // nnp -> Wcho + 2424, 255, // nod -> Lana + 2428, 105, // noe -> Deva + 2432, 100, // nog -> Cyrl + 2436, 105, // noi -> Deva + 2440, 430, // non -> Runr + 2444, 575, // nos -> Yiii + 2448, 535, // npb -> Tibt + 2452, 360, // nqo -> Nkoo + 2456, 575, // nsd -> Yiii + 2460, 575, // nsf -> Yiii + 2464, 65, // nsk -> Cans + 2468, 540, // nst -> Tnsa + 2472, 575, // nsv -> Yiii + 2476, 575, // nty -> Yiii + 2480, 10, // ntz -> Arab + 2484, 355, // nwc -> Newa + 2488, 105, // nwx -> Deva + 2492, 530, // nyl -> Thai + 2496, 10, // nyq -> Arab + 2500, 100, // oaa -> Cyrl + 2504, 100, // oac -> Cyrl + 2508, 475, // oar -> Syrc + 2512, 125, // oav -> Geor + 2516, 405, // obm -> Phnx + 2520, 345, // obr -> Mymr + 2524, 10, // odk -> Arab + 2528, 570, // oht -> Xsux + 2532, 65, // oj -> Cans + 2535, 65, // ojs -> Cans + 2539, 165, // okm -> Hang + 2543, 170, // oko -> Hani + 2547, 235, // okz -> Khmr + 2551, 105, // ola -> Deva + 2555, 535, // ole -> Tibt + 2559, 100, // omk -> Cyrl + 2563, 340, // omp -> Mtei + 2567, 325, // omr -> Modi + 2571, 105, // oon -> Deva + 2575, 385, // or -> Orya + 2578, 515, // ort -> Telu + 2582, 10, // oru -> Arab + 2586, 100, // orv -> Cyrl + 2590, 100, // os -> Cyrl + 2593, 390, // osa -> Osge + 2597, 200, // osc -> Ital + 2601, 205, // osi -> Java + 2605, 10, // ota -> Arab + 2609, 535, // otb -> Tibt + 2613, 380, // otk -> Orkh + 2617, 145, // oty -> Gran + 2621, 160, // pa -> Guru + 2624, 10, // pa_PK -> Arab + 2630, 400, // pal -> Phli + 2634, 100, // paq -> Cyrl + 2638, 10, // pbt -> Arab + 2642, 235, // pcb -> Khmr + 2646, 345, // pce -> Mymr + 2650, 320, // pcf -> Mlym + 2654, 320, // pcg -> Mlym + 2658, 105, // pch -> Deva + 2662, 105, // pci -> Deva + 2666, 515, // pcj -> Telu + 2670, 385, // peg -> Orya + 2674, 565, // peo -> Xpeo + 2678, 230, // pgd -> Khar + 2682, 105, // pgg -> Deva + 2686, 370, // pgl -> Ogam + 2690, 200, // pgn -> Ital + 2694, 105, // phd -> Deva + 2698, 345, // phk -> Mymr + 2702, 10, // phl -> Arab + 2706, 405, // phn -> Phnx + 2710, 260, // pho -> Laoo + 2714, 10, // phr -> Arab + 2718, 530, // pht -> Thai + 2722, 10, // phv -> Arab + 2726, 105, // phw -> Deva + 2730, 455, // pi -> Sinh + 2733, 55, // pka -> Brah + 2737, 320, // pkr -> Mlym + 2741, 10, // plk -> Arab + 2745, 345, // pll -> Mymr + 2749, 55, // pmh -> Brah + 2753, 150, // pnt -> Grek + 2757, 230, // pra -> Khar + 2761, 10, // prc -> Arab + 2765, 10, // prd -> Arab + 2769, 530, // prt -> Thai + 2773, 10, // prx -> Arab + 2777, 10, // ps -> Arab + 2780, 10, // psh -> Arab + 2784, 10, // psi -> Arab + 2788, 10, // pst -> Arab + 2792, 105, // pum -> Deva + 2796, 345, // pwo -> Mymr + 2800, 105, // pwr -> Deva + 2804, 530, // pww -> Thai + 2808, 345, // pyx -> Mymr + 2812, 10, // qxq -> Arab + 2816, 105, // raa -> Deva + 2820, 105, // rab -> Deva + 2824, 105, // raf -> Deva + 2828, 45, // rah -> Beng + 2832, 105, // raj -> Deva + 2836, 105, // rav -> Deva + 2840, 345, // rbb -> Mymr + 2844, 10, // rdb -> Arab + 2848, 385, // rei -> Orya + 2852, 425, // rhg -> Rohg + 2856, 105, // rji -> Deva + 2860, 105, // rjs -> Deva + 2864, 235, // rka -> Khmr + 2868, 345, // rki -> Mymr + 2872, 45, // rkt -> Beng + 2876, 20, // rmi -> Armn + 2880, 10, // rmt -> Arab + 2884, 345, // rmz -> Mymr + 2888, 100, // rom_BG -> Cyrl + 2895, 100, // rsk -> Cyrl + 2899, 105, // rtw -> Deva + 2903, 100, // ru -> Cyrl + 2906, 100, // rue -> Cyrl + 2910, 100, // rut -> Cyrl + 2914, 105, // rwr -> Deva + 2918, 220, // ryu -> Kana + 2922, 105, // sa -> Deva + 2925, 100, // sah -> Cyrl + 2929, 435, // sam -> Samr + 2933, 375, // sat -> Olck + 2937, 445, // saz -> Saur + 2941, 10, // sbn -> Arab + 2945, 535, // sbu -> Tibt + 2949, 105, // sck -> Deva + 2953, 10, // scl -> Arab + 2957, 10, // scl_IN -> Arab + 2964, 105, // scp -> Deva + 2968, 260, // sct -> Laoo + 2972, 485, // scu -> Takr + 2976, 150, // scx -> Grek + 2980, 10, // sd -> Arab + 2983, 105, // sd_IN -> Deva + 2989, 10, // sdb -> Arab + 2993, 10, // sdf -> Arab + 2997, 10, // sdg -> Arab + 3001, 10, // sdh -> Arab + 3005, 10, // sds -> Arab + 3009, 100, // sel -> Cyrl + 3013, 410, // sfm -> Plrd + 3017, 370, // sga -> Ogam + 3021, 100, // sgh -> Cyrl + 3025, 105, // sgj -> Deva + 3029, 10, // sgr -> Arab + 3033, 535, // sgt -> Tibt + 3037, 120, // sgw -> Ethi + 3041, 10, // sgy -> Arab + 3045, 10, // shd -> Arab + 3049, 520, // shi -> Tfng + 3053, 10, // shm -> Arab + 3057, 345, // shn -> Mymr + 3061, 10, // shu -> Arab + 3065, 10, // shv -> Arab + 3069, 455, // si -> Sinh + 3072, 100, // sia -> Cyrl + 3076, 535, // sip -> Tibt + 3080, 10, // siy -> Arab + 3084, 10, // siz -> Arab + 3088, 100, // sjd -> Cyrl + 3092, 105, // sjp -> Deva + 3096, 100, // sjt -> Cyrl + 3100, 530, // skb -> Thai + 3104, 105, // skj -> Deva + 3108, 10, // skr -> Arab + 3112, 575, // smh -> Yiii + 3116, 435, // smp -> Samr + 3120, 235, // smu -> Khmr + 3124, 10, // smy -> Arab + 3128, 510, // soa -> Tavt + 3132, 460, // sog -> Sogd + 3136, 105, // soi -> Deva + 3140, 530, // sou -> Thai + 3144, 535, // spt -> Tibt + 3148, 385, // spv -> Orya + 3152, 10, // sqo -> Arab + 3156, 260, // sqq -> Laoo + 3160, 10, // sqt -> Arab + 3164, 100, // sr -> Cyrl + 3167, 465, // srb -> Sora + 3171, 10, // srh -> Arab + 3175, 105, // srx -> Deva + 3179, 10, // srz -> Arab + 3183, 10, // ssh -> Arab + 3187, 260, // sss -> Laoo + 3191, 10, // sts -> Arab + 3195, 120, // stv -> Ethi + 3199, 100, // sty -> Cyrl + 3203, 105, // suz -> Deva + 3207, 125, // sva -> Geor + 3211, 10, // swb -> Arab + 3215, 170, // swi -> Hani + 3219, 105, // swv -> Deva + 3223, 475, // syc -> Syrc + 3227, 45, // syl -> Beng + 3231, 475, // syn -> Syrc + 3235, 475, // syr -> Syrc + 3239, 105, // syw -> Deva + 3243, 500, // ta -> Taml + 3246, 100, // tab -> Cyrl + 3250, 105, // taj -> Deva + 3254, 480, // tbk -> Tagb + 3258, 535, // tcn -> Tibt + 3262, 345, // tco -> Mymr + 3266, 500, // tcx -> Taml + 3270, 245, // tcy -> Knda + 3274, 520, // tda -> Tfng + 3278, 105, // tdb -> Deva + 3282, 490, // tdd -> Tale + 3286, 105, // tdg -> Deva + 3290, 105, // tdh -> Deva + 3294, 515, // te -> Telu + 3297, 205, // tes -> Java + 3301, 100, // tg -> Cyrl + 3304, 10, // tg_PK -> Arab + 3310, 105, // tge -> Deva + 3314, 535, // tgf -> Tibt + 3318, 530, // th -> Thai + 3321, 105, // the -> Deva + 3325, 105, // thf -> Deva + 3329, 490, // thi -> Tale + 3333, 105, // thl -> Deva + 3337, 530, // thm -> Thai + 3341, 105, // thq -> Deva + 3345, 105, // thr -> Deva + 3349, 105, // ths -> Deva + 3353, 120, // ti -> Ethi + 3356, 120, // tig -> Ethi + 3360, 105, // tij -> Deva + 3364, 100, // tin -> Cyrl + 3368, 345, // tjl -> Mymr + 3372, 10, // tjo -> Arab + 3376, 105, // tkb -> Deva + 3380, 10, // tks -> Arab + 3384, 105, // tkt -> Deva + 3388, 475, // tmr -> Syrc + 3392, 60, // tnv -> Cakm + 3396, 10, // tov -> Arab + 3400, 235, // tpu -> Khmr + 3404, 10, // tra -> Arab + 3408, 185, // trg -> Hebr + 3412, 10, // trm -> Arab + 3416, 10, // trw -> Arab + 3420, 150, // tsd -> Grek + 3424, 535, // tsj -> Tibt + 3428, 100, // tt -> Cyrl + 3431, 260, // tth -> Laoo + 3435, 260, // tto -> Laoo + 3439, 530, // tts -> Thai + 3443, 345, // tvn -> Mymr + 3447, 105, // twm -> Deva + 3451, 505, // txg -> Tang + 3455, 545, // txo -> Toto + 3459, 510, // tyr -> Tavt + 3463, 100, // tyv -> Cyrl + 3467, 100, // ude -> Cyrl + 3471, 320, // udg -> Mlym + 3475, 0, // udi -> Aghb + 3479, 100, // udm -> Cyrl + 3483, 10, // ug -> Arab + 3486, 100, // ug_KZ -> Cyrl + 3492, 100, // ug_MN -> Cyrl + 3498, 550, // uga -> Ugar + 3502, 100, // ugh -> Cyrl + 3506, 530, // ugo -> Thai + 3510, 100, // uk -> Cyrl + 3513, 385, // uki -> Orya + 3517, 100, // ulc -> Cyrl + 3521, 45, // unr -> Beng + 3525, 105, // unr_NP -> Deva + 3532, 45, // unx -> Beng + 3536, 10, // ur -> Arab + 3539, 530, // urk -> Thai + 3543, 10, // ush -> Arab + 3547, 150, // uum -> Grek + 3551, 10, // uz_AF -> Arab + 3557, 100, // uz_CN -> Cyrl + 3563, 10, // uzs -> Arab + 3567, 500, // vaa -> Taml + 3571, 10, // vaf -> Arab + 3575, 105, // vah -> Deva + 3579, 555, // vai -> Vaii + 3583, 105, // vas -> Deva + 3587, 105, // vav -> Deva + 3591, 105, // vay -> Deva + 3595, 10, // vgr -> Arab + 3599, 245, // vmd -> Knda + 3603, 10, // vmh -> Arab + 3607, 120, // wal -> Ethi + 3611, 10, // wbk -> Arab + 3615, 515, // wbq -> Telu + 3619, 105, // wbr -> Deva + 3623, 10, // wlo -> Arab + 3627, 105, // wme -> Deva + 3631, 10, // wne -> Arab + 3635, 10, // wni -> Arab + 3639, 130, // wsg -> Gong + 3643, 10, // wsv -> Arab + 3647, 105, // wtm -> Deva + 3651, 175, // wuu -> Hans + 3655, 100, // xal -> Cyrl + 3659, 120, // xan -> Ethi + 3663, 100, // xas -> Cyrl + 3667, 85, // xco -> Chrs + 3671, 70, // xcr -> Cari + 3675, 100, // xdq -> Cyrl + 3679, 10, // xhe -> Arab + 3683, 235, // xhm -> Khmr + 3687, 385, // xis -> Orya + 3691, 10, // xka -> Arab + 3695, 10, // xkc -> Arab + 3699, 10, // xkj -> Arab + 3703, 10, // xkp -> Arab + 3707, 285, // xlc -> Lyci + 3711, 290, // xld -> Lydi + 3715, 115, // xly -> Elym + 3719, 125, // xmf -> Geor + 3723, 300, // xmn -> Mani + 3727, 315, // xmr -> Merc + 3731, 350, // xna -> Narb + 3735, 105, // xnr -> Deva + 3739, 150, // xpg -> Grek + 3743, 370, // xpi -> Ogam + 3747, 100, // xpm -> Cyrl + 3751, 415, // xpr -> Prti + 3755, 100, // xrm -> Cyrl + 3759, 100, // xrn -> Cyrl + 3763, 440, // xsa -> Sarb + 3767, 105, // xsr -> Deva + 3771, 500, // xub -> Taml + 3775, 500, // xuj -> Taml + 3779, 200, // xve -> Ital + 3783, 10, // xvi -> Arab + 3787, 100, // xwo -> Cyrl + 3791, 305, // xzh -> Marc + 3795, 100, // yai -> Cyrl + 3799, 105, // ybh -> Deva + 3803, 105, // ybi -> Deva + 3807, 10, // ydg -> Arab + 3811, 320, // yea -> Mlym + 3815, 150, // yej -> Grek + 3819, 515, // yeu -> Telu + 3823, 410, // ygp -> Plrd + 3827, 185, // yhd -> Hebr + 3831, 185, // yi -> Hebr + 3834, 575, // yig -> Yiii + 3838, 185, // yih -> Hebr + 3842, 575, // yiv -> Yiii + 3846, 100, // ykg -> Cyrl + 3850, 410, // yna -> Plrd + 3854, 100, // ynk -> Cyrl + 3858, 210, // yoi -> Jpan + 3862, 530, // yoy -> Thai + 3866, 100, // yrk -> Cyrl + 3870, 575, // ysd -> Yiii + 3874, 575, // ysn -> Yiii + 3878, 575, // ysp -> Yiii + 3882, 100, // ysr -> Cyrl + 3886, 410, // ysy -> Plrd + 3890, 185, // yud -> Hebr + 3894, 180, // yue -> Hant + 3898, 175, // yue_CN -> Hans + 3905, 100, // yug -> Cyrl + 3909, 100, // yux -> Cyrl + 3913, 410, // ywq -> Plrd + 3917, 410, // ywu -> Plrd + 3921, 535, // zau -> Tibt + 3925, 10, // zba -> Arab + 3929, 170, // zch -> Hani + 3933, 10, // zdj -> Arab + 3937, 170, // zeh -> Hani + 3941, 520, // zen -> Tfng + 3945, 170, // zgb -> Hani + 3949, 520, // zgh -> Tfng + 3953, 170, // zgm -> Hani + 3957, 170, // zgn -> Hani + 3961, 175, // zh -> Hans + 3964, 180, // zh_AU -> Hant + 3970, 180, // zh_BN -> Hant + 3976, 180, // zh_GB -> Hant + 3982, 180, // zh_GF -> Hant + 3988, 180, // zh_HK -> Hant + 3994, 180, // zh_ID -> Hant + 4000, 180, // zh_MO -> Hant + 4006, 180, // zh_PA -> Hant + 4012, 180, // zh_PF -> Hant + 4018, 180, // zh_PH -> Hant + 4024, 180, // zh_SR -> Hant + 4030, 180, // zh_TH -> Hant + 4036, 180, // zh_TW -> Hant + 4042, 180, // zh_US -> Hant + 4048, 180, // zh_VN -> Hant + 4054, 170, // zhd -> Hani + 4058, 365, // zhx -> Nshu + 4062, 100, // zko -> Cyrl + 4066, 240, // zkt -> Kits + 4070, 100, // zkz -> Cyrl + 4074, 170, // zlj -> Hani + 4078, 170, // zln -> Hani + 4082, 170, // zlq -> Hani + 4086, 170, // zqe -> Hani + 4090, 185, // zrp -> Hebr + 4094, 10, // zum -> Arab + 4098, 170, // zyg -> Hani + 4102, 170, // zyn -> Hani + 4106, 170, // zzj -> Hani }; //====================================================================== @@ -1150,35 +1132,36 @@ const char parentLocaleChars[] = "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\0no_NO\0" - "pa_Arab\0pt_AO\0pt_CH\0pt_CV\0pt_FR\0pt_GQ\0pt_GW\0pt_LU\0pt_MO\0" - "pt_MZ\0pt_PT\0pt_ST\0pt_TL\0root\0sat_Deva\0sd_Deva\0sd_Khoj\0" - "sd_Sind\0shi_Latn\0so_Arab\0sr_Latn\0sw_Arab\0tg_Arab\0ug_Cyrl\0" - "uz_Arab\0uz_Cyrl\0vai_Latn\0wo_Arab\0yo_Arab\0yue_Hans\0zh_Hant\0" - "zh_Hant_HK\0zh_Hant_MO\0"; + "en_GI\0en_GM\0en_GY\0en_HK\0en_ID\0en_IE\0en_IL\0en_IM\0en_IN\0" + "en_IO\0en_JE\0en_JM\0en_KE\0en_KI\0en_KN\0en_KY\0en_LC\0en_LR\0" + "en_LS\0en_MG\0en_MO\0en_MS\0en_MT\0en_MU\0en_MV\0en_MW\0en_MY\0" + "en_NA\0en_NF\0en_NG\0en_NL\0en_NR\0en_NU\0en_NZ\0en_PG\0en_PK\0" + "en_PN\0en_PW\0en_RW\0en_SB\0en_SC\0en_SD\0en_SE\0en_SG\0en_SH\0" + "en_SI\0en_SL\0en_SS\0en_SX\0en_SZ\0en_Shaw\0en_TC\0en_TK\0en_TO\0" + "en_TT\0en_TV\0en_TZ\0en_UG\0en_VC\0en_VG\0en_VU\0en_WS\0en_ZA\0" + "en_ZM\0en_ZW\0es_419\0es_AR\0es_BO\0es_BR\0es_BZ\0es_CL\0es_CO\0" + "es_CR\0es_CU\0es_DO\0es_EC\0es_GT\0es_HN\0es_JP\0es_MX\0es_NI\0" + "es_PA\0es_PE\0es_PR\0es_PY\0es_SV\0es_US\0es_UY\0es_VE\0ff_Adlm\0" + "ff_Arab\0fr_HT\0ha_Arab\0hi_Latn\0ht\0iu_Latn\0kk_Arab\0ks_Deva\0" + "ku_Arab\0kxv_Deva\0kxv_Orya\0kxv_Telu\0ky_Arab\0ky_Latn\0ml_Arab\0" + "mn_Mong\0mni_Mtei\0ms_Arab\0nb\0nn\0no\0no_NO\0pa_Arab\0pt_AO\0" + "pt_CH\0pt_CV\0pt_FR\0pt_GQ\0pt_GW\0pt_LU\0pt_MO\0pt_MZ\0pt_PT\0" + "pt_ST\0pt_TL\0root\0sat_Deva\0sd_Deva\0sd_Khoj\0sd_Sind\0shi_Latn\0" + "so_Arab\0sr_Latn\0sw_Arab\0tg_Arab\0ug_Cyrl\0uz_Arab\0uz_Cyrl\0" + "vai_Latn\0wo_Arab\0yo_Arab\0yue_Hans\0zh_Hant\0zh_Hant_HK\0zh_Hant_MO\0" + ""; const int32_t parentLocaleTable[] = { - 0, 1023, // az_Arab -> root - 8, 1023, // az_Cyrl -> root - 16, 1023, // bal_Latn -> root - 25, 1023, // blt_Latn -> root - 34, 1023, // bm_Nkoo -> root - 42, 1023, // bs_Cyrl -> root - 50, 1023, // byn_Latn -> root - 59, 1023, // cu_Glag -> root - 67, 1023, // dje_Arab -> root - 76, 1023, // dyo_Arab -> root + 0, 1062, // az_Arab -> root + 8, 1062, // az_Cyrl -> root + 16, 1062, // bal_Latn -> root + 25, 1062, // blt_Latn -> root + 34, 1062, // bm_Nkoo -> root + 42, 1062, // bs_Cyrl -> root + 50, 1062, // byn_Latn -> root + 59, 1062, // cu_Glag -> root + 67, 1062, // dje_Arab -> root + 76, 1062, // dyo_Arab -> root 92, 85, // en_150 -> en_001 99, 85, // en_AG -> en_001 105, 85, // en_AI -> en_001 @@ -1200,7 +1183,7 @@ const int32_t parentLocaleTable[] = { 201, 85, // en_DG -> en_001 207, 92, // en_DK -> en_150 213, 85, // en_DM -> en_001 - 219, 1023, // en_Dsrt -> root + 219, 1062, // en_Dsrt -> root 227, 85, // en_ER -> en_001 233, 92, // en_FI -> en_150 239, 85, // en_FJ -> en_001 @@ -1214,136 +1197,141 @@ const int32_t parentLocaleTable[] = { 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, 1023, // 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, 1023, // ff_Adlm -> root - 814, 1023, // ff_Arab -> root - 828, 1023, // ha_Arab -> root - 836, 323, // hi_Latn -> en_IN - 844, 822, // ht -> fr_HT - 847, 1023, // iu_Latn -> root - 855, 1023, // kk_Arab -> root - 863, 1023, // ks_Deva -> root - 871, 1023, // ku_Arab -> root - 879, 1023, // ky_Arab -> root - 887, 1023, // ky_Latn -> root - 895, 1023, // ml_Arab -> root - 903, 1023, // mn_Mong -> root - 911, 1023, // mni_Mtei -> root - 920, 1023, // ms_Arab -> root - 928, 934, // nb -> no - 931, 934, // nn -> no - 937, 934, // no_NO -> no - 943, 1023, // pa_Arab -> root - 951, 1005, // pt_AO -> pt_PT - 957, 1005, // pt_CH -> pt_PT - 963, 1005, // pt_CV -> pt_PT - 969, 1005, // pt_FR -> pt_PT - 975, 1005, // pt_GQ -> pt_PT - 981, 1005, // pt_GW -> pt_PT - 987, 1005, // pt_LU -> pt_PT - 993, 1005, // pt_MO -> pt_PT - 999, 1005, // pt_MZ -> pt_PT - 1011, 1005, // pt_ST -> pt_PT - 1017, 1005, // pt_TL -> pt_PT - 1028, 1023, // sat_Deva -> root - 1037, 1023, // sd_Deva -> root - 1045, 1023, // sd_Khoj -> root - 1053, 1023, // sd_Sind -> root - 1061, 1023, // shi_Latn -> root - 1070, 1023, // so_Arab -> root - 1078, 1023, // sr_Latn -> root - 1086, 1023, // sw_Arab -> root - 1094, 1023, // tg_Arab -> root - 1102, 1023, // ug_Cyrl -> root - 1110, 1023, // uz_Arab -> root - 1118, 1023, // uz_Cyrl -> root - 1126, 1023, // vai_Latn -> root - 1135, 1023, // wo_Arab -> root - 1143, 1023, // yo_Arab -> root - 1151, 1023, // yue_Hans -> root - 1160, 1023, // zh_Hant -> root - 1179, 1168, // zh_Hant_MO -> zh_Hant_HK + 305, 85, // en_ID -> en_001 + 311, 85, // en_IE -> en_001 + 317, 85, // en_IL -> en_001 + 323, 85, // en_IM -> en_001 + 329, 85, // en_IN -> en_001 + 335, 85, // en_IO -> en_001 + 341, 85, // en_JE -> en_001 + 347, 85, // en_JM -> en_001 + 353, 85, // en_KE -> en_001 + 359, 85, // en_KI -> en_001 + 365, 85, // en_KN -> en_001 + 371, 85, // en_KY -> en_001 + 377, 85, // en_LC -> en_001 + 383, 85, // en_LR -> en_001 + 389, 85, // en_LS -> en_001 + 395, 85, // en_MG -> en_001 + 401, 85, // en_MO -> en_001 + 407, 85, // en_MS -> en_001 + 413, 85, // en_MT -> en_001 + 419, 85, // en_MU -> en_001 + 425, 85, // en_MV -> en_001 + 431, 85, // en_MW -> en_001 + 437, 85, // en_MY -> en_001 + 443, 85, // en_NA -> en_001 + 449, 85, // en_NF -> en_001 + 455, 85, // en_NG -> en_001 + 461, 92, // en_NL -> en_150 + 467, 85, // en_NR -> en_001 + 473, 85, // en_NU -> en_001 + 479, 85, // en_NZ -> en_001 + 485, 85, // en_PG -> en_001 + 491, 85, // en_PK -> en_001 + 497, 85, // en_PN -> en_001 + 503, 85, // en_PW -> en_001 + 509, 85, // en_RW -> en_001 + 515, 85, // en_SB -> en_001 + 521, 85, // en_SC -> en_001 + 527, 85, // en_SD -> en_001 + 533, 92, // en_SE -> en_150 + 539, 85, // en_SG -> en_001 + 545, 85, // en_SH -> en_001 + 551, 92, // en_SI -> en_150 + 557, 85, // en_SL -> en_001 + 563, 85, // en_SS -> en_001 + 569, 85, // en_SX -> en_001 + 575, 85, // en_SZ -> en_001 + 581, 1062, // en_Shaw -> root + 589, 85, // en_TC -> en_001 + 595, 85, // en_TK -> en_001 + 601, 85, // en_TO -> en_001 + 607, 85, // en_TT -> en_001 + 613, 85, // en_TV -> en_001 + 619, 85, // en_TZ -> en_001 + 625, 85, // en_UG -> en_001 + 631, 85, // en_VC -> en_001 + 637, 85, // en_VG -> en_001 + 643, 85, // en_VU -> en_001 + 649, 85, // en_WS -> en_001 + 655, 85, // en_ZA -> en_001 + 661, 85, // en_ZM -> en_001 + 667, 85, // en_ZW -> en_001 + 680, 673, // es_AR -> es_419 + 686, 673, // es_BO -> es_419 + 692, 673, // es_BR -> es_419 + 698, 673, // es_BZ -> es_419 + 704, 673, // es_CL -> es_419 + 710, 673, // es_CO -> es_419 + 716, 673, // es_CR -> es_419 + 722, 673, // es_CU -> es_419 + 728, 673, // es_DO -> es_419 + 734, 673, // es_EC -> es_419 + 740, 673, // es_GT -> es_419 + 746, 673, // es_HN -> es_419 + 752, 673, // es_JP -> es_419 + 758, 673, // es_MX -> es_419 + 764, 673, // es_NI -> es_419 + 770, 673, // es_PA -> es_419 + 776, 673, // es_PE -> es_419 + 782, 673, // es_PR -> es_419 + 788, 673, // es_PY -> es_419 + 794, 673, // es_SV -> es_419 + 800, 673, // es_US -> es_419 + 806, 673, // es_UY -> es_419 + 812, 673, // es_VE -> es_419 + 818, 1062, // ff_Adlm -> root + 826, 1062, // ff_Arab -> root + 840, 1062, // ha_Arab -> root + 848, 329, // hi_Latn -> en_IN + 856, 834, // ht -> fr_HT + 859, 1062, // iu_Latn -> root + 867, 1062, // kk_Arab -> root + 875, 1062, // ks_Deva -> root + 883, 1062, // ku_Arab -> root + 891, 1062, // kxv_Deva -> root + 900, 1062, // kxv_Orya -> root + 909, 1062, // kxv_Telu -> root + 918, 1062, // ky_Arab -> root + 926, 1062, // ky_Latn -> root + 934, 1062, // ml_Arab -> root + 942, 1062, // mn_Mong -> root + 950, 1062, // mni_Mtei -> root + 959, 1062, // ms_Arab -> root + 967, 973, // nb -> no + 970, 973, // nn -> no + 976, 973, // no_NO -> no + 982, 1062, // pa_Arab -> root + 990, 1044, // pt_AO -> pt_PT + 996, 1044, // pt_CH -> pt_PT + 1002, 1044, // pt_CV -> pt_PT + 1008, 1044, // pt_FR -> pt_PT + 1014, 1044, // pt_GQ -> pt_PT + 1020, 1044, // pt_GW -> pt_PT + 1026, 1044, // pt_LU -> pt_PT + 1032, 1044, // pt_MO -> pt_PT + 1038, 1044, // pt_MZ -> pt_PT + 1050, 1044, // pt_ST -> pt_PT + 1056, 1044, // pt_TL -> pt_PT + 1067, 1062, // sat_Deva -> root + 1076, 1062, // sd_Deva -> root + 1084, 1062, // sd_Khoj -> root + 1092, 1062, // sd_Sind -> root + 1100, 1062, // shi_Latn -> root + 1109, 1062, // so_Arab -> root + 1117, 1062, // sr_Latn -> root + 1125, 1062, // sw_Arab -> root + 1133, 1062, // tg_Arab -> root + 1141, 1062, // ug_Cyrl -> root + 1149, 1062, // uz_Arab -> root + 1157, 1062, // uz_Cyrl -> root + 1165, 1062, // vai_Latn -> root + 1174, 1062, // wo_Arab -> root + 1182, 1062, // yo_Arab -> root + 1190, 1062, // yue_Hans -> root + 1199, 1062, // zh_Hant -> root + 1218, 1207, // zh_Hant_MO -> zh_Hant_HK }; diff --git a/contrib/libs/icu/common/localematcher.cpp b/contrib/libs/icu/common/localematcher.cpp index 5f8c703df7..8aae596bc8 100644 --- a/contrib/libs/icu/common/localematcher.cpp +++ b/contrib/libs/icu/common/localematcher.cpp @@ -4,6 +4,8 @@ // localematcher.cpp // created: 2019may08 Markus W. Scherer +#include <optional> + #include "unicode/utypes.h" #include "unicode/localebuilder.h" #include "unicode/localematcher.h" @@ -302,12 +304,12 @@ LocaleMatcher LocaleMatcher::Builder::build(UErrorCode &errorCode) const { namespace { -LSR getMaximalLsrOrUnd(const XLikelySubtags &likelySubtags, const Locale &locale, +LSR getMaximalLsrOrUnd(const LikelySubtags &likelySubtags, const Locale &locale, UErrorCode &errorCode) { if (U_FAILURE(errorCode) || locale.isBogus() || *locale.getName() == 0 /* "und" */) { return UND_LSR; } else { - return likelySubtags.makeMaximizedLsrFrom(locale, errorCode); + return likelySubtags.makeMaximizedLsrFrom(locale, false, errorCode); } } @@ -338,7 +340,7 @@ int32_t LocaleMatcher::putIfAbsent(const LSR &lsr, int32_t i, int32_t suppLength } LocaleMatcher::LocaleMatcher(const Builder &builder, UErrorCode &errorCode) : - likelySubtags(*XLikelySubtags::getSingleton(errorCode)), + likelySubtags(*LikelySubtags::getSingleton(errorCode)), localeDistance(*LocaleDistance::getSingleton(errorCode)), thresholdDistance(builder.thresholdDistance_), demotionPerDesiredLocale(0), @@ -551,7 +553,7 @@ LocaleMatcher &LocaleMatcher::operator=(LocaleMatcher &&src) noexcept { class LocaleLsrIterator { public: - LocaleLsrIterator(const XLikelySubtags &likelySubtags, Locale::Iterator &locales, + LocaleLsrIterator(const LikelySubtags &likelySubtags, Locale::Iterator &locales, ULocMatchLifetime lifetime) : likelySubtags(likelySubtags), locales(locales), lifetime(lifetime) {} @@ -596,7 +598,7 @@ public: } private: - const XLikelySubtags &likelySubtags; + const LikelySubtags &likelySubtags; Locale::Iterator &locales; ULocMatchLifetime lifetime; const Locale *current = nullptr, *remembered = nullptr; @@ -605,10 +607,11 @@ private: const Locale *LocaleMatcher::getBestMatch(const Locale &desiredLocale, UErrorCode &errorCode) const { if (U_FAILURE(errorCode)) { return nullptr; } - int32_t suppIndex = getBestSuppIndex( + std::optional<int32_t> suppIndex = getBestSuppIndex( getMaximalLsrOrUnd(likelySubtags, desiredLocale, errorCode), nullptr, errorCode); - return U_SUCCESS(errorCode) && suppIndex >= 0 ? supportedLocales[suppIndex] : defaultLocale; + return U_SUCCESS(errorCode) && suppIndex.has_value() ? supportedLocales[*suppIndex] + : defaultLocale; } const Locale *LocaleMatcher::getBestMatch(Locale::Iterator &desiredLocales, @@ -618,12 +621,14 @@ const Locale *LocaleMatcher::getBestMatch(Locale::Iterator &desiredLocales, return defaultLocale; } LocaleLsrIterator lsrIter(likelySubtags, desiredLocales, ULOCMATCH_TEMPORARY_LOCALES); - int32_t suppIndex = getBestSuppIndex(lsrIter.next(errorCode), &lsrIter, errorCode); - return U_SUCCESS(errorCode) && suppIndex >= 0 ? supportedLocales[suppIndex] : defaultLocale; + std::optional<int32_t> suppIndex = getBestSuppIndex(lsrIter.next(errorCode), &lsrIter, errorCode); + return U_SUCCESS(errorCode) && suppIndex.has_value() ? supportedLocales[*suppIndex] + : defaultLocale; } const Locale *LocaleMatcher::getBestMatchForListString( StringPiece desiredLocaleList, UErrorCode &errorCode) const { + if (U_FAILURE(errorCode)) { return nullptr; } LocalePriorityList list(desiredLocaleList, errorCode); LocalePriorityList::Iterator iter = list.iterator(); return getBestMatch(iter, errorCode); @@ -634,13 +639,13 @@ LocaleMatcher::Result LocaleMatcher::getBestMatchResult( if (U_FAILURE(errorCode)) { return Result(nullptr, defaultLocale, -1, -1, false); } - int32_t suppIndex = getBestSuppIndex( + std::optional<int32_t> suppIndex = getBestSuppIndex( getMaximalLsrOrUnd(likelySubtags, desiredLocale, errorCode), nullptr, errorCode); - if (U_FAILURE(errorCode) || suppIndex < 0) { + if (U_FAILURE(errorCode) || !suppIndex.has_value()) { return Result(nullptr, defaultLocale, -1, -1, false); } else { - return Result(&desiredLocale, supportedLocales[suppIndex], 0, suppIndex, false); + return Result(&desiredLocale, supportedLocales[*suppIndex], 0, *suppIndex, false); } } @@ -650,18 +655,19 @@ LocaleMatcher::Result LocaleMatcher::getBestMatchResult( 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) { + std::optional<int32_t> suppIndex = getBestSuppIndex(lsrIter.next(errorCode), &lsrIter, errorCode); + if (U_FAILURE(errorCode) || !suppIndex.has_value()) { return Result(nullptr, defaultLocale, -1, -1, false); } else { - return Result(lsrIter.orphanRemembered(), supportedLocales[suppIndex], - lsrIter.getBestDesiredIndex(), suppIndex, true); + return Result(lsrIter.orphanRemembered(), supportedLocales[*suppIndex], + lsrIter.getBestDesiredIndex(), *suppIndex, true); } } -int32_t LocaleMatcher::getBestSuppIndex(LSR desiredLSR, LocaleLsrIterator *remainingIter, - UErrorCode &errorCode) const { - if (U_FAILURE(errorCode)) { return -1; } +std::optional<int32_t> LocaleMatcher::getBestSuppIndex(LSR desiredLSR, + LocaleLsrIterator *remainingIter, + UErrorCode &errorCode) const { + if (U_FAILURE(errorCode)) { return std::nullopt; } int32_t desiredIndex = 0; int32_t bestSupportedLsrIndex = -1; for (int32_t bestShiftedDistance = LocaleDistance::shiftDistance(thresholdDistance);;) { @@ -684,7 +690,7 @@ int32_t LocaleMatcher::getBestSuppIndex(LSR desiredLSR, LocaleLsrIterator *remai bestShiftedDistance = LocaleDistance::getShiftedDistance(bestIndexAndDistance); if (remainingIter != nullptr) { remainingIter->rememberCurrent(desiredIndex, errorCode); - if (U_FAILURE(errorCode)) { return -1; } + if (U_FAILURE(errorCode)) { return std::nullopt; } } bestSupportedLsrIndex = LocaleDistance::getIndex(bestIndexAndDistance); } @@ -695,20 +701,21 @@ int32_t LocaleMatcher::getBestSuppIndex(LSR desiredLSR, LocaleLsrIterator *remai break; } desiredLSR = remainingIter->next(errorCode); - if (U_FAILURE(errorCode)) { return -1; } + if (U_FAILURE(errorCode)) { return std::nullopt; } ++desiredIndex; } if (bestSupportedLsrIndex < 0) { // no good match - return -1; + return std::nullopt; } return supportedIndexes[bestSupportedLsrIndex]; } UBool LocaleMatcher::isMatch(const Locale &desired, const Locale &supported, UErrorCode &errorCode) const { + if (U_FAILURE(errorCode)) { return false; } LSR suppLSR = getMaximalLsrOrUnd(likelySubtags, supported, errorCode); - if (U_FAILURE(errorCode)) { return 0; } + if (U_FAILURE(errorCode)) { return false; } const LSR *pSuppLSR = &suppLSR; int32_t indexAndDistance = localeDistance.getBestIndexAndDistance( getMaximalLsrOrUnd(likelySubtags, desired, errorCode), @@ -718,9 +725,10 @@ UBool LocaleMatcher::isMatch(const Locale &desired, const Locale &supported, } double LocaleMatcher::internalMatch(const Locale &desired, const Locale &supported, UErrorCode &errorCode) const { + if (U_FAILURE(errorCode)) { return 0.; } // Returns the inverse of the distance: That is, 1-distance(desired, supported). LSR suppLSR = getMaximalLsrOrUnd(likelySubtags, supported, errorCode); - if (U_FAILURE(errorCode)) { return 0; } + if (U_FAILURE(errorCode)) { return 0.; } const LSR *pSuppLSR = &suppLSR; int32_t indexAndDistance = localeDistance.getBestIndexAndDistance( getMaximalLsrOrUnd(likelySubtags, desired, errorCode), diff --git a/contrib/libs/icu/common/localeprioritylist.cpp b/contrib/libs/icu/common/localeprioritylist.cpp index e5ba0a3c77..8ca70b1432 100644 --- a/contrib/libs/icu/common/localeprioritylist.cpp +++ b/contrib/libs/icu/common/localeprioritylist.cpp @@ -21,13 +21,13 @@ U_NAMESPACE_BEGIN namespace { int32_t hashLocale(const UHashTok token) { - auto *locale = static_cast<const Locale *>(token.pointer); + const auto* locale = static_cast<const Locale*>(token.pointer); return locale->hashCode(); } UBool compareLocales(const UHashTok t1, const UHashTok t2) { - auto *l1 = static_cast<const Locale *>(t1.pointer); - auto *l2 = static_cast<const Locale *>(t2.pointer); + const auto* l1 = static_cast<const Locale*>(t1.pointer); + const auto* l2 = static_cast<const Locale*>(t2.pointer); return *l1 == *l2; } diff --git a/contrib/libs/icu/common/locavailable.cpp b/contrib/libs/icu/common/locavailable.cpp index 0ea2093988..4a2600e88c 100644 --- a/contrib/libs/icu/common/locavailable.cpp +++ b/contrib/libs/icu/common/locavailable.cpp @@ -39,14 +39,10 @@ static icu::Locale* availableLocaleList = nullptr; static int32_t availableLocaleListCount; static icu::UInitOnce gInitOnceLocale {}; -U_NAMESPACE_END - -U_CDECL_BEGIN +namespace { -static UBool U_CALLCONV locale_available_cleanup() +UBool U_CALLCONV locale_available_cleanup() { - U_NAMESPACE_USE - if (availableLocaleList) { delete []availableLocaleList; availableLocaleList = nullptr; @@ -57,9 +53,7 @@ static UBool U_CALLCONV locale_available_cleanup() return true; } -U_CDECL_END - -U_NAMESPACE_BEGIN +} // namespace void U_CALLCONV locale_available_init() { // This function is a friend of class Locale. @@ -107,10 +101,9 @@ icu::UInitOnce ginstalledLocalesInitOnce {}; class AvailableLocalesSink : public ResourceSink { public: void put(const char *key, ResourceValue &value, UBool /*noFallback*/, UErrorCode &status) override { + if (U_FAILURE(status)) { return; } ResourceTable resIndexTable = value.getTable(status); - if (U_FAILURE(status)) { - return; - } + if (U_FAILURE(status)) { return; } for (int32_t i = 0; resIndexTable.getKeyAndValue(i, key, value); ++i) { ULocAvailableType type; if (uprv_strcmp(key, "InstalledLocales") == 0) { @@ -144,7 +137,8 @@ class AvailableLocalesStringEnumeration : public StringEnumeration { AvailableLocalesStringEnumeration(ULocAvailableType type) : fType(type) { } - const char* next(int32_t *resultLength, UErrorCode&) override { + const char* next(int32_t *resultLength, UErrorCode &status) override { + if (U_FAILURE(status)) { return nullptr; } ULocAvailableType actualType = fType; int32_t actualIndex = fIndex++; @@ -176,11 +170,13 @@ class AvailableLocalesStringEnumeration : public StringEnumeration { return result; } - void reset(UErrorCode&) override { + void reset(UErrorCode &status) override { + if (U_FAILURE(status)) { return; } fIndex = 0; } - int32_t count(UErrorCode&) const override { + int32_t count(UErrorCode &status) const override { + if (U_FAILURE(status)) { return 0; } if (fType == ULOC_AVAILABLE_WITH_LEGACY_ALIASES) { return gAvailableLocaleCounts[ULOC_AVAILABLE_DEFAULT] + gAvailableLocaleCounts[ULOC_AVAILABLE_ONLY_LEGACY_ALIASES]; @@ -196,7 +192,7 @@ class AvailableLocalesStringEnumeration : public StringEnumeration { /* ### Get available **************************************************/ -static UBool U_CALLCONV uloc_cleanup() { +UBool U_CALLCONV uloc_cleanup() { for (int32_t i = 0; i < UPRV_LENGTHOF(gAvailableLocaleNames); i++) { uprv_free(gAvailableLocaleNames[i]); gAvailableLocaleNames[i] = nullptr; @@ -209,7 +205,7 @@ static UBool U_CALLCONV uloc_cleanup() { // Load Installed Locales. This function will be called exactly once // via the initOnce mechanism. -static void U_CALLCONV loadInstalledLocales(UErrorCode& status) { +void U_CALLCONV loadInstalledLocales(UErrorCode& status) { ucln_common_registerCleanup(UCLN_COMMON_ULOC, uloc_cleanup); icu::LocalUResourceBundlePointer rb(ures_openDirect(nullptr, "res_index", &status)); @@ -267,4 +263,3 @@ uloc_openAvailableByType(ULocAvailableType type, UErrorCode* status) { } return uenum_openFromStringEnumeration(result.orphan(), status); } - diff --git a/contrib/libs/icu/common/locbased.cpp b/contrib/libs/icu/common/locbased.cpp index adcf2f843c..832bc3e88b 100644 --- a/contrib/libs/icu/common/locbased.cpp +++ b/contrib/libs/icu/common/locbased.cpp @@ -17,7 +17,7 @@ U_NAMESPACE_BEGIN Locale LocaleBased::getLocale(ULocDataLocaleType type, UErrorCode& status) const { const char* id = getLocaleID(type, status); - return Locale((id != 0) ? id : ""); + return Locale(id != nullptr ? id : ""); } const char* LocaleBased::getLocaleID(ULocDataLocaleType type, UErrorCode& status) const { @@ -37,11 +37,11 @@ const char* LocaleBased::getLocaleID(ULocDataLocaleType type, UErrorCode& status } void LocaleBased::setLocaleIDs(const char* validID, const char* actualID) { - if (validID != 0) { + if (validID != nullptr) { uprv_strncpy(valid, validID, ULOC_FULLNAME_CAPACITY); valid[ULOC_FULLNAME_CAPACITY-1] = 0; // always terminate } - if (actualID != 0) { + if (actualID != nullptr) { uprv_strncpy(actual, actualID, ULOC_FULLNAME_CAPACITY); actual[ULOC_FULLNAME_CAPACITY-1] = 0; // always terminate } diff --git a/contrib/libs/icu/common/locdispnames.cpp b/contrib/libs/icu/common/locdispnames.cpp index 3ec1b81c81..0be069357a 100644 --- a/contrib/libs/icu/common/locdispnames.cpp +++ b/contrib/libs/icu/common/locdispnames.cpp @@ -26,7 +26,6 @@ #include "unicode/uloc.h" #include "unicode/ures.h" #include "unicode/ustring.h" -#include "bytesinkutil.h" #include "charstr.h" #include "cmemory.h" #include "cstring.h" @@ -60,7 +59,7 @@ Locale::getDisplayLanguage(const Locale &displayLocale, int32_t length; buffer=result.getBuffer(ULOC_FULLNAME_CAPACITY); - if(buffer==0) { + if (buffer == nullptr) { result.truncate(0); return result; } @@ -72,7 +71,7 @@ Locale::getDisplayLanguage(const Locale &displayLocale, if(errorCode==U_BUFFER_OVERFLOW_ERROR) { buffer=result.getBuffer(length); - if(buffer==0) { + if (buffer == nullptr) { result.truncate(0); return result; } @@ -100,7 +99,7 @@ Locale::getDisplayScript(const Locale &displayLocale, int32_t length; buffer=result.getBuffer(ULOC_FULLNAME_CAPACITY); - if(buffer==0) { + if (buffer == nullptr) { result.truncate(0); return result; } @@ -112,7 +111,7 @@ Locale::getDisplayScript(const Locale &displayLocale, if(errorCode==U_BUFFER_OVERFLOW_ERROR) { buffer=result.getBuffer(length); - if(buffer==0) { + if (buffer == nullptr) { result.truncate(0); return result; } @@ -140,7 +139,7 @@ Locale::getDisplayCountry(const Locale &displayLocale, int32_t length; buffer=result.getBuffer(ULOC_FULLNAME_CAPACITY); - if(buffer==0) { + if (buffer == nullptr) { result.truncate(0); return result; } @@ -152,7 +151,7 @@ Locale::getDisplayCountry(const Locale &displayLocale, if(errorCode==U_BUFFER_OVERFLOW_ERROR) { buffer=result.getBuffer(length); - if(buffer==0) { + if (buffer == nullptr) { result.truncate(0); return result; } @@ -180,7 +179,7 @@ Locale::getDisplayVariant(const Locale &displayLocale, int32_t length; buffer=result.getBuffer(ULOC_FULLNAME_CAPACITY); - if(buffer==0) { + if (buffer == nullptr) { result.truncate(0); return result; } @@ -192,7 +191,7 @@ Locale::getDisplayVariant(const Locale &displayLocale, if(errorCode==U_BUFFER_OVERFLOW_ERROR) { buffer=result.getBuffer(length); - if(buffer==0) { + if (buffer == nullptr) { result.truncate(0); return result; } @@ -220,7 +219,7 @@ Locale::getDisplayName(const Locale &displayLocale, int32_t length; buffer=result.getBuffer(ULOC_FULLNAME_CAPACITY); - if(buffer==0) { + if (buffer == nullptr) { result.truncate(0); return result; } @@ -232,7 +231,7 @@ Locale::getDisplayName(const Locale &displayLocale, if(errorCode==U_BUFFER_OVERFLOW_ERROR) { buffer=result.getBuffer(length); - if(buffer==0) { + if (buffer == nullptr) { result.truncate(0); return result; } @@ -276,50 +275,53 @@ U_NAMESPACE_END U_NAMESPACE_USE +namespace { + /* ### Constants **************************************************/ /* These strings describe the resources we attempt to load from the locale ResourceBundle data file.*/ -static const char _kLanguages[] = "Languages"; -static const char _kScripts[] = "Scripts"; -static const char _kScriptsStandAlone[] = "Scripts%stand-alone"; -static const char _kCountries[] = "Countries"; -static const char _kVariants[] = "Variants"; -static const char _kKeys[] = "Keys"; -static const char _kTypes[] = "Types"; -//static const char _kRootName[] = "root"; -static const char _kCurrency[] = "currency"; -static const char _kCurrencies[] = "Currencies"; -static const char _kLocaleDisplayPattern[] = "localeDisplayPattern"; -static const char _kPattern[] = "pattern"; -static const char _kSeparator[] = "separator"; +constexpr char _kLanguages[] = "Languages"; +constexpr char _kScripts[] = "Scripts"; +constexpr char _kScriptsStandAlone[] = "Scripts%stand-alone"; +constexpr char _kCountries[] = "Countries"; +constexpr char _kVariants[] = "Variants"; +constexpr char _kKeys[] = "Keys"; +constexpr char _kTypes[] = "Types"; +//constexpr char _kRootName[] = "root"; +constexpr char _kCurrency[] = "currency"; +constexpr char _kCurrencies[] = "Currencies"; +constexpr char _kLocaleDisplayPattern[] = "localeDisplayPattern"; +constexpr char _kPattern[] = "pattern"; +constexpr char _kSeparator[] = "separator"; /* ### Display name **************************************************/ -static int32_t +int32_t _getStringOrCopyKey(const char *path, const char *locale, const char *tableKey, const char* subTableKey, const char *itemKey, const char *substitute, char16_t *dest, int32_t destCapacity, - UErrorCode *pErrorCode) { + UErrorCode &errorCode) { + if (U_FAILURE(errorCode)) { return 0; } const char16_t *s = nullptr; int32_t length = 0; if(itemKey==nullptr) { /* top-level item: normal resource bundle access */ - icu::LocalUResourceBundlePointer rb(ures_open(path, locale, pErrorCode)); + icu::LocalUResourceBundlePointer rb(ures_open(path, locale, &errorCode)); - if(U_SUCCESS(*pErrorCode)) { - s=ures_getStringByKey(rb.getAlias(), tableKey, &length, pErrorCode); + if(U_SUCCESS(errorCode)) { + s=ures_getStringByKey(rb.getAlias(), tableKey, &length, &errorCode); /* see comment about closing rb near "return item;" in _res_getTableStringWithFallback() */ } } else { bool isLanguageCode = (uprv_strncmp(tableKey, _kLanguages, 9) == 0); /* Language code should not be a number. If it is, set the error code. */ if (isLanguageCode && uprv_strtol(itemKey, nullptr, 10)) { - *pErrorCode = U_MISSING_RESOURCE_ERROR; + errorCode = U_MISSING_RESOURCE_ERROR; } else { /* second-level item, use special fallback */ s=uloc_getTableStringWithFallback(path, locale, @@ -327,22 +329,22 @@ _getStringOrCopyKey(const char *path, const char *locale, subTableKey, itemKey, &length, - pErrorCode); - if (U_FAILURE(*pErrorCode) && isLanguageCode && itemKey != nullptr) { + &errorCode); + if (U_FAILURE(errorCode) && isLanguageCode && itemKey != nullptr) { // convert itemKey locale code to canonical form and try again, ICU-20870 - *pErrorCode = U_ZERO_ERROR; + errorCode = U_ZERO_ERROR; Locale canonKey = Locale::createCanonical(itemKey); s=uloc_getTableStringWithFallback(path, locale, tableKey, subTableKey, canonKey.getName(), &length, - pErrorCode); + &errorCode); } } } - if(U_SUCCESS(*pErrorCode)) { + if(U_SUCCESS(errorCode)) { int32_t copyLength=uprv_min(length, destCapacity); if(copyLength>0 && s != nullptr) { u_memcpy(dest, s, copyLength); @@ -351,67 +353,63 @@ _getStringOrCopyKey(const char *path, const char *locale, /* no string from a resource bundle: convert the substitute */ length=(int32_t)uprv_strlen(substitute); u_charsToUChars(substitute, dest, uprv_min(length, destCapacity)); - *pErrorCode=U_USING_DEFAULT_WARNING; + errorCode = U_USING_DEFAULT_WARNING; } - return u_terminateUChars(dest, destCapacity, length, pErrorCode); + return u_terminateUChars(dest, destCapacity, length, &errorCode); } -typedef int32_t U_CALLCONV UDisplayNameGetter(const char *, char *, int32_t, UErrorCode *); +using UDisplayNameGetter = icu::CharString(const char*, UErrorCode&); -static int32_t +int32_t _getDisplayNameForComponent(const char *locale, const char *displayLocale, char16_t *dest, int32_t destCapacity, UDisplayNameGetter *getter, const char *tag, - UErrorCode *pErrorCode) { - char localeBuffer[ULOC_FULLNAME_CAPACITY*4]; - int32_t length; + UErrorCode &errorCode) { + if (U_FAILURE(errorCode)) { return 0; } UErrorCode localStatus; const char* root = nullptr; - /* argument checking */ - if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) { - return 0; - } - if(destCapacity<0 || (destCapacity>0 && dest==nullptr)) { - *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR; + errorCode = U_ILLEGAL_ARGUMENT_ERROR; return 0; } localStatus = U_ZERO_ERROR; - length=(*getter)(locale, localeBuffer, sizeof(localeBuffer), &localStatus); - if(U_FAILURE(localStatus) || localStatus==U_STRING_NOT_TERMINATED_WARNING) { - *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR; + icu::CharString localeBuffer = (*getter)(locale, localStatus); + if (U_FAILURE(localStatus)) { + errorCode = U_ILLEGAL_ARGUMENT_ERROR; return 0; } - if(length==0) { + if (localeBuffer.isEmpty()) { // For the display name, we treat this as unknown language (ICU-20273). - if (getter == uloc_getLanguage) { - uprv_strcpy(localeBuffer, "und"); + if (getter == ulocimp_getLanguage) { + localeBuffer.append("und", errorCode); } else { - return u_terminateUChars(dest, destCapacity, 0, pErrorCode); + return u_terminateUChars(dest, destCapacity, 0, &errorCode); } } root = tag == _kCountries ? U_ICUDATA_REGION : U_ICUDATA_LANG; return _getStringOrCopyKey(root, displayLocale, - tag, nullptr, localeBuffer, - localeBuffer, + tag, nullptr, localeBuffer.data(), + localeBuffer.data(), dest, destCapacity, - pErrorCode); + errorCode); } +} // namespace + U_CAPI int32_t U_EXPORT2 uloc_getDisplayLanguage(const char *locale, const char *displayLocale, char16_t *dest, int32_t destCapacity, UErrorCode *pErrorCode) { return _getDisplayNameForComponent(locale, displayLocale, dest, destCapacity, - uloc_getLanguage, _kLanguages, pErrorCode); + ulocimp_getLanguage, _kLanguages, *pErrorCode); } U_CAPI int32_t U_EXPORT2 @@ -420,19 +418,20 @@ uloc_getDisplayScript(const char* locale, char16_t *dest, int32_t destCapacity, UErrorCode *pErrorCode) { + if (U_FAILURE(*pErrorCode)) { return 0; } UErrorCode err = U_ZERO_ERROR; int32_t res = _getDisplayNameForComponent(locale, displayLocale, dest, destCapacity, - uloc_getScript, _kScriptsStandAlone, &err); + ulocimp_getScript, _kScriptsStandAlone, err); if (destCapacity == 0 && err == U_BUFFER_OVERFLOW_ERROR) { // For preflight, return the max of the value and the fallback. int32_t fallback_res = _getDisplayNameForComponent(locale, displayLocale, dest, destCapacity, - uloc_getScript, _kScripts, pErrorCode); + ulocimp_getScript, _kScripts, *pErrorCode); return (fallback_res > res) ? fallback_res : res; } if ( err == U_USING_DEFAULT_WARNING ) { return _getDisplayNameForComponent(locale, displayLocale, dest, destCapacity, - uloc_getScript, _kScripts, pErrorCode); + ulocimp_getScript, _kScripts, *pErrorCode); } else { *pErrorCode = err; return res; @@ -446,7 +445,7 @@ uloc_getDisplayScriptInContext(const char* locale, UErrorCode *pErrorCode) { return _getDisplayNameForComponent(locale, displayLocale, dest, destCapacity, - uloc_getScript, _kScripts, pErrorCode); + ulocimp_getScript, _kScripts, *pErrorCode); } U_CAPI int32_t U_EXPORT2 @@ -455,7 +454,7 @@ uloc_getDisplayCountry(const char *locale, char16_t *dest, int32_t destCapacity, UErrorCode *pErrorCode) { return _getDisplayNameForComponent(locale, displayLocale, dest, destCapacity, - uloc_getCountry, _kCountries, pErrorCode); + ulocimp_getRegion, _kCountries, *pErrorCode); } /* @@ -469,7 +468,7 @@ uloc_getDisplayVariant(const char *locale, char16_t *dest, int32_t destCapacity, UErrorCode *pErrorCode) { return _getDisplayNameForComponent(locale, displayLocale, dest, destCapacity, - uloc_getVariant, _kVariants, pErrorCode); + ulocimp_getVariant, _kVariants, *pErrorCode); } /* Instead of having a separate pass for 'special' patterns, reintegrate the two @@ -809,7 +808,7 @@ uloc_getDisplayKeyword(const char* keyword, keyword, keyword, dest, destCapacity, - status); + *status); } @@ -836,11 +835,7 @@ uloc_getDisplayKeywordValue( const char* locale, } /* get the keyword value */ - CharString keywordValue; - { - CharStringByteSink sink(&keywordValue); - ulocimp_getKeywordValue(locale, keyword, sink, status); - } + CharString keywordValue = ulocimp_getKeywordValue(locale, keyword, *status); /* * if the keyword is equal to currency .. then to get the display name @@ -897,6 +892,6 @@ uloc_getDisplayKeywordValue( const char* locale, keywordValue.data(), keywordValue.data(), dest, destCapacity, - status); + *status); } } diff --git a/contrib/libs/icu/common/locdistance.cpp b/contrib/libs/icu/common/locdistance.cpp index fb22fe79ed..4dbfcc0095 100644 --- a/contrib/libs/icu/common/locdistance.cpp +++ b/contrib/libs/icu/common/locdistance.cpp @@ -59,7 +59,7 @@ UBool U_CALLCONV cleanup() { void U_CALLCONV LocaleDistance::initLocaleDistance(UErrorCode &errorCode) { // This function is invoked only via umtx_initOnce(). U_ASSERT(gLocaleDistance == nullptr); - const XLikelySubtags &likely = *XLikelySubtags::getSingleton(errorCode); + const LikelySubtags &likely = *LikelySubtags::getSingleton(errorCode); if (U_FAILURE(errorCode)) { return; } const LocaleDistanceData &data = likely.getDistanceData(); if (data.distanceTrieBytes == nullptr || @@ -83,7 +83,7 @@ const LocaleDistance *LocaleDistance::getSingleton(UErrorCode &errorCode) { return gLocaleDistance; } -LocaleDistance::LocaleDistance(const LocaleDistanceData &data, const XLikelySubtags &likely) : +LocaleDistance::LocaleDistance(const LocaleDistanceData &data, const LikelySubtags &likely) : likelySubtags(likely), trie(data.distanceTrieBytes), regionToPartitionsIndex(data.regionToPartitions), partitionArrays(data.partitions), @@ -119,7 +119,7 @@ int32_t LocaleDistance::getBestIndexAndDistance( uint64_t desLangState = desLangDistance >= 0 && supportedLSRsLength > 1 ? iter.getState64() : 0; // Index of the supported LSR with the lowest distance. int32_t bestIndex = -1; - // Cached lookup info from XLikelySubtags.compareLikely(). + // Cached lookup info from LikelySubtags.compareLikely(). int32_t bestLikelyInfo = -1; for (int32_t slIndex = 0; slIndex < supportedLSRsLength; ++slIndex) { const LSR &supported = *supportedLSRs[slIndex]; @@ -399,7 +399,7 @@ int32_t LocaleDistance::trieNext(BytesTrie &iter, const char *s, bool wantValue) } } -UBool LocaleDistance::isParadigmLSR(const LSR &lsr) const { +bool LocaleDistance::isParadigmLSR(const LSR &lsr) const { // Linear search for a very short list (length 6 as of 2019), // because we look for equivalence not equality, and // because it's easy. diff --git a/contrib/libs/icu/common/locdistance.h b/contrib/libs/icu/common/locdistance.h index 51b777e627..952f622e8e 100644 --- a/contrib/libs/icu/common/locdistance.h +++ b/contrib/libs/icu/common/locdistance.h @@ -62,7 +62,7 @@ public: ULocMatchFavorSubtag favorSubtag, ULocMatchDirection direction) const; - UBool isParadigmLSR(const LSR &lsr) const; + bool isParadigmLSR(const LSR &lsr) const; int32_t getDefaultScriptDistance() const { return defaultScriptDistance; @@ -83,14 +83,14 @@ private: // tic constexpr int32_t MAX_INDEX = 0x1fffff; // avoids sign bit static constexpr int32_t INDEX_NEG_1 = 0xfffffc00; - LocaleDistance(const LocaleDistanceData &data, const XLikelySubtags &likely); + LocaleDistance(const LocaleDistanceData &data, const LikelySubtags &likely); LocaleDistance(const LocaleDistance &other) = delete; LocaleDistance &operator=(const LocaleDistance &other) = delete; static void initLocaleDistance(UErrorCode &errorCode); - UBool isMatch(const LSR &desired, const LSR &supported, - int32_t shiftedThreshold, ULocMatchFavorSubtag favorSubtag) const { + bool isMatch(const LSR &desired, const LSR &supported, + int32_t shiftedThreshold, ULocMatchFavorSubtag favorSubtag) const { const LSR *pSupp = &supported; return getBestIndexAndDistance( desired, &pSupp, 1, @@ -119,7 +119,7 @@ private: return defaultRegionDistance; } - const XLikelySubtags &likelySubtags; + const LikelySubtags &likelySubtags; // The trie maps each dlang+slang+dscript+sscript+dregion+sregion // (encoded in ASCII with bit 7 set on the last character of each subtag) to a distance. diff --git a/contrib/libs/icu/common/locdspnm.cpp b/contrib/libs/icu/common/locdspnm.cpp index 73fe531c54..c65a349dbd 100644 --- a/contrib/libs/icu/common/locdspnm.cpp +++ b/contrib/libs/icu/common/locdspnm.cpp @@ -18,45 +18,17 @@ #include "unicode/udisplaycontext.h" #include "unicode/brkiter.h" #include "unicode/ucurr.h" +#include "bytesinkutil.h" +#include "charstr.h" #include "cmemory.h" #include "cstring.h" #include "mutex.h" +#include "uassert.h" #include "ulocimp.h" #include "umutex.h" #include "ureslocs.h" #include "uresimp.h" -#include <stdarg.h> - -/** - * Concatenate a number of null-terminated strings to buffer, leaving a - * null-terminated string. The last argument should be the null pointer. - * Return the length of the string in the buffer, not counting the trailing - * null. Return -1 if there is an error (buffer is null, or buflen < 1). - */ -static int32_t ncat(char *buffer, uint32_t buflen, ...) { - va_list args; - char *str; - char *p = buffer; - const char* e = buffer + buflen - 1; - - if (buffer == nullptr || buflen < 1) { - return -1; - } - - va_start(args, buflen); - while ((str = va_arg(args, char *)) != 0) { - char c; - while (p != e && (c = *str++) != 0) { - *p++ = c; - } - } - *p = 0; - va_end(args); - - return static_cast<int32_t>(p - buffer); -} - U_NAMESPACE_BEGIN //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -64,12 +36,13 @@ U_NAMESPACE_BEGIN // Access resource data for locale components. // Wrap code in uloc.c for now. class ICUDataTable { - const char* path; + const char* const path; Locale locale; public: + // Note: path should be a pointer to a statically allocated string. ICUDataTable(const char* path, const Locale& locale); - ~ICUDataTable(); + ~ICUDataTable() = default; const Locale& getLocale(); @@ -95,23 +68,9 @@ ICUDataTable::getNoFallback(const char* tableKey, const char* itemKey, UnicodeSt } ICUDataTable::ICUDataTable(const char* path, const Locale& locale) - : path(nullptr), locale(Locale::getRoot()) + : path(path), locale(locale) { - if (path) { - int32_t len = static_cast<int32_t>(uprv_strlen(path)); - this->path = (const char*) uprv_malloc(len + 1); - if (this->path) { - uprv_strcpy((char *)this->path, path); - this->locale = locale; - } - } -} - -ICUDataTable::~ICUDataTable() { - if (path) { - uprv_free((void*) path); - path = nullptr; - } + U_ASSERT(path != nullptr); } const Locale& @@ -305,7 +264,7 @@ class LocaleDisplayNamesImpl : public LocaleDisplayNames { }; // Capitalization transforms. For each usage type, indicates whether to titlecase for // the context specified in capitalizationContext (which we know at construction time) - UBool fCapitalization[kCapContextUsageCount]; + bool fCapitalization[kCapContextUsageCount]; public: // constructor @@ -341,12 +300,12 @@ private: UnicodeString& result, bool substitute) const; UnicodeString& appendWithSep(UnicodeString& buffer, const UnicodeString& src) const; UnicodeString& adjustForUsageAndContext(CapContextUsage usage, UnicodeString& result) const; - UnicodeString& scriptDisplayName(const char* script, UnicodeString& result, UBool skipAdjust) const; - UnicodeString& regionDisplayName(const char* region, UnicodeString& result, UBool skipAdjust) const; - UnicodeString& variantDisplayName(const char* variant, UnicodeString& result, UBool skipAdjust) const; - UnicodeString& keyDisplayName(const char* key, UnicodeString& result, UBool skipAdjust) const; + UnicodeString& scriptDisplayName(const char* script, UnicodeString& result, bool skipAdjust) const; + UnicodeString& regionDisplayName(const char* region, UnicodeString& result, bool skipAdjust) const; + UnicodeString& variantDisplayName(const char* variant, UnicodeString& result, bool skipAdjust) const; + UnicodeString& keyDisplayName(const char* key, UnicodeString& result, bool skipAdjust) const; UnicodeString& keyValueDisplayName(const char* key, const char* value, - UnicodeString& result, UBool skipAdjust) const; + UnicodeString& result, bool skipAdjust) const; void initialize(); struct CapitalizationContextSink; @@ -399,7 +358,7 @@ LocaleDisplayNamesImpl::LocaleDisplayNamesImpl(const Locale& locale, } struct LocaleDisplayNamesImpl::CapitalizationContextSink : public ResourceSink { - UBool hasCapitalizationUsage; + bool hasCapitalizationUsage; LocaleDisplayNamesImpl& parent; CapitalizationContextSink(LocaleDisplayNamesImpl& _parent) @@ -490,7 +449,7 @@ LocaleDisplayNamesImpl::initialize() { #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; + bool needBrkIter = false; if (capitalizationContext == UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU || capitalizationContext == UDISPCTX_CAPITALIZATION_FOR_STANDALONE) { LocalUResourceBundlePointer resource(ures_open(nullptr, locale.getName(), &status)); if (U_FAILURE(status)) { return; } @@ -582,36 +541,51 @@ LocaleDisplayNamesImpl::localeDisplayName(const Locale& loc, const char* country = loc.getCountry(); const char* variant = loc.getVariant(); - UBool hasScript = uprv_strlen(script) > 0; - UBool hasCountry = uprv_strlen(country) > 0; - UBool hasVariant = uprv_strlen(variant) > 0; + bool hasScript = uprv_strlen(script) > 0; + bool hasCountry = uprv_strlen(country) > 0; + bool hasVariant = uprv_strlen(variant) > 0; if (dialectHandling == ULDN_DIALECT_NAMES) { - char buffer[ULOC_FULLNAME_CAPACITY]; + UErrorCode status = U_ZERO_ERROR; + CharString buffer; do { // loop construct is so we can break early out of search if (hasScript && hasCountry) { - ncat(buffer, ULOC_FULLNAME_CAPACITY, lang, "_", script, "_", country, (char *)0); - localeIdName(buffer, resultName, false); - if (!resultName.isBogus()) { - hasScript = false; - hasCountry = false; - break; + buffer.append(lang, status) + .append('_', status) + .append(script, status) + .append('_', status) + .append(country, status); + if (U_SUCCESS(status)) { + localeIdName(buffer.data(), resultName, false); + if (!resultName.isBogus()) { + hasScript = false; + hasCountry = false; + break; + } } } if (hasScript) { - ncat(buffer, ULOC_FULLNAME_CAPACITY, lang, "_", script, (char *)0); - localeIdName(buffer, resultName, false); - if (!resultName.isBogus()) { - hasScript = false; - break; + buffer.append(lang, status) + .append('_', status) + .append(script, status); + if (U_SUCCESS(status)) { + localeIdName(buffer.data(), resultName, false); + if (!resultName.isBogus()) { + hasScript = false; + break; + } } } if (hasCountry) { - ncat(buffer, ULOC_FULLNAME_CAPACITY, lang, "_", country, (char*)0); - localeIdName(buffer, resultName, false); - if (!resultName.isBogus()) { - hasCountry = false; - break; + buffer.append(lang, status) + .append('_', status) + .append(country, status); + if (U_SUCCESS(status)) { + localeIdName(buffer.data(), resultName, false); + if (!resultName.isBogus()) { + hasCountry = false; + break; + } } } } while (false); @@ -658,21 +632,19 @@ LocaleDisplayNamesImpl::localeDisplayName(const Locale& loc, LocalPointer<StringEnumeration> e(loc.createKeywords(status)); if (e.isValid() && U_SUCCESS(status)) { UnicodeString temp2; - char value[ULOC_KEYWORD_AND_VALUES_CAPACITY]; // sigh, no ULOC_VALUE_CAPACITY const char* key; - while ((key = e->next((int32_t *)0, status)) != nullptr) { - value[0] = 0; - loc.getKeywordValue(key, value, ULOC_KEYWORD_AND_VALUES_CAPACITY, status); - if (U_FAILURE(status) || status == U_STRING_NOT_TERMINATED_WARNING) { - return result; + while ((key = e->next((int32_t*)nullptr, status)) != nullptr) { + auto value = loc.getKeywordValue<CharString>(key, status); + if (U_FAILURE(status)) { + return result; } keyDisplayName(key, temp, true); temp.findAndReplace(formatOpenParen, formatReplaceOpenParen); temp.findAndReplace(formatCloseParen, formatReplaceCloseParen); - keyValueDisplayName(key, value, temp2, true); + keyValueDisplayName(key, value.data(), temp2, true); temp2.findAndReplace(formatOpenParen, formatReplaceOpenParen); temp2.findAndReplace(formatCloseParen, formatReplaceCloseParen); - if (temp2 != UnicodeString(value, -1, US_INV)) { + if (temp2 != UnicodeString(value.data(), -1, US_INV)) { appendWithSep(resultRemainder, temp2); } else if (temp != UnicodeString(key, -1, US_INV)) { UnicodeString temp3; @@ -779,7 +751,7 @@ LocaleDisplayNamesImpl::languageDisplayName(const char* lang, UnicodeString& LocaleDisplayNamesImpl::scriptDisplayName(const char* script, UnicodeString& result, - UBool skipAdjust) const { + bool skipAdjust) const { if (nameLength == UDISPCTX_LENGTH_SHORT) { langData.getNoFallback("Scripts%short", script, result); if (!result.isBogus()) { @@ -809,7 +781,7 @@ LocaleDisplayNamesImpl::scriptDisplayName(UScriptCode scriptCode, UnicodeString& LocaleDisplayNamesImpl::regionDisplayName(const char* region, UnicodeString& result, - UBool skipAdjust) const { + bool skipAdjust) const { if (nameLength == UDISPCTX_LENGTH_SHORT) { regionData.getNoFallback("Countries%short", region, result); if (!result.isBogus()) { @@ -834,7 +806,7 @@ LocaleDisplayNamesImpl::regionDisplayName(const char* region, UnicodeString& LocaleDisplayNamesImpl::variantDisplayName(const char* variant, UnicodeString& result, - UBool skipAdjust) const { + bool skipAdjust) const { // don't have a resource for short variant names if (substitute == UDISPCTX_SUBSTITUTE) { langData.get("Variants", variant, result); @@ -853,7 +825,7 @@ LocaleDisplayNamesImpl::variantDisplayName(const char* variant, UnicodeString& LocaleDisplayNamesImpl::keyDisplayName(const char* key, UnicodeString& result, - UBool skipAdjust) const { + bool skipAdjust) const { // don't have a resource for short key names if (substitute == UDISPCTX_SUBSTITUTE) { langData.get("Keys", key, result); @@ -873,7 +845,7 @@ UnicodeString& LocaleDisplayNamesImpl::keyValueDisplayName(const char* key, const char* value, UnicodeString& result, - UBool skipAdjust) const { + bool skipAdjust) const { if (uprv_strcmp(key, "currency") == 0) { // ICU4C does not have ICU4J CurrencyDisplayInfo equivalent for now. UErrorCode sts = U_ZERO_ERROR; @@ -939,7 +911,7 @@ uldn_open(const char * locale, UDialectHandling dialectHandling, UErrorCode *pErrorCode) { if (U_FAILURE(*pErrorCode)) { - return 0; + return nullptr; } if (locale == nullptr) { locale = uloc_getDefault(); @@ -952,7 +924,7 @@ uldn_openForContext(const char * locale, UDisplayContext *contexts, int32_t length, UErrorCode *pErrorCode) { if (U_FAILURE(*pErrorCode)) { - return 0; + return nullptr; } if (locale == nullptr) { locale = uloc_getDefault(); diff --git a/contrib/libs/icu/common/locid.cpp b/contrib/libs/icu/common/locid.cpp index 70a794ae07..37bbe4ba94 100644 --- a/contrib/libs/icu/common/locid.cpp +++ b/contrib/libs/icu/common/locid.cpp @@ -57,10 +57,6 @@ #include "ustr_imp.h" #include "uvector.h" -U_CDECL_BEGIN -static UBool U_CALLCONV locale_cleanup(); -U_CDECL_END - U_NAMESPACE_BEGIN static Locale *gLocaleCache = nullptr; @@ -106,16 +102,17 @@ typedef enum ELocalePos { eMAX_LOCALES } ELocalePos; -U_CDECL_BEGIN +namespace { + // // Deleter function for Locales owned by the default Locale hash table/ // -static void U_CALLCONV +void U_CALLCONV deleteLocale(void *obj) { delete (icu::Locale *) obj; } -static UBool U_CALLCONV locale_cleanup() +UBool U_CALLCONV locale_cleanup() { U_NAMESPACE_USE @@ -131,8 +128,7 @@ static UBool U_CALLCONV locale_cleanup() return true; } - -static void U_CALLCONV locale_init(UErrorCode &status) { +void U_CALLCONV locale_init(UErrorCode &status) { U_NAMESPACE_USE U_ASSERT(gLocaleCache == nullptr); @@ -163,7 +159,7 @@ static void U_CALLCONV locale_init(UErrorCode &status) { gLocaleCache[eCANADA_FRENCH] = Locale("fr", "CA"); } -U_CDECL_END +} // namespace U_NAMESPACE_BEGIN @@ -182,15 +178,8 @@ Locale *locale_set_default_internal(const char *id, UErrorCode& status) { canonicalize = true; // always canonicalize host ID } - CharString localeNameBuf; - { - CharStringByteSink sink(&localeNameBuf); - if (canonicalize) { - ulocimp_canonicalize(id, sink, &status); - } else { - ulocimp_getName(id, sink, &status); - } - } + CharString localeNameBuf = + canonicalize ? ulocimp_canonicalize(id, status) : ulocimp_getName(id, status); if (U_FAILURE(status)) { return gDefaultLocale; @@ -494,7 +483,7 @@ namespace { UInitOnce gKnownCanonicalizedInitOnce {}; UHashtable *gKnownCanonicalized = nullptr; -static const char* const KNOWN_CANONICALIZED[] = { +constexpr const char* KNOWN_CANONICALIZED[] = { "c", // Commonly used locales known are already canonicalized "af", "af_ZA", "am", "am_ET", "ar", "ar_001", "as", "as_IN", "az", "az_AZ", @@ -518,13 +507,13 @@ static const char* const KNOWN_CANONICALIZED[] = { "zh_Hant_TW", "zh_TW", "zu", "zu_ZA" }; -static UBool U_CALLCONV cleanupKnownCanonicalized() { +UBool U_CALLCONV cleanupKnownCanonicalized() { gKnownCanonicalizedInitOnce.reset(); if (gKnownCanonicalized) { uhash_close(gKnownCanonicalized); } return true; } -static void U_CALLCONV loadKnownCanonicalized(UErrorCode &status) { +void U_CALLCONV loadKnownCanonicalized(UErrorCode &status) { ucln_common_registerCleanup(UCLN_COMMON_LOCALE_KNOWN_CANONICALIZED, cleanupKnownCanonicalized); LocalUHashtablePointer newKnownCanonicalizedMap( @@ -563,7 +552,7 @@ private: LocalMemory<int32_t>& replacementIndexes, int32_t &length, void (*checkType)(const char* type), - void (*checkReplacement)(const UnicodeString& replacement), + void (*checkReplacement)(const UChar* replacement), UErrorCode &status); // Read the languageAlias data from alias to @@ -700,7 +689,7 @@ AliasDataBuilder::readAlias( LocalMemory<int32_t>& replacementIndexes, int32_t &length, void (*checkType)(const char* type), - void (*checkReplacement)(const UnicodeString& replacement), + void (*checkReplacement)(const UChar* replacement), UErrorCode &status) { if (U_FAILURE(status)) { return; @@ -720,8 +709,8 @@ AliasDataBuilder::readAlias( LocalUResourceBundlePointer res( ures_getNextResource(alias, nullptr, &status)); const char* aliasFrom = ures_getKey(res.getAlias()); - UnicodeString aliasTo = - ures_getUnicodeStringByKey(res.getAlias(), "replacement", &status); + const UChar* aliasTo = + ures_getStringByKey(res.getAlias(), "replacement", nullptr, &status); if (U_FAILURE(status)) return; checkType(aliasFrom); @@ -766,7 +755,7 @@ AliasDataBuilder::readLanguageAlias( #else [](const char*) {}, #endif - [](const UnicodeString&) {}, status); + [](const UChar*) {}, status); } /** @@ -790,12 +779,12 @@ AliasDataBuilder::readScriptAlias( [](const char* type) { U_ASSERT(uprv_strlen(type) == 4); }, - [](const UnicodeString& replacement) { - U_ASSERT(replacement.length() == 4); + [](const UChar* replacement) { + U_ASSERT(u_strlen(replacement) == 4); }, #else [](const char*) {}, - [](const UnicodeString&) { }, + [](const UChar*) { }, #endif status); } @@ -824,7 +813,7 @@ AliasDataBuilder::readTerritoryAlias( #else [](const char*) {}, #endif - [](const UnicodeString&) { }, + [](const UChar*) { }, status); } @@ -851,15 +840,16 @@ AliasDataBuilder::readVariantAlias( U_ASSERT(uprv_strlen(type) != 4 || (type[0] >= '0' && type[0] <= '9')); }, - [](const UnicodeString& replacement) { - U_ASSERT(replacement.length() >= 4 && replacement.length() <= 8); - U_ASSERT(replacement.length() != 4 || - (replacement.charAt(0) >= u'0' && - replacement.charAt(0) <= u'9')); + [](const UChar* replacement) { + int32_t len = u_strlen(replacement); + U_ASSERT(len >= 4 && len <= 8); + U_ASSERT(len != 4 || + (*replacement >= u'0' && + *replacement <= u'9')); }, #else [](const char*) {}, - [](const UnicodeString&) { }, + [](const UChar*) { }, #endif status); } @@ -888,7 +878,7 @@ AliasDataBuilder::readSubdivisionAlias( #else [](const char*) {}, #endif - [](const UnicodeString&) { }, + [](const UChar*) { }, status); } @@ -919,6 +909,8 @@ AliasData::loadData(UErrorCode &status) */ AliasData* AliasDataBuilder::build(UErrorCode &status) { + if (U_FAILURE(status)) { return nullptr; } + LocalUResourceBundlePointer metadata( ures_openDirect(nullptr, "metadata", &status)); LocalUResourceBundlePointer metadataAlias( @@ -1064,9 +1056,15 @@ AliasDataBuilder::build(UErrorCode &status) { */ class AliasReplacer { public: - AliasReplacer(UErrorCode status) : + AliasReplacer(UErrorCode& status) : language(nullptr), script(nullptr), region(nullptr), - extensions(nullptr), variants(status), + extensions(nullptr), + // store value in variants only once + variants(nullptr, + ([](UElement e1, UElement e2) -> UBool { + return 0==uprv_strcmp((const char*)e1.pointer, + (const char*)e2.pointer);}), + status), data(nullptr) { } ~AliasReplacer() { @@ -1123,12 +1121,12 @@ private: } // Gather fields and generate locale ID into out. - CharString& outputToString(CharString& out, UErrorCode status); + CharString& outputToString(CharString& out, UErrorCode& status); // Generate the lookup key. CharString& generateKey(const char* language, const char* region, const char* variant, CharString& out, - UErrorCode status); + UErrorCode& status); void parseLanguageReplacement(const char* replacement, const char*& replaceLanguage, @@ -1165,8 +1163,9 @@ private: CharString& AliasReplacer::generateKey( const char* language, const char* region, const char* variant, - CharString& out, UErrorCode status) + CharString& out, UErrorCode& status) { + if (U_FAILURE(status)) { return out; } out.append(language, status); if (notEmpty(region)) { out.append(SEP_CHAR, status) @@ -1522,13 +1521,12 @@ AliasReplacer::replaceTransformedExtensions( const char* tkey = ultag_getTKeyStart(str); int32_t tlangLen = (tkey == str) ? 0 : ((tkey == nullptr) ? len : static_cast<int32_t>((tkey - str - 1))); - CharStringByteSink sink(&output); if (tlangLen > 0) { Locale tlang = LocaleBuilder() .setLanguageTag(StringPiece(str, tlangLen)) .build(status); tlang.canonicalize(status); - tlang.toLanguageTag(sink, status); + output = tlang.toLanguageTag<CharString>(status); if (U_FAILURE(status)) { return false; } @@ -1584,8 +1582,9 @@ AliasReplacer::replaceTransformedExtensions( CharString& AliasReplacer::outputToString( - CharString& out, UErrorCode status) + CharString& out, UErrorCode& status) { + if (U_FAILURE(status)) { return out; } out.append(language, status); if (notEmpty(script)) { out.append(SEP_CHAR, status) @@ -1652,10 +1651,16 @@ AliasReplacer::replace(const Locale& locale, CharString& out, UErrorCode& status while ((end = uprv_strchr(start, SEP_CHAR)) != nullptr && U_SUCCESS(status)) { *end = NULL_CHAR; // null terminate inside variantsBuff - variants.addElement(start, status); + // do not add "" or duplicate data to variants + if (*start && !variants.contains(start)) { + variants.addElement(start, status); + } start = end + 1; } - variants.addElement(start, status); + // do not add "" or duplicate data to variants + if (*start && !variants.contains(start)) { + variants.addElement(start, status); + } } if (U_FAILURE(status)) { return false; } @@ -1722,9 +1727,7 @@ AliasReplacer::replace(const Locale& locale, CharString& out, UErrorCode& status while ((key = iter->next(nullptr, status)) != nullptr) { if (uprv_strcmp("sd", key) == 0 || uprv_strcmp("rg", key) == 0 || uprv_strcmp("t", key) == 0) { - CharString value; - CharStringByteSink valueSink(&value); - locale.getKeywordValue(key, valueSink, status); + auto value = locale.getKeywordValue<CharString>(key, status); if (U_FAILURE(status)) { status = U_ZERO_ERROR; continue; @@ -1769,6 +1772,7 @@ AliasReplacer::replace(const Locale& locale, CharString& out, UErrorCode& status bool canonicalizeLocale(const Locale& locale, CharString& out, UErrorCode& status) { + if (U_FAILURE(status)) { return false; } AliasReplacer replacer(status); return replacer.replace(locale, out, status); } @@ -1778,6 +1782,8 @@ canonicalizeLocale(const Locale& locale, CharString& out, UErrorCode& status) bool isKnownCanonicalizedLocale(const char* locale, UErrorCode& status) { + if (U_FAILURE(status)) { return false; } + if ( uprv_strcmp(locale, "c") == 0 || uprv_strcmp(locale, "en") == 0 || uprv_strcmp(locale, "en_US") == 0) { @@ -1796,24 +1802,30 @@ isKnownCanonicalizedLocale(const char* locale, UErrorCode& status) } // namespace +U_NAMESPACE_END + // Function for testing. -U_CAPI const char* const* -ulocimp_getKnownCanonicalizedLocaleForTest(int32_t* length) +U_EXPORT const char* const* +ulocimp_getKnownCanonicalizedLocaleForTest(int32_t& length) { - *length = UPRV_LENGTHOF(KNOWN_CANONICALIZED); + U_NAMESPACE_USE + length = UPRV_LENGTHOF(KNOWN_CANONICALIZED); return KNOWN_CANONICALIZED; } // Function for testing. -U_CAPI bool +U_EXPORT bool ulocimp_isCanonicalizedLocaleForTest(const char* localeName) { + U_NAMESPACE_USE Locale l(localeName); UErrorCode status = U_ZERO_ERROR; CharString temp; return !canonicalizeLocale(l, temp, status) && U_SUCCESS(status); } +U_NAMESPACE_BEGIN + /*This function initializes a Locale from a C locale ID*/ Locale& Locale::init(const char* localeID, UBool canonicalize) { @@ -1833,7 +1845,7 @@ Locale& Locale::init(const char* localeID, UBool canonicalize) // without goto and without another function do { char *separator; - char *field[5] = {0}; + char *field[5] = {nullptr}; int32_t fieldLen[5] = {0}; int32_t fieldIdx; int32_t variantField; @@ -1858,7 +1870,7 @@ Locale& Locale::init(const char* localeID, UBool canonicalize) U_ASSERT(baseName == nullptr); /*Go to heap for the fullName if necessary*/ fullName = (char *)uprv_malloc(sizeof(char)*(length + 1)); - if(fullName == 0) { + if (fullName == nullptr) { fullName = fullNameBuffer; break; // error: out of memory } @@ -1879,7 +1891,7 @@ Locale& Locale::init(const char* localeID, UBool canonicalize) separator = field[0] = fullName; fieldIdx = 1; char* at = uprv_strchr(fullName, '@'); - while ((separator = uprv_strchr(field[fieldIdx-1], SEP_CHAR)) != 0 && + while ((separator = uprv_strchr(field[fieldIdx-1], SEP_CHAR)) != nullptr && fieldIdx < UPRV_LENGTHOF(field)-1 && (at == nullptr || separator < at)) { field[fieldIdx] = separator + 1; @@ -2061,11 +2073,7 @@ Locale::addLikelySubtags(UErrorCode& status) { return; } - CharString maximizedLocaleID; - { - CharStringByteSink sink(&maximizedLocaleID); - ulocimp_addLikelySubtags(fullName, sink, &status); - } + CharString maximizedLocaleID = ulocimp_addLikelySubtags(fullName, status); if (U_FAILURE(status)) { return; @@ -2079,15 +2087,15 @@ Locale::addLikelySubtags(UErrorCode& status) { void Locale::minimizeSubtags(UErrorCode& status) { + Locale::minimizeSubtags(false, status); +} +void +Locale::minimizeSubtags(bool favorScript, UErrorCode& status) { if (U_FAILURE(status)) { return; } - CharString minimizedLocaleID; - { - CharStringByteSink sink(&minimizedLocaleID); - ulocimp_minimizeSubtags(fullName, sink, &status); - } + CharString minimizedLocaleID = ulocimp_minimizeSubtags(fullName, favorScript, status); if (U_FAILURE(status)) { return; @@ -2138,17 +2146,12 @@ Locale::forLanguageTag(StringPiece tag, UErrorCode& status) // parsing. Therefore the code here explicitly calls uloc_forLanguageTag() // and then Locale::init(), instead of just calling the normal constructor. - CharString localeID; int32_t parsedLength; - { - CharStringByteSink sink(&localeID); - ulocimp_forLanguageTag( - tag.data(), - tag.length(), - sink, - &parsedLength, - &status); - } + CharString localeID = ulocimp_forLanguageTag( + tag.data(), + tag.length(), + &parsedLength, + status); if (U_FAILURE(status)) { return result; @@ -2178,7 +2181,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 @@ -2402,33 +2405,24 @@ Locale::getLocaleCache() } class KeywordEnumeration : public StringEnumeration { +protected: + CharString keywords; private: - char *keywords; - char *current; - int32_t length; - UnicodeString currUSKey; - static const char fgClassID;/* Warning this is used beyond the typical RTTI usage. */ + const char *current; + static const char fgClassID; public: static UClassID U_EXPORT2 getStaticClassID() { return (UClassID)&fgClassID; } virtual UClassID getDynamicClassID() const override { return getStaticClassID(); } public: KeywordEnumeration(const char *keys, int32_t keywordLen, int32_t currentIndex, UErrorCode &status) - : keywords((char *)&fgClassID), current((char *)&fgClassID), length(0) { + : keywords(), current(keywords.data()) { if(U_SUCCESS(status) && keywordLen != 0) { if(keys == nullptr || keywordLen < 0) { status = U_ILLEGAL_ARGUMENT_ERROR; } else { - keywords = (char *)uprv_malloc(keywordLen+1); - if (keywords == nullptr) { - status = U_MEMORY_ALLOCATION_ERROR; - } - else { - uprv_memcpy(keywords, keys, keywordLen); - keywords[keywordLen] = 0; - current = keywords + currentIndex; - length = keywordLen; - } + keywords.append(keys, keywordLen, status); + current = keywords.data() + currentIndex; } } } @@ -2438,11 +2432,14 @@ public: virtual StringEnumeration * clone() const override { UErrorCode status = U_ZERO_ERROR; - return new KeywordEnumeration(keywords, length, (int32_t)(current - keywords), status); + return new KeywordEnumeration( + keywords.data(), keywords.length(), + (int32_t)(current - keywords.data()), status); } - virtual int32_t count(UErrorCode &/*status*/) const override { - char *kw = keywords; + virtual int32_t count(UErrorCode& status) const override { + if (U_FAILURE(status)) { return 0; } + const char *kw = keywords.data(); int32_t result = 0; while(*kw) { result++; @@ -2471,21 +2468,22 @@ public: } virtual const UnicodeString* snext(UErrorCode& status) override { + if (U_FAILURE(status)) { return nullptr; } int32_t resultLength = 0; const char *s = next(&resultLength, status); return setChars(s, resultLength, status); } - virtual void reset(UErrorCode& /*status*/) override { - current = keywords; + virtual void reset(UErrorCode& status) override { + if (U_FAILURE(status)) { return; } + current = keywords.data(); } }; const char KeywordEnumeration::fgClassID = '\0'; -KeywordEnumeration::~KeywordEnumeration() { - uprv_free(keywords); -} +// Out-of-line virtual destructor to serve as the "key function". +KeywordEnumeration::~KeywordEnumeration() = default; // A wrapper around KeywordEnumeration that calls uloc_toUnicodeLocaleKey() in // the next() method for each keyword before returning it. @@ -2510,6 +2508,18 @@ public: if (resultLength != nullptr) *resultLength = 0; return nullptr; } + virtual int32_t count(UErrorCode& status) const override { + if (U_FAILURE(status)) { return 0; } + const char *kw = keywords.data(); + int32_t result = 0; + while(*kw) { + if (uloc_toUnicodeLocaleKey(kw) != nullptr) { + result++; + } + kw += uprv_strlen(kw)+1; + } + return result; + } }; // Out-of-line virtual destructor to serve as the "key function". @@ -2528,9 +2538,7 @@ Locale::createKeywords(UErrorCode &status) const const char* assignment = uprv_strchr(fullName, '='); if(variantStart) { if(assignment > variantStart) { - CharString keywords; - CharStringByteSink sink(&keywords); - ulocimp_getKeywords(variantStart+1, '@', sink, false, &status); + CharString keywords = ulocimp_getKeywords(variantStart + 1, '@', false, status); if (U_SUCCESS(status) && !keywords.isEmpty()) { result = new KeywordEnumeration(keywords.data(), keywords.length(), 0, status); if (!result) { @@ -2557,9 +2565,7 @@ Locale::createUnicodeKeywords(UErrorCode &status) const const char* assignment = uprv_strchr(fullName, '='); if(variantStart) { if(assignment > variantStart) { - CharString keywords; - CharStringByteSink sink(&keywords); - ulocimp_getKeywords(variantStart+1, '@', sink, false, &status); + CharString keywords = ulocimp_getKeywords(variantStart + 1, '@', false, status); if (U_SUCCESS(status) && !keywords.isEmpty()) { result = new UnicodeKeywordEnumeration(keywords.data(), keywords.length(), 0, status); if (!result) { @@ -2596,13 +2602,17 @@ Locale::getKeywordValue(StringPiece keywordName, ByteSink& sink, UErrorCode& sta return; } - ulocimp_getKeywordValue(fullName, keywordName_nul.data(), sink, &status); + ulocimp_getKeywordValue(fullName, keywordName_nul.data(), sink, status); } void Locale::getUnicodeKeywordValue(StringPiece keywordName, ByteSink& sink, UErrorCode& status) const { + if (U_FAILURE(status)) { + return; + } + // TODO: Remove the need for a const char* to a NUL terminated buffer. const CharString keywordName_nul(keywordName, status); if (U_FAILURE(status)) { @@ -2610,17 +2620,12 @@ Locale::getUnicodeKeywordValue(StringPiece keywordName, } const char* legacy_key = uloc_toLegacyKey(keywordName_nul.data()); - if (legacy_key == nullptr) { status = U_ILLEGAL_ARGUMENT_ERROR; return; } - CharString legacy_value; - { - CharStringByteSink sink(&legacy_value); - getKeywordValue(legacy_key, sink, status); - } + auto legacy_value = getKeywordValue<CharString>(legacy_key, status); if (U_FAILURE(status)) { return; @@ -2683,6 +2688,7 @@ void Locale::setKeywordValue(StringPiece keywordName, StringPiece keywordValue, UErrorCode& status) { + if (U_FAILURE(status)) { return; } // TODO: Remove the need for a const char* to a NUL terminated buffer. const CharString keywordName_nul(keywordName, status); const CharString keywordValue_nul(keywordValue, status); @@ -2693,16 +2699,18 @@ void Locale::setUnicodeKeywordValue(StringPiece keywordName, StringPiece keywordValue, UErrorCode& status) { + if (U_FAILURE(status)) { + return; + } + // TODO: Remove the need for a const char* to a NUL terminated buffer. const CharString keywordName_nul(keywordName, status); const CharString keywordValue_nul(keywordValue, status); - if (U_FAILURE(status)) { return; } const char* legacy_key = uloc_toLegacyKey(keywordName_nul.data()); - if (legacy_key == nullptr) { status = U_ILLEGAL_ARGUMENT_ERROR; return; diff --git a/contrib/libs/icu/common/loclikely.cpp b/contrib/libs/icu/common/loclikely.cpp index d2a05c6364..5aa929dc4b 100644 --- a/contrib/libs/icu/common/loclikely.cpp +++ b/contrib/libs/icu/common/loclikely.cpp @@ -19,6 +19,8 @@ * that then do not depend on resource bundle code and likely-subtags data. */ +#include <utility> + #include "unicode/bytestream.h" #include "unicode/utypes.h" #include "unicode/locid.h" @@ -31,146 +33,33 @@ #include "charstr.h" #include "cmemory.h" #include "cstring.h" +#include "loclikelysubtags.h" #include "ulocimp.h" -#include "ustr_imp.h" -/** - * These are the canonical strings for unknown languages, scripts and regions. - **/ -static const char* const unknownLanguage = "und"; -static const char* const unknownScript = "Zzzz"; -static const char* const unknownRegion = "ZZ"; - -/** - * This function looks for the localeID in the likelySubtags resource. - * - * @param localeID The tag to find. - * @param buffer A buffer to hold the matching entry - * @param bufferLength The length of the output buffer - * @return A pointer to "buffer" if found, or a null pointer if not. - */ -static const char* U_CALLCONV -findLikelySubtags(const char* localeID, - char* buffer, - int32_t bufferLength, - UErrorCode* err) { - const char* result = nullptr; - - if (!U_FAILURE(*err)) { - int32_t resLen = 0; - const char16_t* s = nullptr; - UErrorCode tmpErr = U_ZERO_ERROR; - icu::LocalUResourceBundlePointer subtags(ures_openDirect(nullptr, "likelySubtags", &tmpErr)); - if (U_SUCCESS(tmpErr)) { - icu::CharString und; - if (localeID != nullptr) { - if (*localeID == '\0') { - localeID = unknownLanguage; - } else if (*localeID == '_') { - und.append(unknownLanguage, *err); - und.append(localeID, *err); - if (U_FAILURE(*err)) { - return nullptr; - } - localeID = und.data(); - } - } - s = ures_getStringByKey(subtags.getAlias(), localeID, &resLen, &tmpErr); - - if (U_FAILURE(tmpErr)) { - /* - * If a resource is missing, it's not really an error, it's - * just that we don't have any data for that particular locale ID. - */ - if (tmpErr != U_MISSING_RESOURCE_ERROR) { - *err = tmpErr; - } - } - else if (resLen >= bufferLength) { - /* The buffer should never overflow. */ - *err = U_INTERNAL_PROGRAM_ERROR; - } - else { - u_UCharsToChars(s, buffer, resLen + 1); - if (resLen >= 3 && - uprv_strnicmp(buffer, unknownLanguage, 3) == 0 && - (resLen == 3 || buffer[3] == '_')) { - uprv_memmove(buffer, buffer + 3, resLen - 3 + 1); - } - result = buffer; - } - } else { - *err = tmpErr; - } - } - - return result; -} - -/** - * Append a tag to a buffer, adding the separator if necessary. The buffer - * must be large enough to contain the resulting tag plus any separator - * necessary. The tag must not be a zero-length string. - * - * @param tag The tag to add. - * @param tagLength The length of the tag. - * @param buffer The output buffer. - * @param bufferLength The length of the output buffer. This is an input/output parameter. - **/ -static void U_CALLCONV -appendTag( - const char* tag, - int32_t tagLength, - char* buffer, - int32_t* bufferLength, - UBool withSeparator) { - - if (withSeparator) { - buffer[*bufferLength] = '_'; - ++(*bufferLength); - } - - uprv_memmove( - &buffer[*bufferLength], - tag, - tagLength); - - *bufferLength += tagLength; -} +namespace { /** * Create a tag string from the supplied parameters. The lang, script and region * parameters may be nullptr pointers. If they are, their corresponding length parameters * must be less than or equal to 0. * - * If any of the language, script or region parameters are empty, and the alternateTags - * parameter is not nullptr, it will be parsed for potential language, script and region tags - * to be used when constructing the new tag. If the alternateTags parameter is nullptr, or - * it contains no language tag, the default tag for the unknown language is used. - * - * If the length of the new string exceeds the capacity of the output buffer, - * the function copies as many bytes to the output buffer as it can, and returns - * the error U_BUFFER_OVERFLOW_ERROR. - * * If an illegal argument is provided, the function returns the error * U_ILLEGAL_ARGUMENT_ERROR. * - * Note that this function can return the warning U_STRING_NOT_TERMINATED_WARNING if - * the tag string fits in the output buffer, but the null terminator doesn't. - * * @param lang The language tag to use. * @param langLength The length of the language tag. * @param script The script tag to use. * @param scriptLength The length of the script tag. * @param region The region tag to use. * @param regionLength The length of the region tag. + * @param variant The region tag to use. + * @param variantLength The length of the region tag. * @param trailing Any trailing data to append to the new tag. * @param trailingLength The length of the trailing data. - * @param alternateTags A string containing any alternate tags. * @param sink The output sink receiving the tag string. * @param err A pointer to a UErrorCode for error reporting. **/ -static void U_CALLCONV +void U_CALLCONV createTagStringWithAlternates( const char* lang, int32_t langLength, @@ -178,1085 +67,240 @@ createTagStringWithAlternates( int32_t scriptLength, const char* region, int32_t regionLength, + const char* variant, + int32_t variantLength, const char* trailing, int32_t trailingLength, - const char* alternateTags, icu::ByteSink& sink, - UErrorCode* err) { - - if (U_FAILURE(*err)) { - goto error; - } - else if (langLength >= ULOC_LANG_CAPACITY || - scriptLength >= ULOC_SCRIPT_CAPACITY || - regionLength >= ULOC_COUNTRY_CAPACITY) { - goto error; - } - else { - /** - * ULOC_FULLNAME_CAPACITY will provide enough capacity - * that we can build a string that contains the language, - * script and region code without worrying about overrunning - * the user-supplied buffer. - **/ - char tagBuffer[ULOC_FULLNAME_CAPACITY]; - int32_t tagLength = 0; - UBool regionAppended = false; - - if (langLength > 0) { - appendTag( - lang, - langLength, - tagBuffer, - &tagLength, - /*withSeparator=*/false); - } - else if (alternateTags == nullptr) { - /* - * Use the empty string for an unknown language, if - * we found no language. - */ - } - else { - /* - * Parse the alternateTags string for the language. - */ - char alternateLang[ULOC_LANG_CAPACITY]; - int32_t alternateLangLength = sizeof(alternateLang); - - alternateLangLength = - uloc_getLanguage( - alternateTags, - alternateLang, - alternateLangLength, - err); - if(U_FAILURE(*err) || - alternateLangLength >= ULOC_LANG_CAPACITY) { - goto error; - } - else if (alternateLangLength == 0) { - /* - * Use the empty string for an unknown language, if - * we found no language. - */ - } - else { - appendTag( - alternateLang, - alternateLangLength, - tagBuffer, - &tagLength, - /*withSeparator=*/false); - } - } - - if (scriptLength > 0) { - appendTag( - script, - scriptLength, - tagBuffer, - &tagLength, - /*withSeparator=*/true); - } - else if (alternateTags != nullptr) { - /* - * Parse the alternateTags string for the script. - */ - char alternateScript[ULOC_SCRIPT_CAPACITY]; - - const int32_t alternateScriptLength = - uloc_getScript( - alternateTags, - alternateScript, - sizeof(alternateScript), - err); - - if (U_FAILURE(*err) || - alternateScriptLength >= ULOC_SCRIPT_CAPACITY) { - goto error; - } - else if (alternateScriptLength > 0) { - appendTag( - alternateScript, - alternateScriptLength, - tagBuffer, - &tagLength, - /*withSeparator=*/true); - } - } - - if (regionLength > 0) { - appendTag( - region, - regionLength, - tagBuffer, - &tagLength, - /*withSeparator=*/true); - - regionAppended = true; - } - else if (alternateTags != nullptr) { - /* - * Parse the alternateTags string for the region. - */ - char alternateRegion[ULOC_COUNTRY_CAPACITY]; - - const int32_t alternateRegionLength = - uloc_getCountry( - alternateTags, - alternateRegion, - sizeof(alternateRegion), - err); - if (U_FAILURE(*err) || - alternateRegionLength >= ULOC_COUNTRY_CAPACITY) { - goto error; - } - else if (alternateRegionLength > 0) { - appendTag( - alternateRegion, - alternateRegionLength, - tagBuffer, - &tagLength, - /*withSeparator=*/true); - - regionAppended = true; - } - } - - /** - * Copy the partial tag from our internal buffer to the supplied - * target. - **/ - sink.Append(tagBuffer, tagLength); - - if (trailingLength > 0) { - if (*trailing != '@') { - sink.Append("_", 1); - if (!regionAppended) { - /* extra separator is required */ - sink.Append("_", 1); - } - } - - /* - * Copy the trailing data into the supplied buffer. - */ - sink.Append(trailing, trailingLength); - } - + UErrorCode& err) { + if (U_FAILURE(err)) { return; } -error: - - /** - * An overflow indicates the locale ID passed in - * is ill-formed. If we got here, and there was - * no previous error, it's an implicit overflow. - **/ - if (*err == U_BUFFER_OVERFLOW_ERROR || - U_SUCCESS(*err)) { - *err = U_ILLEGAL_ARGUMENT_ERROR; - } -} - -/** - * Create a tag string from the supplied parameters. The lang, script and region - * parameters may be nullptr pointers. If they are, their corresponding length parameters - * must be less than or equal to 0. If the lang parameter is an empty string, the - * default value for an unknown language is written to the output buffer. - * - * If the length of the new string exceeds the capacity of the output buffer, - * the function copies as many bytes to the output buffer as it can, and returns - * the error U_BUFFER_OVERFLOW_ERROR. - * - * If an illegal argument is provided, the function returns the error - * U_ILLEGAL_ARGUMENT_ERROR. - * - * @param lang The language tag to use. - * @param langLength The length of the language tag. - * @param script The script tag to use. - * @param scriptLength The length of the script tag. - * @param region The region tag to use. - * @param regionLength The length of the region tag. - * @param trailing Any trailing data to append to the new tag. - * @param trailingLength The length of the trailing data. - * @param sink The output sink receiving the tag string. - * @param err A pointer to a UErrorCode for error reporting. - **/ -static void U_CALLCONV -createTagString( - const char* lang, - int32_t langLength, - const char* script, - int32_t scriptLength, - const char* region, - int32_t regionLength, - const char* trailing, - int32_t trailingLength, - icu::ByteSink& sink, - UErrorCode* err) -{ - createTagStringWithAlternates( - lang, - langLength, - script, - scriptLength, - region, - regionLength, - trailing, - trailingLength, - nullptr, - sink, - err); -} - -/** - * Parse the language, script, and region subtags from a tag string, and copy the - * results into the corresponding output parameters. The buffers are null-terminated, - * unless overflow occurs. - * - * The langLength, scriptLength, and regionLength parameters are input/output - * parameters, and must contain the capacity of their corresponding buffers on - * input. On output, they will contain the actual length of the buffers, not - * including the null terminator. - * - * If the length of any of the output subtags exceeds the capacity of the corresponding - * buffer, the function copies as many bytes to the output buffer as it can, and returns - * the error U_BUFFER_OVERFLOW_ERROR. It will not parse any more subtags once overflow - * occurs. - * - * If an illegal argument is provided, the function returns the error - * U_ILLEGAL_ARGUMENT_ERROR. - * - * @param localeID The locale ID to parse. - * @param lang The language tag buffer. - * @param langLength The length of the language tag. - * @param script The script tag buffer. - * @param scriptLength The length of the script tag. - * @param region The region tag buffer. - * @param regionLength The length of the region tag. - * @param err A pointer to a UErrorCode for error reporting. - * @return The number of chars of the localeID parameter consumed. - **/ -static int32_t U_CALLCONV -parseTagString( - const char* localeID, - char* lang, - int32_t* langLength, - char* script, - int32_t* scriptLength, - char* region, - int32_t* regionLength, - UErrorCode* err) -{ - const char* position = localeID; - int32_t subtagLength = 0; - - if(U_FAILURE(*err) || - localeID == nullptr || - lang == nullptr || - langLength == nullptr || - script == nullptr || - scriptLength == nullptr || - region == nullptr || - regionLength == nullptr) { - goto error; + if (langLength >= ULOC_LANG_CAPACITY || + scriptLength >= ULOC_SCRIPT_CAPACITY || + regionLength >= ULOC_COUNTRY_CAPACITY) { + err = U_ILLEGAL_ARGUMENT_ERROR; + return; } - subtagLength = ulocimp_getLanguage(position, &position, *err).extract(lang, *langLength, *err); - - /* - * Note that we explicit consider U_STRING_NOT_TERMINATED_WARNING - * to be an error, because it indicates the user-supplied tag is - * not well-formed. - */ - if(U_FAILURE(*err)) { - goto error; + if (langLength > 0) { + sink.Append(lang, langLength); } - *langLength = subtagLength; - - /* - * If no language was present, use the empty string instead. - * Otherwise, move past any separator. - */ - if (_isIDSeparator(*position)) { - ++position; + if (scriptLength > 0) { + sink.Append("_", 1); + sink.Append(script, scriptLength); } - subtagLength = ulocimp_getScript(position, &position, *err).extract(script, *scriptLength, *err); - - if(U_FAILURE(*err)) { - goto error; + if (regionLength > 0) { + sink.Append("_", 1); + sink.Append(region, regionLength); } - *scriptLength = subtagLength; - - if (*scriptLength > 0) { - if (uprv_strnicmp(script, unknownScript, *scriptLength) == 0) { - /** - * If the script part is the "unknown" script, then don't return it. - **/ - *scriptLength = 0; + if (variantLength > 0) { + if (regionLength == 0) { + /* extra separator is required */ + sink.Append("_", 1); } + sink.Append("_", 1); + sink.Append(variant, variantLength); + } + if (trailingLength > 0) { /* - * Move past any separator. + * Copy the trailing data into the supplied buffer. */ - if (_isIDSeparator(*position)) { - ++position; - } + sink.Append(trailing, trailingLength); } +} - subtagLength = ulocimp_getCountry(position, &position, *err).extract(region, *regionLength, *err); - - if(U_FAILURE(*err)) { - goto error; - } - - *regionLength = subtagLength; - - if (*regionLength > 0) { - if (uprv_strnicmp(region, unknownRegion, *regionLength) == 0) { - /** - * If the region part is the "unknown" region, then don't return it. - **/ - *regionLength = 0; +bool CHECK_TRAILING_VARIANT_SIZE(const char* variant, int32_t variantLength) { + int32_t count = 0; + for (int32_t i = 0; i < variantLength; i++) { + if (_isIDSeparator(variant[i])) { + count = 0; + } else if (count == 8) { + return false; + } else { + count++; } - } else if (*position != 0 && *position != '@') { - /* back up over consumed trailing separator */ - --position; } - -exit: - - return (int32_t)(position - localeID); - -error: - - /** - * If we get here, we have no explicit error, it's the result of an - * illegal argument. - **/ - if (!U_FAILURE(*err)) { - *err = U_ILLEGAL_ARGUMENT_ERROR; - } - - goto exit; + return true; } -static UBool U_CALLCONV -createLikelySubtagsString( - const char* lang, - int32_t langLength, - const char* script, - int32_t scriptLength, - const char* region, - int32_t regionLength, - const char* variants, - int32_t variantsLength, - icu::ByteSink& sink, - UErrorCode* err) { - /** - * ULOC_FULLNAME_CAPACITY will provide enough capacity - * that we can build a string that contains the language, - * script and region code without worrying about overrunning - * the user-supplied buffer. - **/ - char likelySubtagsBuffer[ULOC_FULLNAME_CAPACITY]; - - if(U_FAILURE(*err)) { - goto error; +void +_uloc_addLikelySubtags(const char* localeID, + icu::ByteSink& sink, + UErrorCode& err) { + if (U_FAILURE(err)) { + return; } - /** - * Try the language with the script and region first. - **/ - if (scriptLength > 0 && regionLength > 0) { - - const char* likelySubtags = nullptr; - - icu::CharString tagBuffer; - { - icu::CharStringByteSink sink(&tagBuffer); - createTagString( - lang, - langLength, - script, - scriptLength, - region, - regionLength, - nullptr, - 0, - sink, - err); - } - if(U_FAILURE(*err)) { - goto error; - } - - likelySubtags = - findLikelySubtags( - tagBuffer.data(), - likelySubtagsBuffer, - sizeof(likelySubtagsBuffer), - err); - if(U_FAILURE(*err)) { - goto error; - } - - if (likelySubtags != nullptr) { - /* Always use the language tag from the - maximal string, since it may be more - specific than the one provided. */ - createTagStringWithAlternates( - nullptr, - 0, - nullptr, - 0, - nullptr, - 0, - variants, - variantsLength, - likelySubtags, - sink, - err); - return true; - } + if (localeID == nullptr) { + err = U_ILLEGAL_ARGUMENT_ERROR; + return; } - /** - * Try the language with just the script. - **/ - if (scriptLength > 0) { - - const char* likelySubtags = nullptr; - - icu::CharString tagBuffer; - { - icu::CharStringByteSink sink(&tagBuffer); - createTagString( - lang, - langLength, - script, - scriptLength, - nullptr, - 0, - nullptr, - 0, - sink, - err); - } - if(U_FAILURE(*err)) { - goto error; - } - - likelySubtags = - findLikelySubtags( - tagBuffer.data(), - likelySubtagsBuffer, - sizeof(likelySubtagsBuffer), - err); - if(U_FAILURE(*err)) { - goto error; - } - - if (likelySubtags != nullptr) { - /* Always use the language tag from the - maximal string, since it may be more - specific than the one provided. */ - createTagStringWithAlternates( - nullptr, - 0, - nullptr, - 0, - region, - regionLength, - variants, - variantsLength, - likelySubtags, - sink, - err); - return true; - } + icu::CharString lang; + icu::CharString script; + icu::CharString region; + icu::CharString variant; + const char* trailing = nullptr; + ulocimp_getSubtags(localeID, &lang, &script, ®ion, &variant, &trailing, err); + if (U_FAILURE(err)) { + return; } - /** - * Try the language with just the region. - **/ - if (regionLength > 0) { - - const char* likelySubtags = nullptr; - - icu::CharString tagBuffer; - { - icu::CharStringByteSink sink(&tagBuffer); - createTagString( - lang, - langLength, - nullptr, - 0, - region, - regionLength, - nullptr, - 0, - sink, - err); - } - if(U_FAILURE(*err)) { - goto error; - } - - likelySubtags = - findLikelySubtags( - tagBuffer.data(), - likelySubtagsBuffer, - sizeof(likelySubtagsBuffer), - err); - if(U_FAILURE(*err)) { - goto error; - } - - if (likelySubtags != nullptr) { - /* Always use the language tag from the - maximal string, since it may be more - specific than the one provided. */ - createTagStringWithAlternates( - nullptr, - 0, - script, - scriptLength, - nullptr, - 0, - variants, - variantsLength, - likelySubtags, - sink, - err); - return true; - } + if (!CHECK_TRAILING_VARIANT_SIZE(variant.data(), variant.length())) { + err = U_ILLEGAL_ARGUMENT_ERROR; + return; } - /** - * Finally, try just the language. - **/ - { - const char* likelySubtags = nullptr; - - icu::CharString tagBuffer; - { - icu::CharStringByteSink sink(&tagBuffer); - createTagString( - lang, - langLength, - nullptr, - 0, - nullptr, - 0, - nullptr, - 0, - sink, - err); - } - if(U_FAILURE(*err)) { - goto error; - } - - likelySubtags = - findLikelySubtags( - tagBuffer.data(), - likelySubtagsBuffer, - sizeof(likelySubtagsBuffer), - err); - if(U_FAILURE(*err)) { - goto error; - } - - if (likelySubtags != nullptr) { - /* Always use the language tag from the - maximal string, since it may be more - specific than the one provided. */ - createTagStringWithAlternates( - nullptr, - 0, - script, - scriptLength, - region, - regionLength, - variants, - variantsLength, - likelySubtags, - sink, - err); - return true; + if (lang.length() == 4) { + if (script.isEmpty()) { + script = std::move(lang); + lang.clear(); + } else { + err = U_ILLEGAL_ARGUMENT_ERROR; + return; } + } else if (lang.length() > 8) { + err = U_ILLEGAL_ARGUMENT_ERROR; + return; } - return false; - -error: - - if (!U_FAILURE(*err)) { - *err = U_ILLEGAL_ARGUMENT_ERROR; - } - - return false; -} - -#define CHECK_TRAILING_VARIANT_SIZE(trailing, trailingLength) UPRV_BLOCK_MACRO_BEGIN { \ - int32_t count = 0; \ - int32_t i; \ - for (i = 0; i < trailingLength; i++) { \ - if (trailing[i] == '-' || trailing[i] == '_') { \ - count = 0; \ - if (count > 8) { \ - goto error; \ - } \ - } else if (trailing[i] == '@') { \ - break; \ - } else if (count > 8) { \ - goto error; \ - } else { \ - count++; \ - } \ - } \ -} UPRV_BLOCK_MACRO_END - -static UBool -_uloc_addLikelySubtags(const char* localeID, - icu::ByteSink& sink, - UErrorCode* err) { - char lang[ULOC_LANG_CAPACITY]; - int32_t langLength = sizeof(lang); - char script[ULOC_SCRIPT_CAPACITY]; - int32_t scriptLength = sizeof(script); - char region[ULOC_COUNTRY_CAPACITY]; - int32_t regionLength = sizeof(region); - const char* trailing = ""; - int32_t trailingLength = 0; - int32_t trailingIndex = 0; - UBool success = false; - - if(U_FAILURE(*err)) { - goto error; - } - if (localeID == nullptr) { - goto error; - } - - trailingIndex = parseTagString( - localeID, - lang, - &langLength, - script, - &scriptLength, - region, - ®ionLength, - err); - if(U_FAILURE(*err)) { - /* Overflow indicates an illegal argument error */ - if (*err == U_BUFFER_OVERFLOW_ERROR) { - *err = U_ILLEGAL_ARGUMENT_ERROR; - } + int32_t trailingLength = (int32_t)uprv_strlen(trailing); - goto error; + const icu::LikelySubtags* likelySubtags = icu::LikelySubtags::getSingleton(err); + if (U_FAILURE(err)) { + return; } - - /* Find the length of the trailing portion. */ - while (_isIDSeparator(localeID[trailingIndex])) { - trailingIndex++; + // We need to keep l on the stack because lsr may point into internal + // memory of l. + icu::Locale l = icu::Locale::createFromName(localeID); + if (l.isBogus()) { + err = U_ILLEGAL_ARGUMENT_ERROR; + return; } - trailing = &localeID[trailingIndex]; - trailingLength = (int32_t)uprv_strlen(trailing); - - CHECK_TRAILING_VARIANT_SIZE(trailing, trailingLength); - - success = - createLikelySubtagsString( - lang, - langLength, - script, - scriptLength, - region, - regionLength, - trailing, - trailingLength, - sink, - err); - - if (!success) { - const int32_t localIDLength = (int32_t)uprv_strlen(localeID); - - /* - * If we get here, we need to return localeID. - */ - sink.Append(localeID, localIDLength); + icu::LSR lsr = likelySubtags->makeMaximizedLsrFrom(l, true, err); + if (U_FAILURE(err)) { + return; } - - return success; - -error: - - if (!U_FAILURE(*err)) { - *err = U_ILLEGAL_ARGUMENT_ERROR; + const char* language = lsr.language; + if (uprv_strcmp(language, "und") == 0) { + language = ""; } - return false; + createTagStringWithAlternates( + language, + (int32_t)uprv_strlen(language), + lsr.script, + (int32_t)uprv_strlen(lsr.script), + lsr.region, + (int32_t)uprv_strlen(lsr.region), + variant.data(), + variant.length(), + trailing, + trailingLength, + sink, + err); } -// Add likely subtags to the sink -// return true if the value in the sink is produced by a match during the lookup -// return false if the value in the sink is the same as input because there are -// no match after the lookup. -static UBool _ulocimp_addLikelySubtags(const char*, icu::ByteSink&, UErrorCode*); - -static void +void _uloc_minimizeSubtags(const char* localeID, icu::ByteSink& sink, - UErrorCode* err) { - icu::CharString maximizedTagBuffer; - - char lang[ULOC_LANG_CAPACITY]; - int32_t langLength = sizeof(lang); - char script[ULOC_SCRIPT_CAPACITY]; - int32_t scriptLength = sizeof(script); - char region[ULOC_COUNTRY_CAPACITY]; - int32_t regionLength = sizeof(region); - const char* trailing = ""; - int32_t trailingLength = 0; - int32_t trailingIndex = 0; - UBool successGetMax = false; - - if(U_FAILURE(*err)) { - goto error; - } - else if (localeID == nullptr) { - goto error; + bool favorScript, + UErrorCode& err) { + if (U_FAILURE(err)) { + return; } - trailingIndex = - parseTagString( - localeID, - lang, - &langLength, - script, - &scriptLength, - region, - ®ionLength, - err); - if(U_FAILURE(*err)) { - - /* Overflow indicates an illegal argument error */ - if (*err == U_BUFFER_OVERFLOW_ERROR) { - *err = U_ILLEGAL_ARGUMENT_ERROR; - } - - goto error; + if (localeID == nullptr) { + err = U_ILLEGAL_ARGUMENT_ERROR; + return; } - /* Find the spot where the variants or the keywords begin, if any. */ - while (_isIDSeparator(localeID[trailingIndex])) { - trailingIndex++; + icu::CharString lang; + icu::CharString script; + icu::CharString region; + icu::CharString variant; + const char* trailing = nullptr; + ulocimp_getSubtags(localeID, &lang, &script, ®ion, &variant, &trailing, err); + if (U_FAILURE(err)) { + return; } - trailing = &localeID[trailingIndex]; - trailingLength = (int32_t)uprv_strlen(trailing); - CHECK_TRAILING_VARIANT_SIZE(trailing, trailingLength); - - { - icu::CharString base; - { - icu::CharStringByteSink baseSink(&base); - createTagString( - lang, - langLength, - script, - scriptLength, - region, - regionLength, - nullptr, - 0, - baseSink, - err); - } - - /** - * First, we need to first get the maximization - * from AddLikelySubtags. - **/ - { - icu::CharStringByteSink maxSink(&maximizedTagBuffer); - successGetMax = _ulocimp_addLikelySubtags(base.data(), maxSink, err); - } + if (!CHECK_TRAILING_VARIANT_SIZE(variant.data(), variant.length())) { + err = U_ILLEGAL_ARGUMENT_ERROR; + return; } - if(U_FAILURE(*err)) { - goto error; - } + int32_t trailingLength = (int32_t)uprv_strlen(trailing); - if (!successGetMax) { - /** - * If we got here, return the locale ID parameter unchanged. - **/ - const int32_t localeIDLength = (int32_t)uprv_strlen(localeID); - sink.Append(localeID, localeIDLength); + const icu::LikelySubtags* likelySubtags = icu::LikelySubtags::getSingleton(err); + if (U_FAILURE(err)) { return; } - - // In the following, the lang, script, region are referring to those in - // the maximizedTagBuffer, not the one in the localeID. - langLength = sizeof(lang); - scriptLength = sizeof(script); - regionLength = sizeof(region); - parseTagString( - maximizedTagBuffer.data(), - lang, - &langLength, - script, - &scriptLength, - region, - ®ionLength, + icu::LSR lsr = likelySubtags->minimizeSubtags( + lang.toStringPiece(), + script.toStringPiece(), + region.toStringPiece(), + favorScript, err); - if(U_FAILURE(*err)) { - goto error; - } - - /** - * Start first with just the language. - **/ - { - icu::CharString tagBuffer; - { - icu::CharStringByteSink tagSink(&tagBuffer); - createLikelySubtagsString( - lang, - langLength, - nullptr, - 0, - nullptr, - 0, - nullptr, - 0, - tagSink, - err); - } - - if(U_FAILURE(*err)) { - goto error; - } - else if (!tagBuffer.isEmpty() && - uprv_strnicmp( - maximizedTagBuffer.data(), - tagBuffer.data(), - tagBuffer.length()) == 0) { - - createTagString( - lang, - langLength, - nullptr, - 0, - nullptr, - 0, - trailing, - trailingLength, - sink, - err); - return; - } - } - - /** - * Next, try the language and region. - **/ - if (regionLength > 0) { - - icu::CharString tagBuffer; - { - icu::CharStringByteSink tagSink(&tagBuffer); - createLikelySubtagsString( - lang, - langLength, - nullptr, - 0, - region, - regionLength, - nullptr, - 0, - tagSink, - err); - } - - if(U_FAILURE(*err)) { - goto error; - } - else if (!tagBuffer.isEmpty() && - uprv_strnicmp( - maximizedTagBuffer.data(), - tagBuffer.data(), - tagBuffer.length()) == 0) { - - createTagString( - lang, - langLength, - nullptr, - 0, - region, - regionLength, - trailing, - trailingLength, - sink, - err); - return; - } - } - - /** - * Finally, try the language and script. This is our last chance, - * since trying with all three subtags would only yield the - * maximal version that we already have. - **/ - if (scriptLength > 0) { - icu::CharString tagBuffer; - { - icu::CharStringByteSink tagSink(&tagBuffer); - createLikelySubtagsString( - lang, - langLength, - script, - scriptLength, - nullptr, - 0, - nullptr, - 0, - tagSink, - err); - } - - if(U_FAILURE(*err)) { - goto error; - } - else if (!tagBuffer.isEmpty() && - uprv_strnicmp( - maximizedTagBuffer.data(), - tagBuffer.data(), - tagBuffer.length()) == 0) { - - createTagString( - lang, - langLength, - script, - scriptLength, - nullptr, - 0, - trailing, - trailingLength, - sink, - err); - return; - } - } - - { - /** - * If we got here, return the max + trail. - **/ - createTagString( - lang, - langLength, - script, - scriptLength, - region, - regionLength, - trailing, - trailingLength, - sink, - err); + if (U_FAILURE(err)) { return; } - -error: - - if (!U_FAILURE(*err)) { - *err = U_ILLEGAL_ARGUMENT_ERROR; + const char* language = lsr.language; + if (uprv_strcmp(language, "und") == 0) { + language = ""; } -} - -static int32_t -do_canonicalize(const char* localeID, - char* buffer, - int32_t bufferCapacity, - UErrorCode* err) -{ - int32_t canonicalizedSize = uloc_canonicalize( - localeID, - buffer, - bufferCapacity, + createTagStringWithAlternates( + language, + (int32_t)uprv_strlen(language), + lsr.script, + (int32_t)uprv_strlen(lsr.script), + lsr.region, + (int32_t)uprv_strlen(lsr.region), + variant.data(), + variant.length(), + trailing, + trailingLength, + sink, err); - - if (*err == U_STRING_NOT_TERMINATED_WARNING || - *err == U_BUFFER_OVERFLOW_ERROR) { - return canonicalizedSize; - } - else if (U_FAILURE(*err)) { - - return -1; - } - else { - return canonicalizedSize; - } } +} // namespace + U_CAPI int32_t U_EXPORT2 uloc_addLikelySubtags(const char* localeID, char* maximizedLocaleID, int32_t maximizedLocaleIDCapacity, UErrorCode* status) { - if (U_FAILURE(*status)) { - return 0; - } - - icu::CheckedArrayByteSink sink( - maximizedLocaleID, maximizedLocaleIDCapacity); - - ulocimp_addLikelySubtags(localeID, sink, status); - int32_t reslen = sink.NumberOfBytesAppended(); - - if (U_FAILURE(*status)) { - return sink.Overflowed() ? reslen : -1; - } - - if (sink.Overflowed()) { - *status = U_BUFFER_OVERFLOW_ERROR; - } else { - u_terminateChars( - maximizedLocaleID, maximizedLocaleIDCapacity, reslen, status); - } - - return reslen; + return icu::ByteSinkUtil::viaByteSinkToTerminatedChars( + maximizedLocaleID, maximizedLocaleIDCapacity, + [&](icu::ByteSink& sink, UErrorCode& status) { + ulocimp_addLikelySubtags(localeID, sink, status); + }, + *status); } -static UBool -_ulocimp_addLikelySubtags(const char* localeID, - icu::ByteSink& sink, - UErrorCode* status) { - PreflightingLocaleIDBuffer localeBuffer; - do { - localeBuffer.requestedCapacity = do_canonicalize(localeID, localeBuffer.getBuffer(), - localeBuffer.getCapacity(), status); - } while (localeBuffer.needToTryAgain(status)); - - if (U_SUCCESS(*status)) { - return _uloc_addLikelySubtags(localeBuffer.getBuffer(), sink, status); - } else { - return false; - } +U_EXPORT icu::CharString +ulocimp_addLikelySubtags(const char* localeID, + UErrorCode& status) { + return icu::ByteSinkUtil::viaByteSinkToCharString( + [&](icu::ByteSink& sink, UErrorCode& status) { + ulocimp_addLikelySubtags(localeID, sink, status); + }, + status); } -U_CAPI void U_EXPORT2 +U_EXPORT void ulocimp_addLikelySubtags(const char* localeID, icu::ByteSink& sink, - UErrorCode* status) { - _ulocimp_addLikelySubtags(localeID, sink, status); + UErrorCode& status) { + if (U_FAILURE(status)) { return; } + icu::CharString localeBuffer = ulocimp_canonicalize(localeID, status); + _uloc_addLikelySubtags(localeBuffer.data(), sink, status); } U_CAPI int32_t U_EXPORT2 @@ -1264,41 +308,33 @@ uloc_minimizeSubtags(const char* localeID, char* minimizedLocaleID, int32_t minimizedLocaleIDCapacity, UErrorCode* status) { - if (U_FAILURE(*status)) { - return 0; - } - - icu::CheckedArrayByteSink sink( - minimizedLocaleID, minimizedLocaleIDCapacity); - - ulocimp_minimizeSubtags(localeID, sink, status); - int32_t reslen = sink.NumberOfBytesAppended(); - - if (U_FAILURE(*status)) { - return sink.Overflowed() ? reslen : -1; - } - - if (sink.Overflowed()) { - *status = U_BUFFER_OVERFLOW_ERROR; - } else { - u_terminateChars( - minimizedLocaleID, minimizedLocaleIDCapacity, reslen, status); - } + return icu::ByteSinkUtil::viaByteSinkToTerminatedChars( + minimizedLocaleID, minimizedLocaleIDCapacity, + [&](icu::ByteSink& sink, UErrorCode& status) { + ulocimp_minimizeSubtags(localeID, sink, false, status); + }, + *status); +} - return reslen; +U_EXPORT icu::CharString +ulocimp_minimizeSubtags(const char* localeID, + bool favorScript, + UErrorCode& status) { + return icu::ByteSinkUtil::viaByteSinkToCharString( + [&](icu::ByteSink& sink, UErrorCode& status) { + ulocimp_minimizeSubtags(localeID, sink, favorScript, status); + }, + status); } -U_CAPI void U_EXPORT2 +U_EXPORT void ulocimp_minimizeSubtags(const char* localeID, icu::ByteSink& sink, - UErrorCode* status) { - PreflightingLocaleIDBuffer localeBuffer; - do { - localeBuffer.requestedCapacity = do_canonicalize(localeID, localeBuffer.getBuffer(), - localeBuffer.getCapacity(), status); - } while (localeBuffer.needToTryAgain(status)); - - _uloc_minimizeSubtags(localeBuffer.getBuffer(), sink, status); + bool favorScript, + UErrorCode& status) { + if (U_FAILURE(status)) { return; } + icu::CharString localeBuffer = ulocimp_canonicalize(localeID, status); + _uloc_minimizeSubtags(localeBuffer.data(), sink, favorScript, status); } // Pairs of (language subtag, + or -) for finding out fast if common languages @@ -1310,22 +346,16 @@ static const char LANG_DIR_STRING[] = U_CAPI UBool U_EXPORT2 uloc_isRightToLeft(const char *locale) { UErrorCode errorCode = U_ZERO_ERROR; - char script[8]; - int32_t scriptLength = uloc_getScript(locale, script, UPRV_LENGTHOF(script), &errorCode); - if (U_FAILURE(errorCode) || errorCode == U_STRING_NOT_TERMINATED_WARNING || - scriptLength == 0) { + icu::CharString lang; + icu::CharString script; + ulocimp_getSubtags(locale, &lang, &script, nullptr, nullptr, nullptr, errorCode); + if (U_FAILURE(errorCode) || script.isEmpty()) { // Fastpath: We know the likely scripts and their writing direction // for some common languages. - errorCode = U_ZERO_ERROR; - 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; - } - if (langLength > 0) { - const char* langPtr = uprv_strstr(LANG_DIR_STRING, lang); + if (!lang.isEmpty()) { + const char* langPtr = uprv_strstr(LANG_DIR_STRING, lang.data()); if (langPtr != nullptr) { - switch (langPtr[langLength]) { + switch (langPtr[lang.length()]) { case '-': return false; case '+': return true; default: break; // partial match of a longer code @@ -1334,21 +364,16 @@ uloc_isRightToLeft(const char *locale) { } // Otherwise, find the likely script. errorCode = U_ZERO_ERROR; - icu::CharString likely; - { - icu::CharStringByteSink sink(&likely); - ulocimp_addLikelySubtags(locale, sink, &errorCode); - } - if (U_FAILURE(errorCode) || errorCode == U_STRING_NOT_TERMINATED_WARNING) { + icu::CharString likely = ulocimp_addLikelySubtags(locale, errorCode); + if (U_FAILURE(errorCode)) { return false; } - scriptLength = uloc_getScript(likely.data(), script, UPRV_LENGTHOF(script), &errorCode); - if (U_FAILURE(errorCode) || errorCode == U_STRING_NOT_TERMINATED_WARNING || - scriptLength == 0) { + ulocimp_getSubtags(likely.data(), nullptr, &script, nullptr, nullptr, nullptr, errorCode); + if (U_FAILURE(errorCode) || script.isEmpty()) { return false; } } - UScriptCode scriptCode = (UScriptCode)u_getPropertyValueEnum(UCHAR_SCRIPT, script); + UScriptCode scriptCode = (UScriptCode)u_getPropertyValueEnum(UCHAR_SCRIPT, script.data()); return uscript_isRightToLeft(scriptCode); } @@ -1361,55 +386,52 @@ Locale::isRightToLeft() const { U_NAMESPACE_END -// The following must at least allow for rg key value (6) plus terminator (1). -#define ULOC_RG_BUFLEN 8 - -U_CAPI int32_t U_EXPORT2 -ulocimp_getRegionForSupplementalData(const char *localeID, UBool inferRegion, - char *region, int32_t regionCapacity, UErrorCode* status) { - if (U_FAILURE(*status)) { - return 0; - } - char rgBuf[ULOC_RG_BUFLEN]; - UErrorCode rgStatus = U_ZERO_ERROR; - - // First check for rg keyword value - int32_t rgLen = uloc_getKeywordValue(localeID, "rg", rgBuf, ULOC_RG_BUFLEN, &rgStatus); - if (U_FAILURE(rgStatus) || rgLen != 6) { - rgLen = 0; - } else { - // rgBuf guaranteed to be zero terminated here, with text len 6 - char *rgPtr = rgBuf; - for (; *rgPtr!= 0; rgPtr++) { - *rgPtr = uprv_toupper(*rgPtr); +namespace { +icu::CharString +GetRegionFromKey(const char* localeID, const char* key, UErrorCode& status) { + icu::CharString result; + + // First check for keyword value + icu::CharString kw = ulocimp_getKeywordValue(localeID, key, status); + int32_t len = kw.length(); + if (U_SUCCESS(status) && len >= 3 && len <= 7) { + // chop off the subdivision code (which will generally be "zzzz" anyway) + const char* const data = kw.data(); + if (uprv_isASCIILetter(data[0])) { + result.append(uprv_toupper(data[0]), status); + result.append(uprv_toupper(data[1]), status); + } else { + // assume three-digit region code + result.append(data, 3, status); } - rgLen = (uprv_strcmp(rgBuf+2, "ZZZZ") == 0)? 2: 0; } + return result; +} +} // namespace - if (rgLen == 0) { +U_EXPORT icu::CharString +ulocimp_getRegionForSupplementalData(const char *localeID, bool inferRegion, + UErrorCode& status) { + if (U_FAILURE(status)) { + return {}; + } + icu::CharString rgBuf = GetRegionFromKey(localeID, "rg", status); + if (U_SUCCESS(status) && rgBuf.isEmpty()) { // No valid rg keyword value, try for unicode_region_subtag - rgLen = uloc_getCountry(localeID, rgBuf, ULOC_RG_BUFLEN, status); - if (U_FAILURE(*status)) { - rgLen = 0; - } else if (rgLen == 0 && inferRegion) { - // no unicode_region_subtag but inferRegion true, try likely subtags - rgStatus = U_ZERO_ERROR; - icu::CharString locBuf; - { - icu::CharStringByteSink sink(&locBuf); - ulocimp_addLikelySubtags(localeID, sink, &rgStatus); - } - if (U_SUCCESS(rgStatus)) { - rgLen = uloc_getCountry(locBuf.data(), rgBuf, ULOC_RG_BUFLEN, status); - if (U_FAILURE(*status)) { - rgLen = 0; + rgBuf = ulocimp_getRegion(localeID, status); + if (U_SUCCESS(status) && rgBuf.isEmpty() && inferRegion) { + // Second check for sd keyword value + rgBuf = GetRegionFromKey(localeID, "sd", status); + if (U_SUCCESS(status) && rgBuf.isEmpty()) { + // no unicode_region_subtag but inferRegion true, try likely subtags + UErrorCode rgStatus = U_ZERO_ERROR; + icu::CharString locBuf = ulocimp_addLikelySubtags(localeID, rgStatus); + if (U_SUCCESS(rgStatus)) { + rgBuf = ulocimp_getRegion(locBuf.data(), status); } } } } - rgBuf[rgLen] = 0; - uprv_strncpy(region, rgBuf, regionCapacity); - return u_terminateChars(region, regionCapacity, rgLen, status); + return rgBuf; } - diff --git a/contrib/libs/icu/common/loclikelysubtags.cpp b/contrib/libs/icu/common/loclikelysubtags.cpp index e913c66a35..c182191057 100644 --- a/contrib/libs/icu/common/loclikelysubtags.cpp +++ b/contrib/libs/icu/common/loclikelysubtags.cpp @@ -11,6 +11,7 @@ #include "unicode/locid.h" #include "unicode/uobject.h" #include "unicode/ures.h" +#include "unicode/uscript.h" #include "charstr.h" #include "cstring.h" #include "loclikelysubtags.h" @@ -23,6 +24,7 @@ #include "uniquecharstr.h" #include "uresdata.h" #include "uresimp.h" +#include "uvector.h" U_NAMESPACE_BEGIN @@ -49,8 +51,7 @@ LocaleDistanceData::~LocaleDistanceData() { delete[] paradigms; } -// TODO(ICU-20777): Rename to just LikelySubtagsData. -struct XLikelySubtagsData { +struct LikelySubtagsData { UResourceBundle *langInfoBundle = nullptr; UniqueCharStrings strings; CharStringMap languageAliases; @@ -61,14 +62,15 @@ struct XLikelySubtagsData { LocaleDistanceData distanceData; - XLikelySubtagsData(UErrorCode &errorCode) : strings(errorCode) {} + LikelySubtagsData(UErrorCode &errorCode) : strings(errorCode) {} - ~XLikelySubtagsData() { + ~LikelySubtagsData() { ures_close(langInfoBundle); delete[] lsrs; } void load(UErrorCode &errorCode) { + if (U_FAILURE(errorCode)) { return; } langInfoBundle = ures_openDirect(nullptr, "langInfo", &errorCode); if (U_FAILURE(errorCode)) { return; } StackUResourceBundle stackTempBundle; @@ -81,11 +83,18 @@ struct XLikelySubtagsData { // Read all strings in the resource bundle and convert them to invariant char *. LocalMemory<int32_t> languageIndexes, regionIndexes, lsrSubtagIndexes; int32_t languagesLength = 0, regionsLength = 0, lsrSubtagsLength = 0; + ResourceArray m49Array; + if (likelyTable.findValue("m49", value)) { + m49Array = value.getArray(errorCode); + } else { + errorCode = U_MISSING_RESOURCE_ERROR; + return; + } if (!readStrings(likelyTable, "languageAliases", value, languageIndexes, languagesLength, errorCode) || !readStrings(likelyTable, "regionAliases", value, regionIndexes, regionsLength, errorCode) || - !readStrings(likelyTable, "lsrs", value, + !readLSREncodedStrings(likelyTable, "lsrnum", value, m49Array, lsrSubtagIndexes,lsrSubtagsLength, errorCode)) { return; } @@ -136,7 +145,7 @@ struct XLikelySubtagsData { if (!readStrings(matchTable, "partitions", value, partitionIndexes, partitionsLength, errorCode) || - !readStrings(matchTable, "paradigms", value, + !readLSREncodedStrings(matchTable, "paradigmnum", value, m49Array, paradigmSubtagIndexes, paradigmSubtagsLength, errorCode)) { return; } @@ -222,6 +231,7 @@ struct XLikelySubtagsData { private: bool readStrings(const ResourceTable &table, const char *key, ResourceValue &value, LocalMemory<int32_t> &indexes, int32_t &length, UErrorCode &errorCode) { + if (U_FAILURE(errorCode)) { return false; } if (table.findValue(key, value)) { ResourceArray stringArray = value.getArray(errorCode); if (U_FAILURE(errorCode)) { return false; } @@ -233,10 +243,97 @@ private: return false; } for (int i = 0; i < length; ++i) { - stringArray.getValue(i, value); // returns true because i < length - rawIndexes[i] = strings.add(value.getUnicodeString(errorCode), errorCode); + if (stringArray.getValue(i, value)) { // returns true because i < length + int32_t strLength = 0; + rawIndexes[i] = strings.add(value.getString(strLength, errorCode), errorCode); + if (U_FAILURE(errorCode)) { return false; } + } + } + } + return true; + } + UnicodeString toLanguage(int encoded) { + if (encoded == 0) { + return UNICODE_STRING_SIMPLE(""); + } + if (encoded == 1) { + return UNICODE_STRING_SIMPLE("skip"); + } + encoded &= 0x00ffffff; + encoded %= 27*27*27; + char lang[3]; + lang[0] = 'a' + ((encoded % 27) - 1); + lang[1] = 'a' + (((encoded / 27 ) % 27) - 1); + if (encoded / (27 * 27) == 0) { + return UnicodeString(lang, 2, US_INV); + } + lang[2] = 'a' + ((encoded / (27 * 27)) - 1); + return UnicodeString(lang, 3, US_INV); + } + UnicodeString toScript(int encoded) { + if (encoded == 0) { + return UNICODE_STRING_SIMPLE(""); + } + if (encoded == 1) { + return UNICODE_STRING_SIMPLE("script"); + } + encoded = (encoded >> 24) & 0x000000ff; + const char* script = uscript_getShortName(static_cast<UScriptCode>(encoded)); + if (script == nullptr) { + return UNICODE_STRING_SIMPLE(""); + } + U_ASSERT(uprv_strlen(script) == 4); + return UnicodeString(script, 4, US_INV); + } + UnicodeString m49IndexToCode(const ResourceArray &m49Array, ResourceValue &value, int index, UErrorCode &errorCode) { + if (U_FAILURE(errorCode)) { + return UNICODE_STRING_SIMPLE(""); + } + if (m49Array.getValue(index, value)) { + return value.getUnicodeString(errorCode); + } + // "m49" does not include the index. + errorCode = U_MISSING_RESOURCE_ERROR; + return UNICODE_STRING_SIMPLE(""); + } + + UnicodeString toRegion(const ResourceArray& m49Array, ResourceValue &value, int encoded, UErrorCode &errorCode) { + if (U_FAILURE(errorCode) || encoded == 0 || encoded == 1) { + return UNICODE_STRING_SIMPLE(""); + } + encoded &= 0x00ffffff; + encoded /= 27 * 27 * 27; + encoded %= 27 * 27; + if (encoded < 27) { + // Selected M49 code index, find the code from "m49" resource. + return m49IndexToCode(m49Array, value, encoded, errorCode); + } + char region[2]; + region[0] = 'A' + ((encoded % 27) - 1); + region[1] = 'A' + (((encoded / 27) % 27) - 1); + return UnicodeString(region, 2, US_INV); + } + + bool readLSREncodedStrings(const ResourceTable &table, const char* key, ResourceValue &value, const ResourceArray& m49Array, + LocalMemory<int32_t> &indexes, int32_t &length, UErrorCode &errorCode) { + if (U_FAILURE(errorCode)) { return false; } + if (table.findValue(key, value)) { + const int32_t* vectors = value.getIntVector(length, errorCode); + if (U_FAILURE(errorCode)) { return false; } + if (length == 0) { return true; } + int32_t *rawIndexes = indexes.allocateInsteadAndCopy(length * 3); + if (rawIndexes == nullptr) { + errorCode = U_MEMORY_ALLOCATION_ERROR; + return false; + } + for (int i = 0; i < length; ++i) { + rawIndexes[i*3] = strings.addByValue(toLanguage(vectors[i]), errorCode); + rawIndexes[i*3+1] = strings.addByValue(toScript(vectors[i]), errorCode); + rawIndexes[i*3+2] = strings.addByValue( + toRegion(m49Array, value, vectors[i], errorCode), errorCode); if (U_FAILURE(errorCode)) { return false; } } + length *= 3; } return true; } @@ -244,39 +341,143 @@ private: namespace { -XLikelySubtags *gLikelySubtags = nullptr; +LikelySubtags *gLikelySubtags = nullptr; +UVector *gMacroregions = nullptr; UInitOnce gInitOnce {}; UBool U_CALLCONV cleanup() { delete gLikelySubtags; gLikelySubtags = nullptr; + delete gMacroregions; + gMacroregions = nullptr; gInitOnce.reset(); return true; } +constexpr const char16_t* MACROREGION_HARDCODE[] = { + u"001~3", + u"005", + u"009", + u"011", + u"013~5", + u"017~9", + u"021", + u"029", + u"030", + u"034~5", + u"039", + u"053~4", + u"057", + u"061", + u"142~3", + u"145", + u"150~1", + u"154~5", + u"202", + u"419", + u"EU", + u"EZ", + u"QO", + u"UN", +}; + +constexpr char16_t RANGE_MARKER = 0x7E; /* '~' */ +void processMacroregionRange(const UnicodeString& regionName, UVector* newMacroRegions, UErrorCode& status) { + if (U_FAILURE(status)) { return; } + int32_t rangeMarkerLocation = regionName.indexOf(RANGE_MARKER); + char16_t buf[6]; + regionName.extract(buf,6,status); + if ( rangeMarkerLocation > 0 ) { + char16_t endRange = regionName.charAt(rangeMarkerLocation+1); + buf[rangeMarkerLocation] = 0; + while ( buf[rangeMarkerLocation-1] <= endRange && U_SUCCESS(status)) { + LocalPointer<UnicodeString> newRegion(new UnicodeString(buf), status); + newMacroRegions->adoptElement(newRegion.orphan(),status); + buf[rangeMarkerLocation-1]++; + } + } else { + LocalPointer<UnicodeString> newRegion(new UnicodeString(regionName), status); + newMacroRegions->adoptElement(newRegion.orphan(),status); + } +} + +#if U_DEBUG +UVector* loadMacroregions(UErrorCode &status) { + if (U_FAILURE(status)) { return nullptr; } + LocalPointer<UVector> newMacroRegions(new UVector(uprv_deleteUObject, uhash_compareUnicodeString, status), status); + + LocalUResourceBundlePointer supplementalData(ures_openDirect(nullptr,"supplementalData",&status)); + LocalUResourceBundlePointer idValidity(ures_getByKey(supplementalData.getAlias(),"idValidity",nullptr,&status)); + LocalUResourceBundlePointer regionList(ures_getByKey(idValidity.getAlias(),"region",nullptr,&status)); + LocalUResourceBundlePointer regionMacro(ures_getByKey(regionList.getAlias(),"macroregion",nullptr,&status)); + + if (U_FAILURE(status)) { + return nullptr; + } + + while (ures_hasNext(regionMacro.getAlias())) { + UnicodeString regionName = ures_getNextUnicodeString(regionMacro.getAlias(),nullptr,&status); + processMacroregionRange(regionName, newMacroRegions.getAlias(), status); + if (U_FAILURE(status)) { + return nullptr; + } + } + + return newMacroRegions.orphan(); +} +#endif // U_DEBUG + +UVector* getStaticMacroregions(UErrorCode &status) { + if (U_FAILURE(status)) { return nullptr; } + LocalPointer<UVector> newMacroRegions(new UVector(uprv_deleteUObject, uhash_compareUnicodeString, status), status); + + if (U_FAILURE(status)) { + return nullptr; + } + + for (const auto *region : MACROREGION_HARDCODE) { + UnicodeString regionName(region); + processMacroregionRange(regionName, newMacroRegions.getAlias(), status); + if (U_FAILURE(status)) { + return nullptr; + } + } + + return newMacroRegions.orphan(); +} + } // namespace -void U_CALLCONV XLikelySubtags::initLikelySubtags(UErrorCode &errorCode) { +void U_CALLCONV LikelySubtags::initLikelySubtags(UErrorCode &errorCode) { // This function is invoked only via umtx_initOnce(). U_ASSERT(gLikelySubtags == nullptr); - XLikelySubtagsData data(errorCode); + LikelySubtagsData data(errorCode); data.load(errorCode); if (U_FAILURE(errorCode)) { return; } - gLikelySubtags = new XLikelySubtags(data); - if (gLikelySubtags == nullptr) { + gLikelySubtags = new LikelySubtags(data); + gMacroregions = getStaticMacroregions(errorCode); +#if U_DEBUG + auto macroregionsFromData = loadMacroregions(errorCode); + U_ASSERT((*gMacroregions) == (*macroregionsFromData)); + delete macroregionsFromData; +#endif + if (U_FAILURE(errorCode) || gLikelySubtags == nullptr || gMacroregions == nullptr) { + delete gLikelySubtags; + delete gMacroregions; errorCode = U_MEMORY_ALLOCATION_ERROR; return; } + ucln_common_registerCleanup(UCLN_COMMON_LIKELY_SUBTAGS, cleanup); } -const XLikelySubtags *XLikelySubtags::getSingleton(UErrorCode &errorCode) { +const LikelySubtags *LikelySubtags::getSingleton(UErrorCode &errorCode) { if (U_FAILURE(errorCode)) { return nullptr; } - umtx_initOnce(gInitOnce, &XLikelySubtags::initLikelySubtags, errorCode); + umtx_initOnce(gInitOnce, &LikelySubtags::initLikelySubtags, errorCode); return gLikelySubtags; } -XLikelySubtags::XLikelySubtags(XLikelySubtagsData &data) : +LikelySubtags::LikelySubtags(LikelySubtagsData &data) : langInfoBundle(data.langInfoBundle), strings(data.strings.orphanCharStrings()), languageAliases(std::move(data.languageAliases)), @@ -285,7 +486,7 @@ XLikelySubtags::XLikelySubtags(XLikelySubtagsData &data) : lsrs(data.lsrs), #if U_DEBUG lsrsLength(data.lsrsLength), -#endif +#endif // U_DEBUG distanceData(std::move(data.distanceData)) { data.langInfoBundle = nullptr; data.lsrs = nullptr; @@ -311,21 +512,39 @@ XLikelySubtags::XLikelySubtags(XLikelySubtagsData &data) : } } -XLikelySubtags::~XLikelySubtags() { +LikelySubtags::~LikelySubtags() { ures_close(langInfoBundle); delete strings; delete[] lsrs; } -LSR XLikelySubtags::makeMaximizedLsrFrom(const Locale &locale, UErrorCode &errorCode) const { +LSR LikelySubtags::makeMaximizedLsrFrom(const Locale &locale, + bool returnInputIfUnmatch, + UErrorCode &errorCode) const { + if (U_FAILURE(errorCode)) { return {}; } + if (locale.isBogus()) { + errorCode = U_ILLEGAL_ARGUMENT_ERROR; + return {}; + } const char *name = locale.getName(); if (uprv_isAtSign(name[0]) && name[1] == 'x' && name[2] == '=') { // name.startsWith("@x=") // Private use language tag x-subtag-subtag... which CLDR changes to // und-x-subtag-subtag... return LSR(name, "", "", LSR::EXPLICIT_LSR); } - return makeMaximizedLsr(locale.getLanguage(), locale.getScript(), locale.getCountry(), - locale.getVariant(), errorCode); + LSR max = makeMaximizedLsr(locale.getLanguage(), locale.getScript(), locale.getCountry(), + locale.getVariant(), returnInputIfUnmatch, errorCode); + + if (uprv_strlen(max.language) == 0 && + uprv_strlen(max.script) == 0 && + uprv_strlen(max.region) == 0) { + // No match. ICU API mandate us to + // If the provided ULocale instance is already in the maximal form, or + // there is no data available available for maximization, it will be + // returned. + return LSR(locale.getLanguage(), locale.getScript(), locale.getCountry(), LSR::EXPLICIT_LSR, errorCode); + } + return max; } namespace { @@ -337,8 +556,11 @@ const char *getCanonical(const CharStringMap &aliases, const char *alias) { } // namespace -LSR XLikelySubtags::makeMaximizedLsr(const char *language, const char *script, const char *region, - const char *variant, UErrorCode &errorCode) const { +LSR LikelySubtags::makeMaximizedLsr(const char *language, const char *script, const char *region, + const char *variant, + bool returnInputIfUnmatch, + UErrorCode &errorCode) const { + if (U_FAILURE(errorCode)) { return {}; } // Handle pseudolocales like en-XA, ar-XB, fr-PSCRACK. // They should match only themselves, // not other locales with what looks like the same language and script subtags. @@ -346,12 +568,21 @@ LSR XLikelySubtags::makeMaximizedLsr(const char *language, const char *script, c if (region[0] == 'X' && (c1 = region[1]) != 0 && region[2] == 0) { switch (c1) { case 'A': + if (returnInputIfUnmatch) { + return LSR(language, script, region, LSR::EXPLICIT_LSR); + } return LSR(PSEUDO_ACCENTS_PREFIX, language, script, region, LSR::EXPLICIT_LSR, errorCode); case 'B': + if (returnInputIfUnmatch) { + return LSR(language, script, region, LSR::EXPLICIT_LSR); + } return LSR(PSEUDO_BIDI_PREFIX, language, script, region, LSR::EXPLICIT_LSR, errorCode); case 'C': + if (returnInputIfUnmatch) { + return LSR(language, script, region, LSR::EXPLICIT_LSR); + } return LSR(PSEUDO_CRACKED_PREFIX, language, script, region, LSR::EXPLICIT_LSR, errorCode); default: // normal locale @@ -378,64 +609,90 @@ LSR XLikelySubtags::makeMaximizedLsr(const char *language, const char *script, c language = getCanonical(languageAliases, language); // (We have no script mappings.) region = getCanonical(regionAliases, region); - return maximize(language, script, region); + return maximize(language, script, region, returnInputIfUnmatch, errorCode); } -LSR XLikelySubtags::maximize(const char *language, const char *script, const char *region) const { - if (uprv_strcmp(language, "und") == 0) { +LSR LikelySubtags::maximize(const char *language, const char *script, const char *region, + bool returnInputIfUnmatch, + UErrorCode &errorCode) const { + if (U_FAILURE(errorCode)) { return {}; } + return maximize({language, (int32_t)uprv_strlen(language)}, + {script, (int32_t)uprv_strlen(script)}, + {region, (int32_t)uprv_strlen(region)}, + returnInputIfUnmatch, + errorCode); +} + +bool LikelySubtags::isMacroregion(StringPiece& region, UErrorCode& errorCode) const { + if (U_FAILURE(errorCode)) { return false; } + // In Java, we use Region class. In C++, since Region is under i18n, + // we read the same data used by Region into gMacroregions avoid dependency + // from common to i18n/region.cpp + umtx_initOnce(gInitOnce, &LikelySubtags::initLikelySubtags, errorCode); + if (U_FAILURE(errorCode)) { return false; } + UnicodeString str(UnicodeString::fromUTF8(region)); + return gMacroregions->contains((void *)&str); +} + +LSR LikelySubtags::maximize(StringPiece language, StringPiece script, StringPiece region, + bool returnInputIfUnmatch, + UErrorCode &errorCode) const { + if (U_FAILURE(errorCode)) { return {}; } + if (language.compare("und") == 0) { language = ""; } - if (uprv_strcmp(script, "Zzzz") == 0) { + if (script.compare("Zzzz") == 0) { script = ""; } - if (uprv_strcmp(region, "ZZ") == 0) { + if (region.compare("ZZ") == 0) { region = ""; } - if (*script != 0 && *region != 0 && *language != 0) { - return LSR(language, script, region, LSR::EXPLICIT_LSR); // already maximized + if (!script.empty() && !region.empty() && !language.empty()) { + return LSR(language, script, region, LSR::EXPLICIT_LSR, errorCode); // already maximized } + bool retainLanguage = false; + bool retainScript = false; + bool retainRegion = false; - uint32_t retainOldMask = 0; BytesTrie iter(trie); uint64_t state; int32_t value; // Small optimization: Array lookup for first language letter. int32_t c0; - if (0 <= (c0 = uprv_lowerOrdinal(language[0])) && c0 <= 25 && - language[1] != 0 && // language.length() >= 2 + if (0 <= (c0 = uprv_lowerOrdinal(language.data()[0])) && c0 <= 25 && + language.length() >= 2 && (state = trieFirstLetterStates[c0]) != 0) { value = trieNext(iter.resetToState64(state), language, 1); } else { value = trieNext(iter, language, 0); } + bool matchLanguage = (value >= 0); + bool matchScript = false; if (value >= 0) { - if (*language != 0) { - retainOldMask |= 4; - } + retainLanguage = !language.empty(); state = iter.getState64(); } else { - retainOldMask |= 4; + retainLanguage = true; iter.resetToState64(trieUndState); // "und" ("*") state = 0; } + if (value >= 0 && !script.empty()) { + matchScript = true; + } if (value > 0) { // Intermediate or final value from just language. if (value == SKIP_SCRIPT) { value = 0; } - if (*script != 0) { - retainOldMask |= 2; - } + retainScript = !script.empty(); } else { value = trieNext(iter, script, 0); if (value >= 0) { - if (*script != 0) { - retainOldMask |= 2; - } + retainScript = !script.empty(); state = iter.getState64(); } else { - retainOldMask |= 2; + retainScript = true; if (state == 0) { iter.resetToState64(trieUndZzzzState); // "und-Zzzz" ("**") } else { @@ -447,19 +704,19 @@ LSR XLikelySubtags::maximize(const char *language, const char *script, const cha } } + bool matchRegion = false; if (value > 0) { // Final value from just language or language+script. - if (*region != 0) { - retainOldMask |= 1; - } + retainRegion = !region.empty(); } else { value = trieNext(iter, region, 0); if (value >= 0) { - if (*region != 0) { - retainOldMask |= 1; + if (!region.empty() && !isMacroregion(region, errorCode)) { + retainRegion = true; + matchRegion = true; } } else { - retainOldMask |= 1; + retainRegion = true; if (state == 0) { value = defaultLsrIndex; } else { @@ -470,31 +727,36 @@ LSR XLikelySubtags::maximize(const char *language, const char *script, const cha } } U_ASSERT(value < lsrsLength); - const LSR &result = lsrs[value]; + const LSR &matched = lsrs[value]; - if (*language == 0) { - language = "und"; + if (returnInputIfUnmatch && + (!(matchLanguage || matchScript || (matchRegion && language.empty())))) { + return LSR("", "", "", LSR::EXPLICIT_LSR, errorCode); // no matching. + } + if (language.empty()) { + language = StringPiece("und"); } - if (retainOldMask == 0) { + if (!(retainLanguage || retainScript || retainRegion)) { // Quickly return a copy of the lookup-result LSR // without new allocation of the subtags. - return LSR(result.language, result.script, result.region, result.flags); + return LSR(matched.language, matched.script, matched.region, matched.flags); } - if ((retainOldMask & 4) == 0) { - language = result.language; + if (!retainLanguage) { + language = matched.language; } - if ((retainOldMask & 2) == 0) { - script = result.script; + if (!retainScript) { + script = matched.script; } - if ((retainOldMask & 1) == 0) { - region = result.region; + if (!retainRegion) { + region = matched.region; } + int32_t retainMask = (retainLanguage ? 4 : 0) + (retainScript ? 2 : 0) + (retainRegion ? 1 : 0); // retainOldMask flags = LSR explicit-subtag flags - return LSR(language, script, region, retainOldMask); + return LSR(language, script, region, retainMask, errorCode); } -int32_t XLikelySubtags::compareLikely(const LSR &lsr, const LSR &other, int32_t likelyInfo) const { +int32_t LikelySubtags::compareLikely(const LSR &lsr, const LSR &other, int32_t likelyInfo) const { // If likelyInfo >= 0: // likelyInfo bit 1 is set if the previous comparison with lsr // was for equal language and script. @@ -536,7 +798,7 @@ int32_t XLikelySubtags::compareLikely(const LSR &lsr, const LSR &other, int32_t } // Subset of maximize(). -int32_t XLikelySubtags::getLikelyIndex(const char *language, const char *script) const { +int32_t LikelySubtags::getLikelyIndex(const char *language, const char *script) const { if (uprv_strcmp(language, "und") == 0) { language = ""; } @@ -594,7 +856,7 @@ int32_t XLikelySubtags::getLikelyIndex(const char *language, const char *script) return value; } -int32_t XLikelySubtags::trieNext(BytesTrie &iter, const char *s, int32_t i) { +int32_t LikelySubtags::trieNext(BytesTrie &iter, const char *s, int32_t i) { UStringTrieResult result; uint8_t c; if ((c = s[i]) == 0) { @@ -627,57 +889,88 @@ int32_t XLikelySubtags::trieNext(BytesTrie &iter, const char *s, int32_t i) { default: return -1; } } +int32_t LikelySubtags::trieNext(BytesTrie &iter, StringPiece s, int32_t i) { + UStringTrieResult result; + uint8_t c; + if (s.length() == i) { + result = iter.next(u'*'); + } else { + c = s.data()[i]; + for (;;) { + c = uprv_invCharToAscii(c); + // EBCDIC: If s[i] is not an invariant character, + // then c is now 0 and will simply not match anything, which is harmless. + if (i+1 != s.length()) { + if (!USTRINGTRIE_HAS_NEXT(iter.next(c))) { + return -1; + } + c = s.data()[++i]; + } else { + // last character of this subtag + result = iter.next(c | 0x80); + break; + } + } + } + switch (result) { + case USTRINGTRIE_NO_MATCH: return -1; + case USTRINGTRIE_NO_VALUE: return 0; + case USTRINGTRIE_INTERMEDIATE_VALUE: + U_ASSERT(iter.getValue() == SKIP_SCRIPT); + return SKIP_SCRIPT; + case USTRINGTRIE_FINAL_VALUE: return iter.getValue(); + default: return -1; + } +} -// TODO(ICU-20777): Switch Locale/uloc_ likely-subtags API from the old code -// in loclikely.cpp to this new code, including activating this -// minimizeSubtags() function. The LocaleMatcher does not minimize. -#if 0 -LSR XLikelySubtags::minimizeSubtags(const char *languageIn, const char *scriptIn, - const char *regionIn, ULocale.Minimize fieldToFavor, +LSR LikelySubtags::minimizeSubtags(StringPiece language, StringPiece script, + StringPiece region, + bool favorScript, UErrorCode &errorCode) const { - LSR result = maximize(languageIn, scriptIn, regionIn); - - // We could try just a series of checks, like: - // LSR result2 = addLikelySubtags(languageIn, "", ""); - // if result.equals(result2) return result2; - // However, we can optimize 2 of the cases: - // (languageIn, "", "") - // (languageIn, "", regionIn) - - // value00 = lookup(result.language, "", "") - BytesTrie iter = new BytesTrie(trie); - int value = trieNext(iter, result.language, 0); - U_ASSERT(value >= 0); - if (value == 0) { - value = trieNext(iter, "", 0); - U_ASSERT(value >= 0); - if (value == 0) { - value = trieNext(iter, "", 0); - } - } - U_ASSERT(value > 0); - LSR value00 = lsrs[value]; - boolean favorRegionOk = false; - if (result.script.equals(value00.script)) { //script is default - if (result.region.equals(value00.region)) { - return new LSR(result.language, "", "", LSR.DONT_CARE_FLAGS); - } else if (fieldToFavor == ULocale.Minimize.FAVOR_REGION) { - return new LSR(result.language, "", result.region, LSR.DONT_CARE_FLAGS); - } else { - favorRegionOk = true; + if (U_FAILURE(errorCode)) { return {}; } + LSR max = maximize(language, script, region, true, errorCode); + if (U_FAILURE(errorCode)) { return {}; } + // If no match, return it. + if (uprv_strlen(max.language) == 0 && + uprv_strlen(max.script) == 0 && + uprv_strlen(max.region) == 0) { + // No match. ICU API mandate us to + // "If this Locale is already in the minimal form, or not valid, or + // there is no data available for minimization, the Locale will be + // unchanged." + return LSR(language, script, region, LSR::EXPLICIT_LSR, errorCode); + } + // try language + LSR test = maximize(max.language, "", "", true, errorCode); + if (U_FAILURE(errorCode)) { return {}; } + if (test.isEquivalentTo(max)) { + return LSR(max.language, "", "", LSR::DONT_CARE_FLAGS, errorCode); + } + + if (!favorScript) { + // favor Region + // try language and region + test = maximize(max.language, "", max.region, true, errorCode); + if (U_FAILURE(errorCode)) { return {}; } + if (test.isEquivalentTo(max)) { + return LSR(max.language, "", max.region, LSR::DONT_CARE_FLAGS, errorCode); } } - - // The last case is not as easy to optimize. - // Maybe do later, but for now use the straightforward code. - LSR result2 = maximize(languageIn, scriptIn, ""); - if (result2.equals(result)) { - return new LSR(result.language, result.script, "", LSR.DONT_CARE_FLAGS); - } else if (favorRegionOk) { - return new LSR(result.language, "", result.region, LSR.DONT_CARE_FLAGS); + // try language and script + test = maximize(max.language, max.script, "", true, errorCode); + if (U_FAILURE(errorCode)) { return {}; } + if (test.isEquivalentTo(max)) { + return LSR(max.language, max.script, "", LSR::DONT_CARE_FLAGS, errorCode); + } + if (favorScript) { + // try language and region + test = maximize(max.language, "", max.region, true, errorCode); + if (U_FAILURE(errorCode)) { return {}; } + if (test.isEquivalentTo(max)) { + return LSR(max.language, "", max.region, LSR::DONT_CARE_FLAGS, errorCode); + } } - return result; + return LSR(max.language, max.script, max.region, LSR::DONT_CARE_FLAGS, errorCode); } -#endif U_NAMESPACE_END diff --git a/contrib/libs/icu/common/loclikelysubtags.h b/contrib/libs/icu/common/loclikelysubtags.h index 14a01a5eac..5c51e353c1 100644 --- a/contrib/libs/icu/common/loclikelysubtags.h +++ b/contrib/libs/icu/common/loclikelysubtags.h @@ -11,6 +11,7 @@ #include "unicode/utypes.h" #include "unicode/bytestrie.h" #include "unicode/locid.h" +#include "unicode/stringpiece.h" #include "unicode/uobject.h" #include "unicode/ures.h" #include "charstrmap.h" @@ -18,7 +19,7 @@ U_NAMESPACE_BEGIN -struct XLikelySubtagsData; +struct LikelySubtagsData; struct LocaleDistanceData { LocaleDistanceData() = default; @@ -36,18 +37,19 @@ private: LocaleDistanceData &operator=(const LocaleDistanceData &) = delete; }; -// TODO(ICU-20777): Rename to just LikelySubtags. -class XLikelySubtags final : public UMemory { +class LikelySubtags final : public UMemory { public: - ~XLikelySubtags(); + ~LikelySubtags(); static constexpr int32_t SKIP_SCRIPT = 1; // VisibleForTesting - static const XLikelySubtags *getSingleton(UErrorCode &errorCode); + static const LikelySubtags *getSingleton(UErrorCode &errorCode); // VisibleForTesting - LSR makeMaximizedLsrFrom(const Locale &locale, UErrorCode &errorCode) const; + LSR makeMaximizedLsrFrom(const Locale &locale, + bool returnInputIfUnmatch, + UErrorCode &errorCode) const; /** * Tests whether lsr is "more likely" than other. @@ -61,35 +63,40 @@ public: */ int32_t compareLikely(const LSR &lsr, const LSR &other, int32_t likelyInfo) const; - // TODO(ICU-20777): Switch Locale/uloc_ likely-subtags API from the old code - // in loclikely.cpp to this new code, including activating this - // minimizeSubtags() function. The LocaleMatcher does not minimize. -#if 0 - LSR minimizeSubtags(const char *languageIn, const char *scriptIn, const char *regionIn, - ULocale.Minimize fieldToFavor, UErrorCode &errorCode) const; -#endif + LSR minimizeSubtags(StringPiece language, StringPiece script, StringPiece region, + bool favorScript, + UErrorCode &errorCode) const; // visible for LocaleDistance const LocaleDistanceData &getDistanceData() const { return distanceData; } private: - XLikelySubtags(XLikelySubtagsData &data); - XLikelySubtags(const XLikelySubtags &other) = delete; - XLikelySubtags &operator=(const XLikelySubtags &other) = delete; + LikelySubtags(LikelySubtagsData &data); + LikelySubtags(const LikelySubtags &other) = delete; + LikelySubtags &operator=(const LikelySubtags &other) = delete; static void initLikelySubtags(UErrorCode &errorCode); LSR makeMaximizedLsr(const char *language, const char *script, const char *region, - const char *variant, UErrorCode &errorCode) const; + const char *variant, + bool returnInputIfUnmatch, + UErrorCode &errorCode) const; /** * Raw access to addLikelySubtags. Input must be in canonical format, eg "en", not "eng" or "EN". */ - LSR maximize(const char *language, const char *script, const char *region) const; + LSR maximize(const char *language, const char *script, const char *region, + bool returnInputIfUnmatch, + UErrorCode &errorCode) const; + LSR maximize(StringPiece language, StringPiece script, StringPiece region, + bool returnInputIfUnmatch, + UErrorCode &errorCode) const; int32_t getLikelyIndex(const char *language, const char *script) const; + bool isMacroregion(StringPiece& region, UErrorCode &errorCode) const; static int32_t trieNext(BytesTrie &iter, const char *s, int32_t i); + static int32_t trieNext(BytesTrie &iter, StringPiece s, int32_t i); UResourceBundle *langInfoBundle; // We could store the strings by value, except that if there were few enough strings, @@ -112,7 +119,7 @@ private: int32_t lsrsLength; #endif - // distance/matcher data: see comment in XLikelySubtagsData::load() + // distance/matcher data: see comment in LikelySubtagsData::load() LocaleDistanceData distanceData; }; diff --git a/contrib/libs/icu/common/locmap.cpp b/contrib/libs/icu/common/locmap.cpp index 7a0e90e8bd..b95eb04428 100644 --- a/contrib/libs/icu/common/locmap.cpp +++ b/contrib/libs/icu/common/locmap.cpp @@ -28,7 +28,6 @@ */ #include "locmap.h" -#include "bytesinkutil.h" #include "charstr.h" #include "cstring.h" #include "cmemory.h" @@ -49,6 +48,8 @@ * [MS-LCID] Windows Language Code Identifier (LCID) Reference */ +namespace { + /* //////////////////////////////////////////////// // @@ -87,7 +88,7 @@ typedef struct ILcidPosixMap * @param posixID posix ID of the language_TERRITORY such as 'de_CH' */ #define ILCID_POSIX_ELEMENT_ARRAY(hostID, languageID, posixID) \ -static const ILcidPosixElement locmap_ ## languageID [] = { \ +constexpr ILcidPosixElement locmap_ ## languageID [] = { \ {LANGUAGE_LCID(hostID), #languageID}, /* parent locale */ \ {hostID, #posixID}, \ }; @@ -97,7 +98,7 @@ static const ILcidPosixElement locmap_ ## languageID [] = { \ * @param id the POSIX ID, either a language or language_TERRITORY */ #define ILCID_POSIX_SUBTABLE(id) \ -static const ILcidPosixElement locmap_ ## id [] = +constexpr ILcidPosixElement locmap_ ## id [] = /** @@ -796,7 +797,7 @@ ILCID_POSIX_SUBTABLE(zh) { ILCID_POSIX_ELEMENT_ARRAY(0x0435, zu, zu_ZA) /* This must be static and grouped by LCID. */ -static const ILcidPosixMap gPosixIDmap[] = { +constexpr ILcidPosixMap gPosixIDmap[] = { ILCID_POSIX_MAP(af), /* af Afrikaans 0x36 */ ILCID_POSIX_MAP(am), /* am Amharic 0x5e */ ILCID_POSIX_MAP(ar), /* ar Arabic 0x01 */ @@ -945,14 +946,14 @@ static const ILcidPosixMap gPosixIDmap[] = { ILCID_POSIX_MAP(zu), /* zu Zulu 0x35 */ }; -static const uint32_t gLocaleCount = UPRV_LENGTHOF(gPosixIDmap); +constexpr uint32_t gLocaleCount = UPRV_LENGTHOF(gPosixIDmap); /** * Do not call this function. It is called by hostID. * The function is not private because this struct must stay as a C struct, * and this is an internal class. */ -static int32_t +int32_t idCmp(const char* id1, const char* id2) { int32_t diffIdx = 0; @@ -972,9 +973,10 @@ idCmp(const char* id1, const char* id2) * no equivalent Windows LCID. * @return the LCID */ -static uint32_t -getHostID(const ILcidPosixMap *this_0, const char* posixID, UErrorCode* status) +uint32_t +getHostID(const ILcidPosixMap *this_0, const char* posixID, UErrorCode& status) { + if (U_FAILURE(status)) { return locmap_root->hostID; } int32_t bestIdx = 0; int32_t bestIdxDiff = 0; int32_t posixIDlen = (int32_t)uprv_strlen(posixID); @@ -996,16 +998,16 @@ getHostID(const ILcidPosixMap *this_0, const char* posixID, UErrorCode* status) if ((posixID[bestIdxDiff] == '_' || posixID[bestIdxDiff] == '@') && this_0->regionMaps[bestIdx].posixID[bestIdxDiff] == 0) { - *status = U_USING_FALLBACK_WARNING; + status = U_USING_FALLBACK_WARNING; return this_0->regionMaps[bestIdx].hostID; } /*no match found */ - *status = U_ILLEGAL_ARGUMENT_ERROR; - return this_0->regionMaps->hostID; + status = U_ILLEGAL_ARGUMENT_ERROR; + return locmap_root->hostID; } -static const char* +const char* getPosixID(const ILcidPosixMap *this_0, uint32_t hostID) { uint32_t i; @@ -1035,19 +1037,21 @@ getPosixID(const ILcidPosixMap *this_0, uint32_t hostID) * quz -> qu * prs -> fa */ -#define FIX_LANGUAGE_ID_TAG(buffer, len) \ - if (len >= 3) { \ - if (buffer[0] == 'q' && buffer[1] == 'u' && buffer[2] == 'z') {\ - buffer[2] = 0; \ - uprv_strcat(buffer, buffer+3); \ - } else if (buffer[0] == 'p' && buffer[1] == 'r' && buffer[2] == 's') {\ - buffer[0] = 'f'; buffer[1] = 'a'; buffer[2] = 0; \ - uprv_strcat(buffer, buffer+3); \ - } \ +void FIX_LANGUAGE_ID_TAG(char* buffer, int32_t len) { + if (len >= 3) { + if (buffer[0] == 'q' && buffer[1] == 'u' && buffer[2] == 'z') { + buffer[2] = 0; + uprv_strcat(buffer, buffer+3); + } else if (buffer[0] == 'p' && buffer[1] == 'r' && buffer[2] == 's') { + buffer[0] = 'f'; buffer[1] = 'a'; buffer[2] = 0; + uprv_strcat(buffer, buffer+3); + } } - +} #endif +} // namespace + U_CAPI int32_t uprv_convertToPosix(uint32_t hostid, char *posixID, int32_t posixIDCapacity, UErrorCode* status) { @@ -1147,7 +1151,7 @@ uprv_convertToPosix(uint32_t hostid, char *posixID, int32_t posixIDCapacity, UEr /* no match found */ *status = U_ILLEGAL_ARGUMENT_ERROR; - return -1; + return 0; } /* @@ -1170,17 +1174,13 @@ uprv_convertToLCIDPlatform(const char* localeID, UErrorCode* status) // conversion functionality when available. #if U_PLATFORM_HAS_WIN32_API && UCONFIG_USE_WINDOWS_LCID_MAPPING_API int32_t len; - char baseName[ULOC_FULLNAME_CAPACITY] = {}; + icu::CharString baseName; const char * mylocaleID = localeID; // Check any for keywords. if (uprv_strchr(localeID, '@')) { - icu::CharString collVal; - { - icu::CharStringByteSink sink(&collVal); - ulocimp_getKeywordValue(localeID, "collation", sink, status); - } + icu::CharString collVal = ulocimp_getKeywordValue(localeID, "collation", *status); if (U_SUCCESS(*status) && !collVal.isEmpty()) { // If it contains the keyword collation, return 0 so that the LCID lookup table will be used. @@ -1189,19 +1189,16 @@ uprv_convertToLCIDPlatform(const char* localeID, UErrorCode* status) else { // If the locale ID contains keywords other than collation, just use the base name. - len = uloc_getBaseName(localeID, baseName, UPRV_LENGTHOF(baseName) - 1, status); - - if (U_SUCCESS(*status) && len > 0) + baseName = ulocimp_getBaseName(localeID, *status); + if (U_SUCCESS(*status) && !baseName.isEmpty()) { - baseName[len] = 0; - mylocaleID = baseName; + mylocaleID = baseName.data(); } } } - 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); + icu::CharString asciiBCP47Tag = ulocimp_toLanguageTag(mylocaleID, false, *status); if (U_SUCCESS(*status)) { @@ -1249,6 +1246,14 @@ uprv_convertToLCIDPlatform(const char* localeID, UErrorCode* status) U_CAPI uint32_t uprv_convertToLCID(const char *langID, const char* posixID, UErrorCode* status) { + if (U_FAILURE(*status) || + langID == nullptr || + posixID == nullptr || + uprv_strlen(langID) < 2 || + uprv_strlen(posixID) < 2) { + return locmap_root->hostID; + } + // This function does the table lookup when native platform name->lcid conversion isn't available, // or for locales that don't follow patterns the platform expects. uint32_t low = 0; @@ -1262,11 +1267,6 @@ uprv_convertToLCID(const char *langID, const char* posixID, UErrorCode* status) UErrorCode myStatus; uint32_t idx; - /* Check for incomplete id. */ - if (!langID || !posixID || uprv_strlen(langID) < 2 || uprv_strlen(posixID) < 2) { - return 0; - } - /*Binary search for the map entry for normal cases */ while (high > low) /*binary search*/{ @@ -1284,7 +1284,7 @@ uprv_convertToLCID(const char *langID, const char* posixID, UErrorCode* status) low = mid; } else /*we found it*/{ - return getHostID(&gPosixIDmap[mid], posixID, status); + return getHostID(&gPosixIDmap[mid], posixID, *status); } oldmid = mid; } @@ -1295,7 +1295,7 @@ uprv_convertToLCID(const char *langID, const char* posixID, UErrorCode* status) */ for (idx = 0; idx < gLocaleCount; idx++ ) { myStatus = U_ZERO_ERROR; - value = getHostID(&gPosixIDmap[idx], posixID, &myStatus); + value = getHostID(&gPosixIDmap[idx], posixID, myStatus); if (myStatus == U_ZERO_ERROR) { return value; } @@ -1311,5 +1311,5 @@ uprv_convertToLCID(const char *langID, const char* posixID, UErrorCode* status) /* no match found */ *status = U_ILLEGAL_ARGUMENT_ERROR; - return 0; /* return international (root) */ + return locmap_root->hostID; /* return international (root) */ } diff --git a/contrib/libs/icu/common/locresdata.cpp b/contrib/libs/icu/common/locresdata.cpp index 7a0969dff5..725e660915 100644 --- a/contrib/libs/icu/common/locresdata.cpp +++ b/contrib/libs/icu/common/locresdata.cpp @@ -24,6 +24,7 @@ #include "unicode/putil.h" #include "unicode/uloc.h" #include "unicode/ures.h" +#include "charstr.h" #include "cstring.h" #include "ulocimp.h" #include "uresimp.h" @@ -48,10 +49,10 @@ uloc_getTableStringWithFallback(const char *path, const char *locale, int32_t *pLength, UErrorCode *pErrorCode) { + if (U_FAILURE(*pErrorCode)) { return nullptr; } /* char localeBuffer[ULOC_FULLNAME_CAPACITY*4];*/ const char16_t *item=nullptr; UErrorCode errorCode; - char explicitFallbackName[ULOC_FULLNAME_CAPACITY] = {0}; /* * open the bundle for the current locale @@ -126,15 +127,16 @@ uloc_getTableStringWithFallback(const char *path, const char *locale, *pErrorCode = errorCode; break; } - - u_UCharsToChars(fallbackLocale, explicitFallbackName, len); - + + icu::CharString explicitFallbackName; + explicitFallbackName.appendInvariantChars(fallbackLocale, len, errorCode); + /* guard against recursive fallback */ - if(uprv_strcmp(explicitFallbackName, locale)==0){ + if (explicitFallbackName == locale) { *pErrorCode = U_INTERNAL_PROGRAM_ERROR; break; } - rb.adoptInstead(ures_open(path, explicitFallbackName, &errorCode)); + rb.adoptInstead(ures_open(path, explicitFallbackName.data(), &errorCode)); if(U_FAILURE(errorCode)){ *pErrorCode = errorCode; break; @@ -148,61 +150,65 @@ uloc_getTableStringWithFallback(const char *path, const char *locale, return item; } -static ULayoutType +namespace { + +ULayoutType _uloc_getOrientationHelper(const char* localeId, const char* key, - UErrorCode *status) + UErrorCode& status) { ULayoutType result = ULOC_LAYOUT_UNKNOWN; - if (!U_FAILURE(*status)) { - int32_t length = 0; - char localeBuffer[ULOC_FULLNAME_CAPACITY]; - - uloc_canonicalize(localeId, localeBuffer, sizeof(localeBuffer), status); - - if (!U_FAILURE(*status)) { - const char16_t* const value = - uloc_getTableStringWithFallback( - nullptr, - localeBuffer, - "layout", - nullptr, - key, - &length, - status); - - if (!U_FAILURE(*status) && length != 0) { - switch(value[0]) - { - case 0x0062: /* 'b' */ - result = ULOC_LAYOUT_BTT; - break; - case 0x006C: /* 'l' */ - result = ULOC_LAYOUT_LTR; - break; - case 0x0072: /* 'r' */ - result = ULOC_LAYOUT_RTL; - break; - case 0x0074: /* 't' */ - result = ULOC_LAYOUT_TTB; - break; - default: - *status = U_INTERNAL_PROGRAM_ERROR; - break; - } - } + if (U_FAILURE(status)) { return result; } + + icu::CharString localeBuffer = ulocimp_canonicalize(localeId, status); + + if (U_FAILURE(status)) { return result; } + + int32_t length = 0; + const char16_t* const value = + uloc_getTableStringWithFallback( + nullptr, + localeBuffer.data(), + "layout", + nullptr, + key, + &length, + &status); + + if (U_FAILURE(status)) { return result; } + + if (length != 0) { + switch(value[0]) + { + case 0x0062: /* 'b' */ + result = ULOC_LAYOUT_BTT; + break; + case 0x006C: /* 'l' */ + result = ULOC_LAYOUT_LTR; + break; + case 0x0072: /* 'r' */ + result = ULOC_LAYOUT_RTL; + break; + case 0x0074: /* 't' */ + result = ULOC_LAYOUT_TTB; + break; + default: + status = U_INTERNAL_PROGRAM_ERROR; + break; } } return result; } +} // namespace + U_CAPI ULayoutType U_EXPORT2 uloc_getCharacterOrientation(const char* localeId, UErrorCode *status) { - return _uloc_getOrientationHelper(localeId, "characters", status); + return _uloc_getOrientationHelper(localeId, "characters", *status); } /** @@ -216,5 +222,5 @@ U_CAPI ULayoutType U_EXPORT2 uloc_getLineOrientation(const char* localeId, UErrorCode *status) { - return _uloc_getOrientationHelper(localeId, "lines", status); + return _uloc_getOrientationHelper(localeId, "lines", *status); } diff --git a/contrib/libs/icu/common/locutil.cpp b/contrib/libs/icu/common/locutil.cpp index 776d1d5963..1abecef1c5 100644 --- a/contrib/libs/icu/common/locutil.cpp +++ b/contrib/libs/icu/common/locutil.cpp @@ -145,9 +145,7 @@ LocaleUtility::canonicalLocaleString(const UnicodeString* id, UnicodeString& res Locale& LocaleUtility::initLocaleFromName(const UnicodeString& id, Locale& result) { - enum { BUFLEN = 128 }; // larger than ever needed - - if (id.isBogus() || id.length() >= BUFLEN) { + if (id.isBogus()) { result.setToBogus(); } else { /* @@ -168,24 +166,29 @@ LocaleUtility::initLocaleFromName(const UnicodeString& id, Locale& result) * * There should be only at most one '@' in a locale ID. */ - char buffer[BUFLEN]; + CharString buffer; int32_t prev, i; prev = 0; - for(;;) { + UErrorCode status = U_ZERO_ERROR; + do { i = id.indexOf((char16_t)0x40, prev); if(i < 0) { // no @ between prev and the rest of the string - id.extract(prev, INT32_MAX, buffer + prev, BUFLEN - prev, US_INV); + buffer.appendInvariantChars(id.tempSubString(prev), status); break; // done } else { // normal invariant-character conversion for text between @s - id.extract(prev, i - prev, buffer + prev, BUFLEN - prev, US_INV); + buffer.appendInvariantChars(id.tempSubString(prev, i - prev), status); // manually "convert" U+0040 at id[i] into '@' at buffer[i] - buffer[i] = '@'; + buffer.append('@', status); prev = i + 1; } + } while (U_SUCCESS(status)); + if (U_FAILURE(status)) { + result.setToBogus(); + } else { + result = Locale::createFromName(buffer.data()); } - result = Locale::createFromName(buffer); } return result; } @@ -259,7 +262,7 @@ LocaleUtility::getAvailableLocaleNames(const UnicodeString& bundleID) return htp; } -UBool +bool LocaleUtility::isFallbackOf(const UnicodeString& root, const UnicodeString& child) { return child.indexOf(root) == 0 && @@ -271,5 +274,3 @@ U_NAMESPACE_END /* !UCONFIG_NO_SERVICE */ #endif - - diff --git a/contrib/libs/icu/common/locutil.h b/contrib/libs/icu/common/locutil.h index 31bfffd7a5..8cf109c206 100644 --- a/contrib/libs/icu/common/locutil.h +++ b/contrib/libs/icu/common/locutil.h @@ -28,7 +28,7 @@ public: static Locale& initLocaleFromName(const UnicodeString& id, Locale& result); static UnicodeString& initNameFromLocale(const Locale& locale, UnicodeString& result); static const Hashtable* getAvailableLocaleNames(const UnicodeString& bundleID); - static UBool isFallbackOf(const UnicodeString& root, const UnicodeString& child); + static bool isFallbackOf(const UnicodeString& root, const UnicodeString& child); }; U_NAMESPACE_END diff --git a/contrib/libs/icu/common/lsr.cpp b/contrib/libs/icu/common/lsr.cpp index 39eb46df27..bd231ecdb5 100644 --- a/contrib/libs/icu/common/lsr.cpp +++ b/contrib/libs/icu/common/lsr.cpp @@ -31,6 +31,26 @@ LSR::LSR(char prefix, const char *lang, const char *scr, const char *r, int32_t } } +LSR::LSR(StringPiece lang, StringPiece scr, StringPiece r, int32_t f, + UErrorCode &errorCode) : + language(nullptr), script(nullptr), region(nullptr), + regionIndex(indexForRegion(r.data())), flags(f) { + if (U_SUCCESS(errorCode)) { + CharString data; + data.append(lang, errorCode).append('\0', errorCode); + int32_t scriptOffset = data.length(); + data.append(scr, errorCode).append('\0', errorCode); + int32_t regionOffset = data.length(); + data.append(r, errorCode); + owned = data.cloneData(errorCode); + if (U_SUCCESS(errorCode)) { + language = owned; + script = owned + scriptOffset; + region = owned + regionOffset; + } + } +} + LSR::LSR(LSR &&other) noexcept : language(other.language), script(other.script), region(other.region), owned(other.owned), regionIndex(other.regionIndex), flags(other.flags), diff --git a/contrib/libs/icu/common/lsr.h b/contrib/libs/icu/common/lsr.h index a2f7c8bb15..313286e93d 100644 --- a/contrib/libs/icu/common/lsr.h +++ b/contrib/libs/icu/common/lsr.h @@ -7,6 +7,7 @@ #ifndef __LSR_H__ #define __LSR_H__ +#include "unicode/stringpiece.h" #include "unicode/utypes.h" #include "unicode/uobject.h" #include "cstring.h" @@ -45,6 +46,8 @@ struct LSR final : public UMemory { */ LSR(char prefix, const char *lang, const char *scr, const char *r, int32_t f, UErrorCode &errorCode); + LSR(StringPiece lang, StringPiece scr, StringPiece r, int32_t f, + UErrorCode &errorCode); LSR(LSR &&other) noexcept; LSR(const LSR &other) = delete; inline ~LSR() { diff --git a/contrib/libs/icu/common/messagepattern.cpp b/contrib/libs/icu/common/messagepattern.cpp index 82cb638e4e..9e318295f9 100644 --- a/contrib/libs/icu/common/messagepattern.cpp +++ b/contrib/libs/icu/common/messagepattern.cpp @@ -999,7 +999,6 @@ MessagePattern::parseDouble(int32_t start, int32_t limit, UBool allowInfinity, } setParseError(parseError, start /*, limit*/); // Bad syntax for numeric value. errorCode=U_PATTERN_SYNTAX_ERROR; - return; } int32_t diff --git a/contrib/libs/icu/common/norm2_nfc_data.h b/contrib/libs/icu/common/norm2_nfc_data.h index ebe3e6ba90..3dada06c57 100644 --- a/contrib/libs/icu/common/norm2_nfc_data.h +++ b/contrib/libs/icu/common/norm2_nfc_data.h @@ -10,7 +10,7 @@ #ifdef INCLUDED_FROM_NORMALIZER2_CPP static const UVersionInfo norm2_nfc_data_formatVersion={4,0,0,0}; -static const UVersionInfo norm2_nfc_data_dataVersion={0xf,0,0,0}; +static const UVersionInfo norm2_nfc_data_dataVersion={0xf,1,0,0}; static const int32_t norm2_nfc_data_indexes[Normalizer2Impl::IX_COUNT]={ 0x50,0x4cb8,0x8920,0x8a20,0x8a20,0x8a20,0x8a20,0x8a20,0xc0,0x300,0xae2,0x29e0,0x3c66,0xfc00,0x1288,0x3b9c, diff --git a/contrib/libs/icu/common/norm2allmodes.h b/contrib/libs/icu/common/norm2allmodes.h index 6347fba9cb..a2cfc89c1a 100644 --- a/contrib/libs/icu/common/norm2allmodes.h +++ b/contrib/libs/icu/common/norm2allmodes.h @@ -391,6 +391,7 @@ struct Norm2AllModes : public UMemory { static const Norm2AllModes *getNFCInstance(UErrorCode &errorCode); static const Norm2AllModes *getNFKCInstance(UErrorCode &errorCode); static const Norm2AllModes *getNFKC_CFInstance(UErrorCode &errorCode); + static const Norm2AllModes *getNFKC_SCFInstance(UErrorCode &errorCode); Normalizer2Impl *impl; ComposeNormalizer2 comp; diff --git a/contrib/libs/icu/common/normalizer2impl.cpp b/contrib/libs/icu/common/normalizer2impl.cpp index cdf570d76b..9c715ac3ef 100644 --- a/contrib/libs/icu/common/normalizer2impl.cpp +++ b/contrib/libs/icu/common/normalizer2impl.cpp @@ -1390,8 +1390,11 @@ Normalizer2Impl::composePair(UChar32 a, UChar32 b) const { } else if(norm16<minYesNoMappingsOnly) { // a combines forward. if(isJamoL(norm16)) { + if (b < Hangul::JAMO_V_BASE) { + return U_SENTINEL; + } b-=Hangul::JAMO_V_BASE; - if(0<=b && b<Hangul::JAMO_V_COUNT) { + if(b<Hangul::JAMO_V_COUNT) { return (Hangul::HANGUL_BASE+ ((a-Hangul::JAMO_L_BASE)*Hangul::JAMO_V_COUNT+b)* @@ -1400,8 +1403,11 @@ Normalizer2Impl::composePair(UChar32 a, UChar32 b) const { return U_SENTINEL; } } else if(isHangulLV(norm16)) { + if (b <= Hangul::JAMO_T_BASE) { + return U_SENTINEL; + } b-=Hangul::JAMO_T_BASE; - if(0<b && b<Hangul::JAMO_T_COUNT) { // not b==0! + if(b<Hangul::JAMO_T_COUNT) { // not b==0! return a+b; } else { return U_SENTINEL; diff --git a/contrib/libs/icu/common/normalizer2impl.h b/contrib/libs/icu/common/normalizer2impl.h index 2cca33d349..b74c2a1125 100644 --- a/contrib/libs/icu/common/normalizer2impl.h +++ b/contrib/libs/icu/common/normalizer2impl.h @@ -141,12 +141,12 @@ public: /** Constructs only; init() should be called. */ ReorderingBuffer(const Normalizer2Impl &ni, UnicodeString &dest) : impl(ni), str(dest), - start(NULL), reorderStart(NULL), limit(NULL), + start(nullptr), reorderStart(nullptr), limit(nullptr), remainingCapacity(0), lastCC(0) {} /** Constructs, removes the string contents, and initializes for a small initial capacity. */ ReorderingBuffer(const Normalizer2Impl &ni, UnicodeString &dest, UErrorCode &errorCode); ~ReorderingBuffer() { - if(start!=NULL) { + if (start != nullptr) { str.releaseBuffer((int32_t)(limit-start)); } } @@ -245,7 +245,7 @@ private: */ class U_COMMON_API Normalizer2Impl : public UObject { public: - Normalizer2Impl() : normTrie(NULL), fCanonIterData(NULL) { } + Normalizer2Impl() : normTrie(nullptr), fCanonIterData(nullptr) {} virtual ~Normalizer2Impl(); void init(const int32_t *inIndexes, const UCPTrie *inTrie, @@ -623,7 +623,7 @@ private: const uint16_t *getMapping(uint16_t norm16) const { return extraData+(norm16>>OFFSET_SHIFT); } const uint16_t *getCompositionsListForDecompYes(uint16_t norm16) const { if(norm16<JAMO_L || MIN_NORMAL_MAYBE_YES<=norm16) { - return NULL; + return nullptr; } else if(norm16<minMaybeYes) { return getMapping(norm16); // for yesYes; if Jamo L: harmless empty list } else { @@ -789,7 +789,8 @@ unorm_getFCD16(UChar32 c); * * Normalizer2 .nrm data files provide data for the Unicode Normalization algorithms. * ICU ships with data files for standard Unicode Normalization Forms - * NFC and NFD (nfc.nrm), NFKC and NFKD (nfkc.nrm) and NFKC_Casefold (nfkc_cf.nrm). + * NFC and NFD (nfc.nrm), NFKC and NFKD (nfkc.nrm), + * NFKC_Casefold (nfkc_cf.nrm) and NFKC_Simple_Casefold (nfkc_scf.nrm). * Custom (application-specific) data can be built into additional .nrm files * with the gennorm2 build tool. * ICU ships with one such file, uts46.nrm, for the implementation of UTS #46. diff --git a/contrib/libs/icu/common/propname_data.h b/contrib/libs/icu/common/propname_data.h index 1e247874b6..579547e416 100644 --- a/contrib/libs/icu/common/propname_data.h +++ b/contrib/libs/icu/common/propname_data.h @@ -11,101 +11,104 @@ U_NAMESPACE_BEGIN -const int32_t PropNameData::indexes[8]={0x20,0x1660,0x5294,0xacd0,0xacd0,0xacd0,0x31,0}; +const int32_t PropNameData::indexes[8]={0x20,0x16fc,0x5471,0xb130,0xb130,0xb130,0x31,0}; -const int32_t PropNameData::valueMaps[1424]={ -6,0,0x48,0,0xf1,0x368,0xf1,0x37e,0xf1,0x393,0xf1,0x3a9,0xf1,0x3b4,0xf1,0x3d5, -0xf1,0x3e5,0xf1,0x3f4,0xf1,0x402,0xf1,0x426,0xf1,0x43d,0xf1,0x455,0xf1,0x46c,0xf1,0x47b, -0xf1,0x48a,0xf1,0x49b,0xf1,0x4a9,0xf1,0x4bb,0xf1,0x4d5,0xf1,0x4f0,0xf1,0x505,0xf1,0x522, -0xf1,0x533,0xf1,0x53e,0xf1,0x55d,0xf1,0x573,0xf1,0x584,0xf1,0x594,0xf1,0x5af,0xf1,0x5c8, -0xf1,0x5d9,0xf1,0x5f3,0xf1,0x606,0xf1,0x616,0xf1,0x630,0xf1,0x649,0xf1,0x660,0xf1,0x674, -0xf1,0x68a,0xf1,0x69e,0xf1,0x6b4,0xf1,0x6ce,0xf1,0x6e6,0xf1,0x702,0xf1,0x70a,0xf1,0x712, -0xf1,0x71a,0xf1,0x722,0xf1,0x72b,0xf1,0x738,0xf1,0x74b,0xf1,0x768,0xf1,0x785,0xf1,0x7a2, -0xf1,0x7c0,0xf1,0x7de,0xf1,0x802,0xf1,0x80f,0xf1,0x829,0xf1,0x83e,0xf1,0x859,0xf1,0x870, -0xf1,0x887,0xf1,0x8a9,0xf1,0x8c8,0xf1,0x8e1,0xf1,0x90e,0xf1,0x947,0xf1,0x978,0xf1,0x9a7, -0xf1,0x9d6,0xf1,0x1000,0x1019,0x9eb,0x16d,0xc0b,0x188,0x3279,0xf7,0x3298,0x2d4,0x33d6,0x2ea,0x3430, -0x2f4,0x368d,0x316,0x3fb8,0x382,0x4028,0x38c,0x42c2,0x3bb,0x4300,0x3c3,0x4e45,0x48f,0x4ec3,0x499,0x4ee8, -0x49f,0x4f02,0x4a5,0x4f23,0x4ac,0x4f3d,0xf7,0x4f62,0xf7,0x4f88,0x4b3,0x5032,0x4c9,0x50ab,0x4dc,0x515d, -0x4f7,0x5194,0x4fe,0x5374,0x512,0x57f4,0x53a,0x2000,0x2001,0x5853,0x542,0x3000,0x3001,0x58df,0,0x4000, -0x400e,0x58f1,0,0x58fa,0,0x5914,0,0x5925,0,0x5936,0,0x594c,0,0x5955,0,0x5972, -0,0x5990,0,0x59ae,0,0x59cc,0,0x59e2,0,0x59f6,0,0x5a0c,0,0x7000,0x7001,0x5a25, -0,0x844,0x12,0,1,0x12,0x20,0x862,0x4a,0,1,6,7,8,9,0xa, -0xb,0xc,0xd,0xe,0xf,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a, -0x1b,0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x54,0x5b,0x67,0x6b,0x76,0x7a, -0x81,0x82,0x84,0x85,0xc8,0xca,0xd6,0xd8,0xda,0xdc,0xde,0xe0,0xe2,0xe4,0xe6,0xe8, -0xe9,0xea,0xf0,0x2e,0x40,0x4c,0x5e,0x68,0x79,0x84,0x91,0x9e,0xab,0xb8,0xc5,0xd2, -0xdf,0xec,0xf9,0x106,0x113,0x120,0x12d,0x13a,0x147,0x154,0x161,0x16e,0x17b,0x188,0x195,0x1a2, -0x1af,0x1bc,0x1c9,0x1d6,0x1e3,0x1f0,0x1fd,0x20c,0x21b,0x22a,0x239,0x248,0x257,0x266,0x275,0x28f, -0x2a3,0x2b7,0x2d2,0x2e1,0x2ea,0x2fa,0x302,0x30b,0x31a,0x323,0x333,0x344,0x355,0xa03,1,0, -0x17,0x9fa,0xa0b,0xa1c,0xa30,0xa47,0xa5f,0xa71,0xa86,0xa9d,0xab2,0xac2,0xad4,0xaf1,0xb0d,0xb1f, -0xb3c,0xb58,0xb74,0xb89,0xb9e,0xbb8,0xbd3,0xbee,0xba5,1,0,0x148,0xc16,0xc23,0xc36,0xc5e, -0xc7c,0xc9a,0xcb2,0xcdd,0xd07,0xd1f,0xd32,0xd45,0xd54,0xd63,0xd72,0xd81,0xd98,0xda9,0xdbc,0xdcf, -0xddc,0xde9,0xdf8,0xe09,0xe1e,0xe2f,0xe3a,0xe43,0xe54,0xe65,0xe78,0xe8a,0xe9d,0xeb0,0xeef,0xefc, -0xf09,0xf16,0xf2b,0xf5b,0xf75,0xf96,0xfc1,0xfe4,0x1042,0x1069,0x1084,0x1093,0x10ba,0x10e2,0x1105,0x1128, -0x1152,0x116b,0x118a,0x11ad,0x11d1,0x11e4,0x11fe,0x1228,0x1240,0x1268,0x1291,0x12a4,0x12b7,0x12ca,0x12f1,0x1300, -0x1320,0x134e,0x136c,0x139a,0x13b6,0x13d1,0x13ea,0x1403,0x1424,0x1454,0x1473,0x1495,0x14c9,0x14f6,0x153b,0x155c, -0x1586,0x15a7,0x15d0,0x15e3,0x1616,0x162d,0x163c,0x164d,0x1678,0x168f,0x16c0,0x16ee,0x1731,0x173c,0x1775,0x1786, -0x1797,0x17a4,0x17b7,0x17f1,0x1815,0x1839,0x1873,0x18ab,0x18d6,0x18ee,0x191a,0x1946,0x1953,0x1962,0x197f,0x19a1, -0x19cf,0x19ef,0x1a16,0x1a3d,0x1a5c,0x1a6f,0x1a80,0x1a91,0x1ab6,0x1adb,0x1b02,0x1b36,0x1b63,0x1b81,0x1b94,0x1bad, -0x1be6,0x1bf5,0x1c15,0x1c37,0x1c59,0x1c70,0x1c87,0x1cb4,0x1ccd,0x1ce6,0x1d17,0x1d41,0x1d5c,0x1d6f,0x1d8e,0x1d97, -0x1daa,0x1dc8,0x1de6,0x1df9,0x1e10,0x1e25,0x1e5a,0x1e7e,0x1e93,0x1ea2,0x1eb5,0x1ed9,0x1ee2,0x1f06,0x1f1d,0x1f30, -0x1f3f,0x1f4a,0x1f6b,0x1f83,0x1f92,0x1fa1,0x1fb0,0x1fc7,0x1fdc,0x1ff1,0x202a,0x203d,0x2059,0x2064,0x2071,0x209f, -0x20c3,0x20e6,0x20f9,0x211b,0x212e,0x2149,0x216c,0x218f,0x21b4,0x21c5,0x21f4,0x2221,0x2238,0x2253,0x2262,0x228d, -0x22c5,0x22ff,0x232d,0x233e,0x234b,0x236f,0x237e,0x239a,0x23b4,0x23d1,0x2409,0x241e,0x244b,0x246a,0x2498,0x24b8, -0x24ec,0x24fb,0x2525,0x2548,0x2573,0x257e,0x258f,0x25aa,0x25ce,0x25db,0x25f0,0x2617,0x2642,0x2679,0x268c,0x269d, -0x26cd,0x26de,0x26ed,0x2702,0x2720,0x2733,0x2746,0x275d,0x277a,0x2785,0x278e,0x27b0,0x27c5,0x27ea,0x2801,0x282a, -0x2845,0x285a,0x2873,0x2894,0x28c9,0x28da,0x290b,0x292f,0x2940,0x2959,0x2964,0x2991,0x29b3,0x29e1,0x2a14,0x2a23, -0x2a34,0x2a51,0x2a93,0x2aba,0x2ac7,0x2adc,0x2b00,0x2b26,0x2b5f,0x2b70,0x2b94,0x2b9f,0x2bac,0x2bbb,0x2be0,0x2c0e, -0x2c2a,0x2c47,0x2c54,0x2c65,0x2c83,0x2ca6,0x2cc3,0x2cd0,0x2cf0,0x2d0d,0x2d2e,0x2d57,0x2d68,0x2d87,0x2da0,0x2db9, -0x2dca,0x2e13,0x2e24,0x2e3d,0x2e6c,0x2e99,0x2ebe,0x2f00,0x2f1c,0x2f2b,0x2f42,0x2f70,0x2f89,0x2fb2,0x2fcc,0x3007, -0x3025,0x3034,0x3054,0x306f,0x3093,0x30af,0x30cd,0x30eb,0x3102,0x3111,0x311c,0x3159,0x316c,0x3196,0x31b6,0x31e4, -0x3208,0x3230,0x3255,0x3260,0x1fa9,1,0,0x12,0x32af,0x32bf,0x32d2,0x32e2,0x32f2,0x3301,0x3311,0x3323, -0x3336,0x3348,0x3358,0x3368,0x3377,0x3386,0x3396,0x33a3,0x33b2,0x33c6,0x2067,1,0,6,0x33eb,0x33f6, -0x3403,0x3410,0x341d,0x3428,0x20ab,1,0,0x1e,0x3445,0x3454,0x3469,0x347e,0x3493,0x34a7,0x34b8,0x34cc, -0x34df,0x34f0,0x3509,0x351b,0x352c,0x3540,0x3553,0x356b,0x357d,0x3588,0x3598,0x35a6,0x35bb,0x35d0,0x35e6,0x3600, -0x3616,0x3626,0x363a,0x364e,0x365f,0x3677,0x22d6,1,0,0x68,0x369f,0x36c2,0x36cb,0x36d8,0x36e3,0x36ec, -0x36f7,0x3700,0x3719,0x371e,0x3727,0x3744,0x374d,0x375a,0x3763,0x3787,0x378e,0x3797,0x37aa,0x37b5,0x37be,0x37c9, -0x37e2,0x37eb,0x37fa,0x3805,0x380e,0x3819,0x3822,0x3829,0x3832,0x383d,0x3846,0x385f,0x3868,0x3875,0x3880,0x3891, -0x389c,0x38b1,0x38c8,0x38d1,0x38da,0x38f3,0x38fe,0x3907,0x3910,0x3927,0x3944,0x394f,0x3960,0x396b,0x3972,0x397f, -0x398c,0x39b9,0x39ce,0x39d7,0x39f2,0x3a15,0x3a36,0x3a57,0x3a7c,0x3aa3,0x3ac4,0x3ae7,0x3b08,0x3b2f,0x3b50,0x3b75, -0x3b94,0x3bb3,0x3bd2,0x3bef,0x3c10,0x3c31,0x3c54,0x3c79,0x3c98,0x3cb7,0x3cd8,0x3cff,0x3d24,0x3d43,0x3d64,0x3d87, -0x3da2,0x3dbb,0x3dd6,0x3def,0x3e0c,0x3e27,0x3e44,0x3e63,0x3e80,0x3e9d,0x3ebc,0x3ed9,0x3ef4,0x3f11,0x3f2e,0x3f61, -0x3f88,0x3f9b,0x2639,1,0,6,0x3fc9,0x3fd8,0x3fe8,0x3ff8,0x4008,0x4019,0x2697,1,0,0x2b, -0x4037,0x4043,0x4051,0x4060,0x406f,0x407f,0x4090,0x40a4,0x40b9,0x40cf,0x40e2,0x40f6,0x4106,0x410f,0x411a,0x412a, -0x4146,0x4158,0x4166,0x4175,0x4181,0x4196,0x41aa,0x41bd,0x41cb,0x41df,0x41ed,0x41f7,0x4209,0x4215,0x4223,0x4233, -0x423a,0x4241,0x4248,0x424f,0x4256,0x426c,0x428d,0x870,0x429f,0x42aa,0x42b9,0x28f0,1,0,4,0x42d3, -0x42de,0x42ea,0x42f4,0x2916,1,0,0xc8,0x430b,0x4318,0x432d,0x433a,0x4349,0x4357,0x4366,0x4375,0x4387, -0x4396,0x43a4,0x43b5,0x43c4,0x43d3,0x43e0,0x43ec,0x43fb,0x440a,0x4414,0x4421,0x442e,0x443d,0x444b,0x445a,0x4466, -0x4470,0x447c,0x448c,0x449c,0x44aa,0x44b6,0x44c7,0x44d3,0x44df,0x44ed,0x44fa,0x4506,0x4513,0xe2f,0x4520,0x452e, -0x4548,0x4551,0x455f,0x456d,0x4579,0x4588,0x4596,0x45a4,0x45b0,0x45bf,0x45cd,0x45db,0x45e8,0x45f7,0x4612,0x4621, -0x4632,0x4643,0x4656,0x4668,0x4677,0x4689,0x4698,0x46a4,0x46af,0x1f3f,0x46bc,0x46c7,0x46d2,0x46dd,0x46e8,0x4703, -0x470e,0x4719,0x4724,0x4737,0x474b,0x4756,0x4765,0x4774,0x477f,0x478a,0x4797,0x47a6,0x47b4,0x47bf,0x47da,0x47e4, -0x47f5,0x4806,0x4815,0x4826,0x4831,0x483c,0x4847,0x4852,0x485d,0x4868,0x4873,0x487d,0x4888,0x4898,0x48a3,0x48b1, -0x48be,0x48c9,0x48d8,0x48e5,0x48f2,0x4901,0x490e,0x491f,0x4931,0x4941,0x494c,0x495f,0x4976,0x4984,0x4991,0x499c, -0x49a9,0x49ba,0x49d6,0x49ec,0x49f7,0x4a14,0x4a24,0x4a33,0x4a3e,0x4a49,0x2059,0x4a55,0x4a60,0x4a78,0x4a88,0x4a97, -0x4aa5,0x4ab3,0x4abe,0x4ac9,0x4add,0x4af4,0x4b0c,0x4b1c,0x4b2c,0x4b3c,0x4b4e,0x4b59,0x4b64,0x4b6e,0x4b7a,0x4b88, -0x4b9b,0x4ba7,0x4bb4,0x4bbf,0x4bdb,0x4be8,0x4bf6,0x4c0f,0x2959,0x4c1e,0x277a,0x4c2b,0x4c39,0x4c4b,0x4c59,0x4c65, -0x4c75,0x2b94,0x4c83,0x4c8f,0x4c9a,0x4ca5,0x4cb0,0x4cc4,0x4cd2,0x4ce9,0x4cf5,0x4d09,0x4d17,0x4d29,0x4d3f,0x4d4d, -0x4d5f,0x4d6d,0x4d8a,0x4d9c,0x4da9,0x4dba,0x4dcc,0x4de6,0x4df3,0x4e06,0x4e17,0x3111,0x4e24,0x3255,0x4e33,0x3370, -1,0,6,0x4e5f,0x4e72,0x4e82,0x4e90,0x4ea1,0x4eb1,0x33cc,0x12,0,1,0x4edb,0x4ee1,0x33d9, -0x12,0,1,0x4edb,0x4ee1,0x33e6,1,0,3,0x4edb,0x4ee1,0x4f1a,0x33fc,1,0,3, -0x4edb,0x4ee1,0x4f1a,0x3412,1,0,0x12,0x4fa4,0x4fae,0x4fba,0x4fc1,0x4fcc,0x4fd1,0x4fd8,0x4fdf,0x4fe8, -0x4fed,0x4ff2,0x5002,0x870,0x429f,0x500e,0x42aa,0x501e,0x42b9,0x34bb,1,0,0xf,0x4fa4,0x5045,0x504f, -0x5059,0x5064,0x4175,0x506e,0x507a,0x5082,0x5089,0x5093,0x4fba,0x4fc1,0x4fd1,0x509d,0x3542,1,0,0x17, -0x4fa4,0x50ba,0x5059,0x50c6,0x50d3,0x50e1,0x4175,0x50ec,0x4fba,0x50fd,0x4fd1,0x510c,0x511a,0x870,0x428d,0x5126, -0x5137,0x429f,0x500e,0x42aa,0x501e,0x42b9,0x5148,0x365f,1,0,3,0x517b,0x5183,0x518b,0x3678,1, -0,0x10,0x51b4,0x51bb,0x51ca,0x51eb,0x520e,0x5219,0x5238,0x524f,0x525c,0x5265,0x5284,0x52b7,0x52d2,0x5301, -0x531e,0x5343,0x3711,1,0,0x24,0x5392,0x539f,0x53b2,0x53bf,0x53ec,0x5411,0x5426,0x5445,0x5466,0x5493, -0x54cc,0x54ef,0x5512,0x553f,0x5574,0x559b,0x55c4,0x55fb,0x562a,0x564b,0x5670,0x567f,0x56a2,0x56b9,0x56c6,0x56d5, -0x56f2,0x570b,0x572e,0x5753,0x576c,0x5781,0x5790,0x57a1,0x57ae,0x57cf,0x38e1,1,0,4,0x580d,0x5818, -0x5830,0x5848,0x391d,0x36,1,2,4,8,0xe,0x10,0x20,0x3e,0x40,0x80,0x100,0x1c0, -0x200,0x400,0x800,0xe00,0x1000,0x2000,0x4000,0x7000,0x8000,0x10000,0x20000,0x40000,0x78001,0x80000,0x100000,0x200000, -0x400000,0x800000,0x1000000,0x2000000,0x4000000,0x8000000,0xf000000,0x10000000,0x20000000,0x30f80000,0x3445,0x3454,0x3469,0x347e,0x5881,0x3493, -0x34a7,0x5877,0x34b8,0x34cc,0x34df,0x5892,0x34f0,0x3509,0x351b,0x58a9,0x352c,0x3540,0x3553,0x58d2,0x356b,0x357d, -0x3588,0x3598,0x586e,0x35a6,0x35bb,0x35d0,0x35e6,0x3600,0x3616,0x3626,0x363a,0x364e,0x58c8,0x365f,0x3677,0x58b3 +const int32_t PropNameData::valueMaps[1463]={ +6,0,0x4b,0,0xfb,0x368,0xfb,0x37e,0xfb,0x393,0xfb,0x3a9,0xfb,0x3b4,0xfb,0x3d5, +0xfb,0x3e5,0xfb,0x3f4,0xfb,0x402,0xfb,0x426,0xfb,0x43d,0xfb,0x455,0xfb,0x46c,0xfb,0x47b, +0xfb,0x48a,0xfb,0x49b,0xfb,0x4a9,0xfb,0x4bb,0xfb,0x4d5,0xfb,0x4f0,0xfb,0x505,0xfb,0x522, +0xfb,0x533,0xfb,0x53e,0xfb,0x55d,0xfb,0x573,0xfb,0x584,0xfb,0x594,0xfb,0x5af,0xfb,0x5c8, +0xfb,0x5d9,0xfb,0x5f3,0xfb,0x606,0xfb,0x616,0xfb,0x630,0xfb,0x649,0xfb,0x660,0xfb,0x674, +0xfb,0x68a,0xfb,0x69e,0xfb,0x6b4,0xfb,0x6ce,0xfb,0x6e6,0xfb,0x702,0xfb,0x70a,0xfb,0x712, +0xfb,0x71a,0xfb,0x722,0xfb,0x72b,0xfb,0x738,0xfb,0x74b,0xfb,0x768,0xfb,0x785,0xfb,0x7a2, +0xfb,0x7c0,0xfb,0x7de,0xfb,0x802,0xfb,0x80f,0xfb,0x829,0xfb,0x83e,0xfb,0x859,0xfb,0x870, +0xfb,0x887,0xfb,0x8a9,0xfb,0x8c8,0xfb,0x8e1,0xfb,0x90e,0xfb,0x947,0xfb,0x978,0xfb,0x9a7, +0xfb,0x9d6,0xfb,0x9eb,0xfb,0xa04,0xfb,0xa2f,0xfb,0x1000,0x101a,0xa60,0x177,0xc80,0x192,0x331c, +0x101,0x333b,0x2df,0x3479,0x2f5,0x34d3,0x2ff,0x3730,0x321,0x405b,0x38d,0x40cb,0x397,0x43b0,0x3cb,0x43ee, +0x3d3,0x4f3e,0x4a0,0x4fbc,0x4aa,0x4fe1,0x4b0,0x4ffb,0x4b6,0x501c,0x4bd,0x5036,0x101,0x505b,0x101,0x5081, +0x4c4,0x512b,0x4da,0x51a4,0x4ed,0x5256,0x508,0x528d,0x50f,0x546d,0x523,0x58ed,0x54b,0x594c,0x553,0x2000, +0x2001,0x5999,0x559,0x3000,0x3001,0x5a25,0,0x4000,0x400e,0x5a37,0,0x5a40,0,0x5a5a,0,0x5a6b, +0,0x5a7c,0,0x5a92,0,0x5a9b,0,0x5ab8,0,0x5ad6,0,0x5af4,0,0x5b12,0,0x5b28, +0,0x5b3c,0,0x5b52,0,0x7000,0x7002,0x5b6b,0,0x5b82,0x5a7,0x896,0x12,0,1,0x12, +0x20,0x8b4,0x4a,0,1,6,7,8,9,0xa,0xb,0xc,0xd,0xe,0xf,0x10, +0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,0x20, +0x21,0x22,0x23,0x24,0x54,0x5b,0x67,0x6b,0x76,0x7a,0x81,0x82,0x84,0x85,0xc8,0xca, +0xd6,0xd8,0xda,0xdc,0xde,0xe0,0xe2,0xe4,0xe6,0xe8,0xe9,0xea,0xf0,0x2e,0x40,0x4c, +0x5e,0x68,0x79,0x84,0x91,0x9e,0xab,0xb8,0xc5,0xd2,0xdf,0xec,0xf9,0x106,0x113,0x120, +0x12d,0x13a,0x147,0x154,0x161,0x16e,0x17b,0x188,0x195,0x1a2,0x1af,0x1bc,0x1c9,0x1d6,0x1e3,0x1f0, +0x1fd,0x20c,0x21b,0x22a,0x239,0x248,0x257,0x266,0x275,0x28f,0x2a3,0x2b7,0x2d2,0x2e1,0x2ea,0x2fa, +0x302,0x30b,0x31a,0x323,0x333,0x344,0x355,0xa55,1,0,0x17,0xa6f,0xa80,0xa91,0xaa5,0xabc, +0xad4,0xae6,0xafb,0xb12,0xb27,0xb37,0xb49,0xb66,0xb82,0xb94,0xbb1,0xbcd,0xbe9,0xbfe,0xc13,0xc2d, +0xc48,0xc63,0xbf7,1,0,0x149,0xc8b,0xc98,0xcab,0xcd3,0xcf1,0xd0f,0xd27,0xd52,0xd7c,0xd94, +0xda7,0xdba,0xdc9,0xdd8,0xde7,0xdf6,0xe0d,0xe1e,0xe31,0xe44,0xe51,0xe5e,0xe6d,0xe7e,0xe93,0xea4, +0xeaf,0xeb8,0xec9,0xeda,0xeed,0xeff,0xf12,0xf25,0xf64,0xf71,0xf7e,0xf8b,0xfa0,0xfd0,0xfea,0x100b, +0x1036,0x1059,0x10b7,0x10de,0x10f9,0x1108,0x112f,0x1157,0x117a,0x119d,0x11c7,0x11e0,0x11ff,0x1222,0x1246,0x1259, +0x1273,0x129d,0x12b5,0x12dd,0x1306,0x1319,0x132c,0x133f,0x1366,0x1375,0x1395,0x13c3,0x13e1,0x140f,0x142b,0x1446, +0x145f,0x1478,0x1499,0x14c9,0x14e8,0x150a,0x153e,0x156b,0x15b0,0x15d1,0x15fb,0x161c,0x1645,0x1658,0x168b,0x16a2, +0x16b1,0x16c2,0x16ed,0x1704,0x1735,0x1763,0x17a6,0x17b1,0x17ea,0x17fb,0x180c,0x1819,0x182c,0x1866,0x188a,0x18ae, +0x18e8,0x1920,0x194b,0x1963,0x198f,0x19bb,0x19c8,0x19d7,0x19f4,0x1a16,0x1a44,0x1a64,0x1a8b,0x1ab2,0x1ad1,0x1ae4, +0x1af5,0x1b06,0x1b2b,0x1b50,0x1b77,0x1bab,0x1bd8,0x1bf6,0x1c09,0x1c22,0x1c5b,0x1c6a,0x1c8a,0x1cac,0x1cce,0x1ce5, +0x1cfc,0x1d29,0x1d42,0x1d5b,0x1d8c,0x1db6,0x1dd1,0x1de4,0x1e03,0x1e0c,0x1e1f,0x1e3d,0x1e5b,0x1e6e,0x1e85,0x1e9a, +0x1ecf,0x1ef3,0x1f08,0x1f17,0x1f2a,0x1f4e,0x1f57,0x1f7b,0x1f92,0x1fa5,0x1fb4,0x1fbf,0x1fe0,0x1ff8,0x2007,0x2016, +0x2025,0x203c,0x2051,0x2066,0x209f,0x20b2,0x20ce,0x20d9,0x20e6,0x2114,0x2138,0x215b,0x216e,0x2190,0x21a3,0x21be, +0x21e1,0x2204,0x2229,0x223a,0x2269,0x2296,0x22ad,0x22c8,0x22d7,0x2302,0x233a,0x2374,0x23a2,0x23b3,0x23c0,0x23e4, +0x23f3,0x240f,0x2429,0x2446,0x247e,0x2493,0x24c0,0x24df,0x250d,0x252d,0x2561,0x2570,0x259a,0x25bd,0x25e8,0x25f3, +0x2604,0x261f,0x2643,0x2650,0x2665,0x268c,0x26b7,0x26ee,0x2701,0x2712,0x2742,0x2753,0x2762,0x2777,0x2795,0x27a8, +0x27bb,0x27d2,0x27ef,0x27fa,0x2803,0x2825,0x283a,0x285f,0x2876,0x289f,0x28ba,0x28cf,0x28e8,0x2909,0x293e,0x294f, +0x2980,0x29a4,0x29b5,0x29ce,0x29d9,0x2a06,0x2a28,0x2a56,0x2a89,0x2a98,0x2aa9,0x2ac6,0x2b08,0x2b2f,0x2b3c,0x2b51, +0x2b75,0x2b9b,0x2bd4,0x2be5,0x2c09,0x2c14,0x2c21,0x2c30,0x2c55,0x2c83,0x2c9f,0x2cbc,0x2cc9,0x2cda,0x2cf8,0x2d1b, +0x2d38,0x2d45,0x2d65,0x2d82,0x2da3,0x2dcc,0x2ddd,0x2dfc,0x2e15,0x2e2e,0x2e3f,0x2e88,0x2e99,0x2eb2,0x2ee1,0x2f0e, +0x2f33,0x2f75,0x2f91,0x2fa0,0x2fb7,0x2fe5,0x2ffe,0x3027,0x3041,0x307c,0x309a,0x30a9,0x30c9,0x30e4,0x3108,0x3124, +0x3142,0x3160,0x3177,0x3186,0x3191,0x31ce,0x31e1,0x320b,0x322b,0x3259,0x327d,0x32a5,0x32ca,0x32d5,0x32ee,0x2001, +1,0,0x12,0x3352,0x3362,0x3375,0x3385,0x3395,0x33a4,0x33b4,0x33c6,0x33d9,0x33eb,0x33fb,0x340b,0x341a, +0x3429,0x3439,0x3446,0x3455,0x3469,0x20bf,1,0,6,0x348e,0x3499,0x34a6,0x34b3,0x34c0,0x34cb,0x2103, +1,0,0x1e,0x34e8,0x34f7,0x350c,0x3521,0x3536,0x354a,0x355b,0x356f,0x3582,0x3593,0x35ac,0x35be,0x35cf, +0x35e3,0x35f6,0x360e,0x3620,0x362b,0x363b,0x3649,0x365e,0x3673,0x3689,0x36a3,0x36b9,0x36c9,0x36dd,0x36f1,0x3702, +0x371a,0x232e,1,0,0x68,0x3742,0x3765,0x376e,0x377b,0x3786,0x378f,0x379a,0x37a3,0x37bc,0x37c1,0x37ca, +0x37e7,0x37f0,0x37fd,0x3806,0x382a,0x3831,0x383a,0x384d,0x3858,0x3861,0x386c,0x3885,0x388e,0x389d,0x38a8,0x38b1, +0x38bc,0x38c5,0x38cc,0x38d5,0x38e0,0x38e9,0x3902,0x390b,0x3918,0x3923,0x3934,0x393f,0x3954,0x396b,0x3974,0x397d, +0x3996,0x39a1,0x39aa,0x39b3,0x39ca,0x39e7,0x39f2,0x3a03,0x3a0e,0x3a15,0x3a22,0x3a2f,0x3a5c,0x3a71,0x3a7a,0x3a95, +0x3ab8,0x3ad9,0x3afa,0x3b1f,0x3b46,0x3b67,0x3b8a,0x3bab,0x3bd2,0x3bf3,0x3c18,0x3c37,0x3c56,0x3c75,0x3c92,0x3cb3, +0x3cd4,0x3cf7,0x3d1c,0x3d3b,0x3d5a,0x3d7b,0x3da2,0x3dc7,0x3de6,0x3e07,0x3e2a,0x3e45,0x3e5e,0x3e79,0x3e92,0x3eaf, +0x3eca,0x3ee7,0x3f06,0x3f23,0x3f40,0x3f5f,0x3f7c,0x3f97,0x3fb4,0x3fd1,0x4004,0x402b,0x403e,0x2691,1,0, +6,0x406c,0x407b,0x408b,0x409b,0x40ab,0x40bc,0x26ef,1,0,0x30,0x40da,0x40e6,0x40f4,0x4103,0x4112, +0x4122,0x4133,0x4147,0x415c,0x4172,0x4185,0x4199,0x41a9,0x41b2,0x41bd,0x41cd,0x41e9,0x41fb,0x4209,0x4218,0x4224, +0x4239,0x424d,0x4260,0x426e,0x4282,0x4290,0x429a,0x42ac,0x42b8,0x42c6,0x42d6,0x42dd,0x42e4,0x42eb,0x42f2,0x42f9, +0x430f,0x4330,0x870,0x4342,0x434d,0x435c,0x4365,0x4370,0x4383,0x4394,0x43a5,0x297f,1,0,4,0x43c1, +0x43cc,0x43d8,0x43e2,0x29a5,1,0,0xc9,0x43f9,0x4406,0x441b,0x4428,0x4437,0x4445,0x4454,0x4463,0x4475, +0x4484,0x4492,0x44a3,0x44b2,0x44c1,0x44ce,0x44da,0x44e9,0x44f8,0x4502,0x450f,0x451c,0x452b,0x4539,0x4548,0x4554, +0x455e,0x456a,0x457a,0x458a,0x4598,0x45a4,0x45b5,0x45c1,0x45cd,0x45db,0x45e8,0x45f4,0x4601,0xea4,0x460e,0x461c, +0x4636,0x463f,0x464d,0x465b,0x4667,0x4676,0x4684,0x4692,0x469e,0x46ad,0x46bb,0x46c9,0x46d6,0x46e5,0x4700,0x470f, +0x4720,0x4731,0x4744,0x4756,0x4765,0x4777,0x4786,0x4792,0x479d,0x1fb4,0x47aa,0x47b5,0x47c0,0x47cb,0x47d6,0x47f1, +0x47fc,0x4807,0x4812,0x4825,0x4839,0x4844,0x4853,0x4862,0x486d,0x4878,0x4885,0x4894,0x48a2,0x48ad,0x48c8,0x48d2, +0x48e3,0x48f4,0x4903,0x4914,0x491f,0x492a,0x4935,0x4940,0x494b,0x4956,0x4961,0x496b,0x4976,0x4986,0x4991,0x499f, +0x49ac,0x49b7,0x49c6,0x49d3,0x49e0,0x49ef,0x49fc,0x4a0d,0x4a1f,0x4a2f,0x4a3a,0x4a4d,0x4a64,0x4a72,0x4a7f,0x4a8a, +0x4a97,0x4aa8,0x4ac4,0x4ada,0x4ae5,0x4b02,0x4b12,0x4b21,0x4b2c,0x4b37,0x20ce,0x4b43,0x4b4e,0x4b66,0x4b76,0x4b85, +0x4b93,0x4ba1,0x4bac,0x4bb7,0x4bcb,0x4be2,0x4bfa,0x4c0a,0x4c1a,0x4c2a,0x4c3c,0x4c47,0x4c52,0x4c5c,0x4c68,0x4c76, +0x4c89,0x4c95,0x4ca2,0x4cad,0x4cc9,0x4cd6,0x4ce4,0x4cfd,0x29ce,0x4d0c,0x27ef,0x4d19,0x4d27,0x4d39,0x4d47,0x4d53, +0x4d63,0x2c09,0x4d71,0x4d7d,0x4d88,0x4d93,0x4d9e,0x4db2,0x4dc0,0x4dd7,0x4de3,0x4df7,0x4e05,0x4e17,0x4e2d,0x4e3b, +0x4e4d,0x4e5b,0x4e78,0x4e8a,0x4e97,0x4ea8,0x4eba,0x4ed4,0x4ee1,0x4ef4,0x4f05,0x3186,0x4f12,0x32ca,0x4f21,0x4f33, +0x3403,1,0,6,0x4f58,0x4f6b,0x4f7b,0x4f89,0x4f9a,0x4faa,0x345f,0x12,0,1,0x4fd4,0x4fda, +0x346c,0x12,0,1,0x4fd4,0x4fda,0x3479,1,0,3,0x4fd4,0x4fda,0x5013,0x348f,1,0, +3,0x4fd4,0x4fda,0x5013,0x34a5,1,0,0x12,0x509d,0x50a7,0x50b3,0x50ba,0x50c5,0x50ca,0x50d1,0x50d8, +0x50e1,0x50e6,0x50eb,0x50fb,0x870,0x4342,0x5107,0x434d,0x5117,0x435c,0x354e,1,0,0xf,0x509d,0x513e, +0x5148,0x5152,0x515d,0x4218,0x5167,0x5173,0x517b,0x5182,0x518c,0x50b3,0x50ba,0x50ca,0x5196,0x35d5,1,0, +0x17,0x509d,0x51b3,0x5152,0x51bf,0x51cc,0x51da,0x4218,0x51e5,0x50b3,0x51f6,0x50ca,0x5205,0x5213,0x870,0x4330, +0x521f,0x5230,0x4342,0x5107,0x434d,0x5117,0x435c,0x5241,0x36f2,1,0,3,0x5274,0x527c,0x5284,0x370b, +1,0,0x10,0x52ad,0x52b4,0x52c3,0x52e4,0x5307,0x5312,0x5331,0x5348,0x5355,0x535e,0x537d,0x53b0,0x53cb, +0x53fa,0x5417,0x543c,0x37a4,1,0,0x24,0x548b,0x5498,0x54ab,0x54b8,0x54e5,0x550a,0x551f,0x553e,0x555f, +0x558c,0x55c5,0x55e8,0x560b,0x5638,0x566d,0x5694,0x56bd,0x56f4,0x5723,0x5744,0x5769,0x5778,0x579b,0x57b2,0x57bf, +0x57ce,0x57eb,0x5804,0x5827,0x584c,0x5865,0x587a,0x5889,0x589a,0x58a7,0x58c8,0x3974,1,0,4,0x5906, +0x5911,0x5929,0x5941,0x39b0,0x12,0,1,0x5971,0x5988,0x39c7,0x36,1,2,4,8,0xe, +0x10,0x20,0x3e,0x40,0x80,0x100,0x1c0,0x200,0x400,0x800,0xe00,0x1000,0x2000,0x4000,0x7000,0x8000, +0x10000,0x20000,0x40000,0x78001,0x80000,0x100000,0x200000,0x400000,0x800000,0x1000000,0x2000000,0x4000000,0x8000000,0xf000000,0x10000000,0x20000000, +0x30f80000,0x34e8,0x34f7,0x350c,0x3521,0x59c7,0x3536,0x354a,0x59bd,0x355b,0x356f,0x3582,0x59d8,0x3593,0x35ac,0x35be, +0x59ef,0x35cf,0x35e3,0x35f6,0x5a18,0x360e,0x3620,0x362b,0x363b,0x59b4,0x3649,0x365e,0x3673,0x3689,0x36a3,0x36b9, +0x36c9,0x36dd,0x36f1,0x5a0e,0x3702,0x371a,0x59f9,0x3cde,1,0,0xc,0x5ba3,0x5bc0,0x5bd7,0x5bfc,0x5c0f, +0x5c20,0x5c35,0x5c48,0x5c5d,0x5c78,0x5c91,0x5ca6 }; -const uint8_t PropNameData::bytesTries[15412]={ +const uint8_t PropNameData::bytesTries[15733]={ 0,0x15,0x6d,0xc3,0xc7,0x73,0xc2,0x12,0x76,0x7a,0x76,0x6a,0x77,0xa2,0x52,0x78, 1,0x64,0x50,0x69,0x10,0x64,1,0x63,0x30,0x73,0x62,0x13,0x74,0x61,0x72,0x74, 0x63,0x60,0x16,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x65,0x61,0x13,0x69,0x67,0x69,0x74, @@ -166,913 +169,933 @@ const uint8_t PropNameData::bytesTries[15412]={ 0x30,0x77,0x10,0x73,0x77,0x11,0x79,0x6e,0x75,0x12,0x65,0x72,0x6e,1,0x73,0x38, 0x77,0x18,0x68,0x69,0x74,0x65,0x73,0x70,0x61,0x63,0x65,0x77,0x14,0x79,0x6e,0x74, 0x61,0x78,0x75,0x10,0x6d,0x9f,1,0x6d,0x3c,0x75,0x1a,0x6f,0x74,0x61,0x74,0x69, -0x6f,0x6e,0x6d,0x61,0x72,0x6b,0x53,0x12,0x61,0x72,0x6b,0x53,0x66,0xc1,0xf8,0x69, -0xc1,0x3c,0x69,0xa2,0x6f,0x6a,0xa4,9,0x6c,4,0x62,0xc3,8,0x63,0x8c,0x65, +0x6f,0x6e,0x6d,0x61,0x72,0x6b,0x53,0x12,0x61,0x72,0x6b,0x53,0x66,0xc2,0x4a,0x69, +0xc1,0x8e,0x69,0xa2,0x6f,0x6a,0xa4,0x5b,0x6c,4,0x62,0xc3,8,0x63,0x8c,0x65, 0x98,0x69,0xa2,0x56,0x6f,2,0x65,0x4b,0x67,0x4c,0x77,0x11,0x65,0x72,0x4c,0x13, 0x63,0x61,0x73,0x65,0x4c,0x16,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0xd9,0x40,4, 0x11,0x69,0x63,0x1f,0x61,0x6c,0x6f,0x72,0x64,0x65,0x72,0x65,0x78,0x63,0x65,0x70, 0x74,0x69,0x6f,0x6e,0x4b,0xd8,0x40,4,0x11,0x63,0x63,0xc3,0x10,0x18,0x61,0x64, 0x63,0x61,0x6e,0x6f,0x6e,0x69,0x63,0x1f,0x61,0x6c,0x63,0x6f,0x6d,0x62,0x69,0x6e, 0x69,0x6e,0x67,0x63,0x6c,0x61,0x73,0x73,0xc3,0x10,0x16,0x6e,0x65,0x62,0x72,0x65, -0x61,0x6b,0xc3,8,2,0x64,0x4a,0x6e,0xa2,0x5b,0x73,1,0x63,0xd9,0x40,3, -0x6f,0x16,0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0xd9,0x40,3,2,0x63,0x80,0x65, -0x90,0x73,0x40,1,0x62,0x52,0x74,0x46,1,0x61,0x40,0x72,0x1c,0x69,0x6e,0x61, -0x72,0x79,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x47,0x11,0x72,0x74,0x41,0x44, -0x1c,0x69,0x6e,0x61,0x72,0x79,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x45,0x3e, -0x16,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x65,0x3f,0x10,0x6f,0x42,0x16,0x67,0x72,0x61, -0x70,0x68,0x69,0x63,0x43,2,0x64,0x2e,0x70,0x86,0x73,0x10,0x63,0xc3,0x17,0x11, -0x69,0x63,1,0x70,0x46,0x73,0x1e,0x79,0x6c,0x6c,0x61,0x62,0x69,0x63,0x63,0x61, -0x74,0x65,0x67,0x6f,0x72,0x79,0xc3,0x17,0x10,0x6f,0x1f,0x73,0x69,0x74,0x69,0x6f, -0x6e,0x61,0x6c,0x63,0x61,0x74,0x65,0x67,0x6f,0x72,0x79,0xc3,0x16,0x10,0x63,0xc3, -0x16,2,0x67,0xc3,6,0x6f,0x26,0x74,0xc3,7,0x11,0x69,0x6e,1,0x63,0x4a, -0x69,0x11,0x6e,0x67,1,0x67,0x2e,0x74,0x12,0x79,0x70,0x65,0xc3,7,0x13,0x72, -0x6f,0x75,0x70,0xc3,6,0x48,0x15,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x49,0x66,0x86, -0x67,0xa2,0x4a,0x68,3,0x61,0x36,0x65,0x58,0x73,0x68,0x79,0x13,0x70,0x68,0x65, -0x6e,0x3d,0x1f,0x6e,0x67,0x75,0x6c,0x73,0x79,0x6c,0x6c,0x61,0x62,0x6c,0x65,0x74, -0x79,0x70,0x65,0xc3,0xb,0x10,0x78,0x3a,0x14,0x64,0x69,0x67,0x69,0x74,0x3b,0x10, -0x74,0xc3,0xb,0x16,0x75,0x6c,0x6c,0x63,0x6f,0x6d,0x70,0x1f,0x6f,0x73,0x69,0x74, -0x69,0x6f,0x6e,0x65,0x78,0x63,0x6c,0x75,0x73,0x69,0x6f,0x6e,0x33,2,0x63,0xa2, -0x44,0x65,0xa2,0x4b,0x72,3,0x61,0x34,0x62,0x84,0x65,0x8a,0x6c,0x12,0x69,0x6e, -0x6b,0x39,0x11,0x70,0x68,0x7c,0x12,0x65,0x6d,0x65,3,0x62,0x5e,0x63,0x30,0x65, -0x48,0x6c,0x12,0x69,0x6e,0x6b,0x39,0x1a,0x6c,0x75,0x73,0x74,0x65,0x72,0x62,0x72, -0x65,0x61,0x6b,0xc3,0x12,0x14,0x78,0x74,0x65,0x6e,0x64,0x37,0x12,0x61,0x73,0x65, -0x35,0x11,0x78,0x74,0x37,0xc2,5,1,0x62,0xc3,0x12,0x6d,0xd9,0x20,0,0x1c, -0x6e,0x65,0x72,0x61,0x6c,0x63,0x61,0x74,0x65,0x67,0x6f,0x72,0x79,0xc2,5,0x13, -0x6d,0x61,0x73,0x6b,0xd9,0x20,0,0x61,0xa2,0xa2,0x62,0xa2,0xd0,0x63,0xa4,0x4f, -0x64,0xa6,0x1c,0x65,5,0x6d,0x75,0x6d,0x6e,0x70,0xa2,0x6b,0x78,0x10,0x74,0x30, -1,0x65,0x2c,0x70,0x12,0x69,0x63,0x74,0xa1,0x12,0x6e,0x64,0x65,1,0x64,0x24, -0x72,0x31,0x1b,0x70,0x69,0x63,0x74,0x6f,0x67,0x72,0x61,0x70,0x68,0x69,0x63,0xa1, -0x10,0x6f,1,0x64,0x97,0x6a,0x10,0x69,0x92,3,0x63,0x44,0x6b,0x54,0x6d,0x70, -0x70,0x1a,0x72,0x65,0x73,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x95,0x17,0x6f, -0x6d,0x70,0x6f,0x6e,0x65,0x6e,0x74,0x9b,0x1c,0x65,0x79,0x63,0x61,0x70,0x73,0x65, -0x71,0x75,0x65,0x6e,0x63,0x65,0xa3,0x42,0x16,0x6f,0x64,0x69,0x66,0x69,0x65,0x72, -0x96,0x13,0x62,0x61,0x73,0x65,0x99,0x12,0x72,0x65,0x73,0x95,0x61,0x30,0x62,0x4e, -0x63,0x12,0x6f,0x6d,0x70,0x9b,0xc2,4,0x1b,0x73,0x74,0x61,0x73,0x69,0x61,0x6e, -0x77,0x69,0x64,0x74,0x68,0xc3,4,0x12,0x61,0x73,0x65,0x99,3,0x67,0x44,0x68, -0x4a,0x6c,0x4e,0x73,0x1a,0x63,0x69,0x69,0x68,0x65,0x78,0x64,0x69,0x67,0x69,0x74, -0x23,0x10,0x65,0xd9,0x40,0,0x11,0x65,0x78,0x23,1,0x6e,0x38,0x70,0x11,0x68, -0x61,0x20,0x14,0x62,0x65,0x74,0x69,0x63,0x21,0x11,0x75,0x6d,0x79,5,0x6c,0x22, -0x6c,0x36,0x6d,0x52,0x70,1,0x62,0xd9,0x40,0xd,0x74,0xc3,0x15,2,0x61,0x32, -0x6b,0xc3,1,0x6f,0x11,0x63,0x6b,0xc3,1,0x11,0x6e,0x6b,0x7b,0x10,0x67,0xd9, -0x40,1,0x61,0xa2,0x4f,0x63,0xc3,0,0x69,0x11,0x64,0x69,2,0x63,0x54,0x6d, -0x74,0x70,0x1b,0x61,0x69,0x72,0x65,0x64,0x62,0x72,0x61,0x63,0x6b,0x65,0x74,0xd8, -0x40,0xd,0x13,0x74,0x79,0x70,0x65,0xc3,0x15,0x24,1,0x6c,0x30,0x6f,0x14,0x6e, -0x74,0x72,0x6f,0x6c,0x25,0x12,0x61,0x73,0x73,0xc3,0,0x26,0x14,0x69,0x72,0x72, -0x6f,0x72,1,0x65,0x38,0x69,0x16,0x6e,0x67,0x67,0x6c,0x79,0x70,0x68,0xd9,0x40, -1,0x10,0x64,0x27,0x17,0x73,0x69,0x63,0x65,0x6d,0x6f,0x6a,0x69,0xa3,0x41,6, -0x68,0x7c,0x68,0x54,0x69,0x85,0x6f,0xa2,0x6f,0x77,4,0x63,0x30,0x6b,0x36,0x6c, -0x87,0x74,0x8b,0x75,0x89,1,0x66,0x8d,0x6d,0x8f,0x11,0x63,0x66,0x91,0x18,0x61, -0x6e,0x67,0x65,0x73,0x77,0x68,0x65,0x6e,4,0x63,0x44,0x6c,0x6c,0x6e,0x7e,0x74, -0x98,0x75,0x18,0x70,0x70,0x65,0x72,0x63,0x61,0x73,0x65,0x64,0x89,0x12,0x61,0x73, -0x65,1,0x66,0x30,0x6d,0x14,0x61,0x70,0x70,0x65,0x64,0x8f,0x14,0x6f,0x6c,0x64, -0x65,0x64,0x8d,0x18,0x6f,0x77,0x65,0x72,0x63,0x61,0x73,0x65,0x64,0x87,0x1c,0x66, -0x6b,0x63,0x63,0x61,0x73,0x65,0x66,0x6f,0x6c,0x64,0x65,0x64,0x91,0x18,0x69,0x74, -0x6c,0x65,0x63,0x61,0x73,0x65,0x64,0x8b,0x13,0x6d,0x70,0x65,0x78,0x33,0x61,0x2e, -0x63,0xa2,0x48,0x66,0xd9,0x40,2,1,0x6e,0x72,0x73,0x10,0x65,3,0x64,0x83, -0x66,0x3a,0x69,0x4a,0x73,0x17,0x65,0x6e,0x73,0x69,0x74,0x69,0x76,0x65,0x65,0x15, -0x6f,0x6c,0x64,0x69,0x6e,0x67,0xd9,0x40,2,0x17,0x67,0x6e,0x6f,0x72,0x61,0x62, -0x6c,0x65,0x85,0x13,0x6f,0x6e,0x69,0x63,0x1f,0x61,0x6c,0x63,0x6f,0x6d,0x62,0x69, -0x6e,0x69,0x6e,0x67,0x63,0x6c,0x61,0x73,0x73,0xc3,2,0x10,0x63,0xc3,2,3, -0x61,0x30,0x65,0x34,0x69,0xa2,0x41,0x74,0xc3,3,0x11,0x73,0x68,0x29,2,0x63, -0x3a,0x66,0x58,0x70,0x2c,0x16,0x72,0x65,0x63,0x61,0x74,0x65,0x64,0x2d,0x1d,0x6f, -0x6d,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x74,0x79,0x70,0x65,0xc3,3,0x15, -0x61,0x75,0x6c,0x74,0x69,0x67,0x1f,0x6e,0x6f,0x72,0x61,0x62,0x6c,0x65,0x63,0x6f, -0x64,0x65,0x70,0x6f,0x69,0x6e,0x74,0x2b,0x2a,0x10,0x61,0x2e,0x15,0x63,0x72,0x69, -0x74,0x69,0x63,0x2f,3,0x66,0x34,0x6e,0x3e,0x74,0x42,0x79,0x22,0x11,0x65,0x73, -0x23,0x20,0x13,0x61,0x6c,0x73,0x65,0x21,0x20,0x10,0x6f,0x21,0x22,0x12,0x72,0x75, -0x65,0x23,0xb,0x6b,0x5b,0x6f,0x23,0x6f,0x3c,0x72,0x4c,0x76,1,0x69,0x24,0x72, -0x33,0x13,0x72,0x61,0x6d,0x61,0x33,0x10,0x76,0x22,0x14,0x65,0x72,0x6c,0x61,0x79, -0x23,0xa2,0xe2,0x13,0x69,0x67,0x68,0x74,0xa3,0xe2,0x6b,0x58,0x6c,0x74,0x6e,3, -0x6b,0x2f,0x6f,0x30,0x72,0x21,0x75,0x12,0x6b,0x74,0x61,0x2f,0x19,0x74,0x72,0x65, -0x6f,0x72,0x64,0x65,0x72,0x65,0x64,0x21,1,0x61,0x24,0x76,0x31,0x18,0x6e,0x61, -0x76,0x6f,0x69,0x63,0x69,0x6e,0x67,0x31,0xa2,0xe0,0x12,0x65,0x66,0x74,0xa3,0xe0, -0x64,0x45,0x64,0x4e,0x68,0x88,0x69,1,0x6f,0x26,0x73,0xa3,0xf0,0x1a,0x74,0x61, -0x73,0x75,0x62,0x73,0x63,0x72,0x69,0x70,0x74,0xa3,0xf0,2,0x61,0xa3,0xea,0x62, -0xa3,0xe9,0x6f,0x13,0x75,0x62,0x6c,0x65,1,0x61,0x30,0x62,0x13,0x65,0x6c,0x6f, -0x77,0xa3,0xe9,0x13,0x62,0x6f,0x76,0x65,0xa3,0xea,0x12,0x61,0x6e,0x72,0x2c,0x15, -0x65,0x61,0x64,0x69,0x6e,0x67,0x2d,0x61,0xa2,0x7b,0x62,0xa2,0xd4,0x63,0x11,0x63, -0x63,4,0x31,0x3c,0x32,0xa2,0x42,0x33,0xa2,0x56,0x38,0xa2,0x64,0x39,0x10,0x31, -0xa3,0x5b,9,0x35,0xa,0x35,0x3f,0x36,0x41,0x37,0x43,0x38,0x45,0x39,0x47,0x30, -0x30,0x31,0x3c,0x32,0x42,0x33,0x4e,0x34,0x3d,0x34,1,0x33,0xa3,0x67,0x37,0xa3, -0x6b,0x36,0x10,0x38,0xa3,0x76,0x38,1,0x32,0xa3,0x7a,0x39,0xa3,0x81,0x3a,2, -0x30,0xa3,0x82,0x32,0xa3,0x84,0x33,0xa3,0x85,9,0x35,0xa,0x35,0x53,0x36,0x55, -0x37,0x57,0x38,0x59,0x39,0x5b,0x30,0x49,0x31,0x4b,0x32,0x4d,0x33,0x4f,0x34,0x51, -6,0x33,8,0x33,0x63,0x34,0x65,0x35,0x67,0x36,0x69,0x30,0x5d,0x31,0x5f,0x32, -0x61,0x10,0x34,0xa3,0x54,0xa2,0xe6,3,0x62,0xa0,0x6c,0xa3,0xe4,0x72,0xa3,0xe8, -0x74,2,0x61,0x74,0x62,0x7c,0x74,0x14,0x61,0x63,0x68,0x65,0x64,1,0x61,0x3e, -0x62,0x13,0x65,0x6c,0x6f,0x77,0xa2,0xca,0x13,0x6c,0x65,0x66,0x74,0xa3,0xc8,0x13, -0x62,0x6f,0x76,0x65,0xa2,0xd6,0x14,0x72,0x69,0x67,0x68,0x74,0xa3,0xd8,0xa2,0xd6, -0x10,0x72,0xa3,0xd8,0xa2,0xca,0x10,0x6c,0xa3,0xc8,0x12,0x6f,0x76,0x65,0xa2,0xe6, -1,0x6c,0x30,0x72,0x13,0x69,0x67,0x68,0x74,0xa3,0xe8,0x12,0x65,0x66,0x74,0xa3, -0xe4,0xa2,0xdc,2,0x65,0x2c,0x6c,0xa3,0xda,0x72,0xa3,0xde,0x12,0x6c,0x6f,0x77, -0xa2,0xdc,1,0x6c,0x30,0x72,0x13,0x69,0x67,0x68,0x74,0xa3,0xde,0x12,0x65,0x66, -0x74,0xa3,0xda,0xb,0x6e,0xc0,0xca,0x72,0x5f,0x72,0x46,0x73,0xa2,0x48,0x77,1, -0x68,0x24,0x73,0x33,0x17,0x69,0x74,0x65,0x73,0x70,0x61,0x63,0x65,0x33,0x22,1, -0x69,0x30,0x6c,2,0x65,0x3d,0x69,0x4b,0x6f,0x3f,0x18,0x67,0x68,0x74,0x74,0x6f, -0x6c,0x65,0x66,0x74,0x22,2,0x65,0x38,0x69,0x48,0x6f,0x16,0x76,0x65,0x72,0x72, -0x69,0x64,0x65,0x3f,0x17,0x6d,0x62,0x65,0x64,0x64,0x69,0x6e,0x67,0x3d,0x15,0x73, -0x6f,0x6c,0x61,0x74,0x65,0x4b,0x30,0x1e,0x65,0x67,0x6d,0x65,0x6e,0x74,0x73,0x65, -0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0x31,0x6e,0xa2,0x41,0x6f,0xa2,0x53,0x70,2, -0x61,0x66,0x64,0x86,0x6f,0x1b,0x70,0x64,0x69,0x72,0x65,0x63,0x74,0x69,0x6f,0x6e, -0x61,0x6c,1,0x66,0x32,0x69,0x15,0x73,0x6f,0x6c,0x61,0x74,0x65,0x4d,0x14,0x6f, -0x72,0x6d,0x61,0x74,0x41,0x1f,0x72,0x61,0x67,0x72,0x61,0x70,0x68,0x73,0x65,0x70, -0x61,0x72,0x61,0x74,0x6f,0x72,0x2f,1,0x66,0x41,0x69,0x4d,1,0x6f,0x28,0x73, -0x10,0x6d,0x43,0x1b,0x6e,0x73,0x70,0x61,0x63,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b, -0x43,1,0x6e,0x35,0x74,0x19,0x68,0x65,0x72,0x6e,0x65,0x75,0x74,0x72,0x61,0x6c, -0x35,0x65,0x88,0x65,0x98,0x66,0xa2,0x6a,0x6c,0x20,1,0x65,0x30,0x72,2,0x65, -0x37,0x69,0x49,0x6f,0x39,0x18,0x66,0x74,0x74,0x6f,0x72,0x69,0x67,0x68,0x74,0x20, -2,0x65,0x38,0x69,0x48,0x6f,0x16,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x39,0x17, -0x6d,0x62,0x65,0x64,0x64,0x69,0x6e,0x67,0x37,0x15,0x73,0x6f,0x6c,0x61,0x74,0x65, -0x49,3,0x6e,0x25,0x73,0x27,0x74,0x29,0x75,0x15,0x72,0x6f,0x70,0x65,0x61,0x6e, -2,0x6e,0x3c,0x73,0x46,0x74,0x18,0x65,0x72,0x6d,0x69,0x6e,0x61,0x74,0x6f,0x72, -0x29,0x14,0x75,0x6d,0x62,0x65,0x72,0x25,0x17,0x65,0x70,0x61,0x72,0x61,0x74,0x6f, -0x72,0x27,1,0x69,0x28,0x73,0x10,0x69,0x47,0x1f,0x72,0x73,0x74,0x73,0x74,0x72, -0x6f,0x6e,0x67,0x69,0x73,0x6f,0x6c,0x61,0x74,0x65,0x47,0x61,0x4e,0x62,0x84,0x63, -1,0x6f,0x24,0x73,0x2d,0x1c,0x6d,0x6d,0x6f,0x6e,0x73,0x65,0x70,0x61,0x72,0x61, -0x74,0x6f,0x72,0x2d,2,0x6c,0x3b,0x6e,0x2b,0x72,0x13,0x61,0x62,0x69,0x63,1, -0x6c,0x30,0x6e,0x14,0x75,0x6d,0x62,0x65,0x72,0x2b,0x14,0x65,0x74,0x74,0x65,0x72, -0x3b,0x2e,1,0x6e,0x45,0x6f,0x1c,0x75,0x6e,0x64,0x61,0x72,0x79,0x6e,0x65,0x75, -0x74,0x72,0x61,0x6c,0x45,0,0x16,0x6d,0xc9,0x20,0x74,0xc2,0x30,0x77,0x89,0x77, -0x86,0x79,0xa2,0x46,0x7a,1,0x61,0x58,0x6e,0x1a,0x61,0x6d,0x65,0x6e,0x6e,0x79, -0x6d,0x75,0x73,0x69,0x63,0xa4,0x40,0x19,0x61,0x6c,0x6e,0x6f,0x74,0x61,0x74,0x69, -0x6f,0x6e,0xa5,0x40,0x1c,0x6e,0x61,0x62,0x61,0x7a,0x61,0x72,0x73,0x71,0x75,0x61, -0x72,0x65,0xa5,0x18,0x10,0x61,1,0x6e,0x36,0x72,0x16,0x61,0x6e,0x67,0x63,0x69, -0x74,0x69,0xa3,0xfc,0x12,0x63,0x68,0x6f,0xa5,0x2c,1,0x65,0x88,0x69,2,0x6a, -0x3c,0x72,0x68,0x73,0x17,0x79,0x6c,0x6c,0x61,0x62,0x6c,0x65,0x73,0xa3,0x48,0x12, -0x69,0x6e,0x67,0xa2,0x74,0x1e,0x68,0x65,0x78,0x61,0x67,0x72,0x61,0x6d,0x73,0x79, -0x6d,0x62,0x6f,0x6c,0x73,0xa3,0x74,0x16,0x61,0x64,0x69,0x63,0x61,0x6c,0x73,0xa3, -0x49,0x13,0x7a,0x69,0x64,0x69,0xa5,0x34,0x74,0xa2,0x65,0x75,0xa4,0x4f,0x76,3, -0x61,0x3c,0x65,0x80,0x69,0xa2,0x50,0x73,0xa2,0x6c,0x12,0x73,0x75,0x70,0xa3,0x7d, -1,0x69,0xa3,0x9f,0x72,0x1e,0x69,0x61,0x74,0x69,0x6f,0x6e,0x73,0x65,0x6c,0x65, -0x63,0x74,0x6f,0x72,0x73,0xa2,0x6c,0x19,0x73,0x75,0x70,0x70,0x6c,0x65,0x6d,0x65, -0x6e,0x74,0xa3,0x7d,1,0x64,0x3c,0x72,0x19,0x74,0x69,0x63,0x61,0x6c,0x66,0x6f, -0x72,0x6d,0x73,0xa3,0x91,0x14,0x69,0x63,0x65,0x78,0x74,0xa2,0xaf,0x16,0x65,0x6e, -0x73,0x69,0x6f,0x6e,0x73,0xa3,0xaf,0x15,0x74,0x68,0x6b,0x75,0x71,0x69,0xa5,0x3f, -5,0x69,0x3f,0x69,0x5a,0x6f,0x8c,0x72,0x1c,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74, -0x61,0x6e,0x64,0x6d,0x61,0x70,0xa2,0xcf,0x16,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73, -0xa3,0xcf,2,0x62,0x34,0x66,0x3c,0x72,0x13,0x68,0x75,0x74,0x61,0xa3,0xfb,0x13, -0x65,0x74,0x61,0x6e,0x57,0x14,0x69,0x6e,0x61,0x67,0x68,0xa3,0x90,0x11,0x74,0x6f, -0xa5,0x3d,0x61,0x3e,0x65,0xa2,0xa0,0x68,0x10,0x61,1,0x61,0x24,0x69,0x53,0x11, -0x6e,0x61,0x3d,4,0x67,0x8e,0x69,0xa2,0x49,0x6b,0xa2,0x72,0x6d,0xa2,0x74,0x6e, -0x10,0x67,1,0x73,0x68,0x75,0x10,0x74,0xa4,0x10,1,0x63,0x40,0x73,0x11,0x75, -0x70,0xa4,0x33,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa5,0x33,0x18,0x6f,0x6d, -0x70,0x6f,0x6e,0x65,0x6e,0x74,0x73,0xa5,0x11,0x10,0x61,0xa5,0x3c,2,0x61,0x2a, -0x62,0x32,0x73,0xa3,0x60,0x12,0x6c,0x6f,0x67,0xa3,0x62,0x13,0x61,0x6e,0x77,0x61, -0xa3,0x65,3,0x6c,0x52,0x74,0x56,0x76,0x5e,0x78,0x16,0x75,0x61,0x6e,0x6a,0x69, -0x6e,0x67,0xa2,0x7c,0x16,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0x7c,0x10,0x65, -0xa3,0x70,0x12,0x68,0x61,0x6d,0xa3,0xae,0x12,0x69,0x65,0x74,0xa3,0xb7,0x11,0x72, -0x69,0xa3,0xdc,0x11,0x69,0x6c,0x48,0x12,0x73,0x75,0x70,0xa4,0x2b,0x16,0x70,0x6c, -0x65,0x6d,0x65,0x6e,0x74,0xa5,0x2b,0x13,0x6c,0x75,0x67,0x75,0x4b,2,0x63,0x8c, -0x67,0xa2,0x41,0x6e,0x1f,0x69,0x66,0x69,0x65,0x64,0x63,0x61,0x6e,0x61,0x64,0x69, -0x61,0x6e,0x61,0x62,0x6f,0x1f,0x72,0x69,0x67,0x69,0x6e,0x61,0x6c,0x73,0x79,0x6c, -0x6c,0x61,0x62,0x69,0x63,0x73,0x62,0x17,0x65,0x78,0x74,0x65,0x6e,0x64,0x65,0x64, -0xa2,0xad,0x10,0x61,0xa5,0x3e,0x11,0x61,0x73,0x62,0x12,0x65,0x78,0x74,0xa2,0xad, -0x10,0x61,0xa5,0x3e,0x15,0x61,0x72,0x69,0x74,0x69,0x63,0xa3,0x78,0x70,0xc3,0x4b, -0x70,0xa6,0x61,0x72,0xa8,0x1d,0x73,7,0x6f,0xc1,0xbe,0x6f,0xa2,0x69,0x70,0xa2, -0x85,0x75,0xa2,0xa4,0x79,2,0x6c,0x50,0x6d,0x62,0x72,0x12,0x69,0x61,0x63,0x3a, -0x12,0x73,0x75,0x70,0xa4,0x17,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa5,0x17, -0x17,0x6f,0x74,0x69,0x6e,0x61,0x67,0x72,0x69,0xa3,0x8f,0x13,0x62,0x6f,0x6c,0x73, -1,0x61,0x4c,0x66,0x10,0x6f,0x1f,0x72,0x6c,0x65,0x67,0x61,0x63,0x79,0x63,0x6f, -0x6d,0x70,0x75,0x74,0x69,0x6e,0x67,0xa5,0x32,0x1f,0x6e,0x64,0x70,0x69,0x63,0x74, -0x6f,0x67,0x72,0x61,0x70,0x68,0x73,0x65,0x78,0x74,1,0x61,0xa5,0x2a,0x65,0x14, -0x6e,0x64,0x65,0x64,0x61,0xa5,0x2a,2,0x67,0x34,0x72,0x3e,0x79,0x13,0x6f,0x6d, -0x62,0x6f,0xa5,0x16,0x13,0x64,0x69,0x61,0x6e,0xa5,0x23,0x17,0x61,0x73,0x6f,0x6d, -0x70,0x65,0x6e,0x67,0xa3,0xda,1,0x61,0x32,0x65,0x14,0x63,0x69,0x61,0x6c,0x73, -0xa3,0x56,0x12,0x63,0x69,0x6e,0x1f,0x67,0x6d,0x6f,0x64,0x69,0x66,0x69,0x65,0x72, -0x6c,0x65,0x74,0x74,0x65,0x72,0x73,0x2d,2,0x6e,0x48,0x70,0x76,0x74,0x1d,0x74, -0x6f,0x6e,0x73,0x69,0x67,0x6e,0x77,0x72,0x69,0x74,0x69,0x6e,0x67,0xa5,6,0x15, -0x64,0x61,0x6e,0x65,0x73,0x65,0xa2,0x9b,0x12,0x73,0x75,0x70,0xa2,0xdb,0x16,0x70, -0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0xdb,4,0x61,0xa2,0xa8,0x65,0x5c,0x6d,0x9e, -0x70,0xa2,0x4b,0x73,0x13,0x79,0x6d,0x62,0x6f,0x1f,0x6c,0x73,0x61,0x6e,0x64,0x70, -0x69,0x63,0x74,0x6f,0x67,0x72,0x61,0x70,0x68,0x73,0xa5,5,0x10,0x72,1,0x61, -0x4e,0x73,0x12,0x63,0x72,0x69,0x1f,0x70,0x74,0x73,0x61,0x6e,0x64,0x73,0x75,0x62, -0x73,0x63,0x72,0x69,0x70,0x74,0x73,0x73,0x14,0x6e,0x64,0x73,0x75,0x62,0x73,0x1b, -0x61,0x74,0x68,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x73,0xa3,0x6a,1,0x6c, -0x40,0x75,1,0x61,0x6e,0x6e,0x17,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xa3, -0x8e,0x15,0x65,0x6d,0x65,0x6e,0x74,0x61,1,0x6c,0x50,0x72,0x1e,0x79,0x70,0x72, -0x69,0x76,0x61,0x74,0x65,0x75,0x73,0x65,0x61,0x72,0x65,0x61,1,0x61,0xa3,0x6d, -0x62,0xa3,0x6e,3,0x61,0x5c,0x6d,0x78,0x70,0xa2,0x41,0x73,0x13,0x79,0x6d,0x62, -0x6f,0x1f,0x6c,0x73,0x61,0x6e,0x64,0x70,0x69,0x63,0x74,0x6f,0x67,0x72,0x61,0x70, -0x68,0x73,0xa5,5,0x14,0x72,0x72,0x6f,0x77,0x73,2,0x61,0xa3,0x67,0x62,0xa3, -0x68,0x63,0xa3,0xfa,0x13,0x61,0x74,0x68,0x65,0x1f,0x6d,0x61,0x74,0x69,0x63,0x61, -0x6c,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x73,0xa3,0x6a,0x19,0x75,0x6e,0x63, -0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xa3,0x8e,0x61,0x88,0x68,0xa2,0x48,0x69,0xa2, -0x71,0x6d,0x12,0x61,0x6c,0x6c,1,0x66,0x46,0x6b,0x15,0x61,0x6e,0x61,0x65,0x78, -0x74,0xa4,0x29,0x15,0x65,0x6e,0x73,0x69,0x6f,0x6e,0xa5,0x29,0x12,0x6f,0x72,0x6d, -1,0x73,0xa3,0x54,0x76,0x16,0x61,0x72,0x69,0x61,0x6e,0x74,0x73,0xa3,0x54,1, -0x6d,0x36,0x75,0x16,0x72,0x61,0x73,0x68,0x74,0x72,0x61,0xa3,0xa1,0x15,0x61,0x72, -0x69,0x74,0x61,0x6e,0xa3,0xac,1,0x61,0x52,0x6f,0x13,0x72,0x74,0x68,0x61,0x1f, -0x6e,0x64,0x66,0x6f,0x72,0x6d,0x61,0x74,0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x73, -0xa3,0xf7,1,0x72,0x2e,0x76,0x12,0x69,0x61,0x6e,0xa3,0x79,0x12,0x61,0x64,0x61, -0xa3,0xd9,1,0x64,0x50,0x6e,0x13,0x68,0x61,0x6c,0x61,0x50,0x1d,0x61,0x72,0x63, -0x68,0x61,0x69,0x63,0x6e,0x75,0x6d,0x62,0x65,0x72,0x73,0xa3,0xf9,0x13,0x64,0x68, -0x61,0x6d,0xa3,0xf8,5,0x72,0x35,0x72,0x44,0x73,0x64,0x75,1,0x61,0xa3,0x4e, -0x6e,0x17,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x71,0x17,0x69,0x76,0x61,0x74, -0x65,0x75,0x73,0x65,0xa2,0x4e,0x13,0x61,0x72,0x65,0x61,0xa3,0x4e,0x1b,0x61,0x6c, -0x74,0x65,0x72,0x70,0x61,0x68,0x6c,0x61,0x76,0x69,0xa3,0xf6,0x61,0x40,0x68,0x82, -0x6c,0x19,0x61,0x79,0x69,0x6e,0x67,0x63,0x61,0x72,0x64,0x73,0xa3,0xcc,2,0x68, -0x38,0x6c,0x4a,0x75,0x15,0x63,0x69,0x6e,0x68,0x61,0x75,0xa3,0xf5,0x17,0x61,0x77, -0x68,0x68,0x6d,0x6f,0x6e,0x67,0xa3,0xf3,0x15,0x6d,0x79,0x72,0x65,0x6e,0x65,0xa3, -0xf4,1,0x61,0x8e,0x6f,1,0x65,0x74,0x6e,0x16,0x65,0x74,0x69,0x63,0x65,0x78, -0x74,0xa2,0x72,1,0x65,0x2c,0x73,0x11,0x75,0x70,0xa3,0x8d,0x15,0x6e,0x73,0x69, -0x6f,0x6e,0x73,0xa2,0x72,0x19,0x73,0x75,0x70,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74, -0xa3,0x8d,0x15,0x6e,0x69,0x63,0x69,0x61,0x6e,0xa3,0x97,1,0x67,0x3e,0x69,0x13, -0x73,0x74,0x6f,0x73,0xa2,0xa6,0x13,0x64,0x69,0x73,0x63,0xa3,0xa6,0x12,0x73,0x70, -0x61,0xa3,0x96,1,0x65,0x5c,0x75,1,0x6d,0x2a,0x6e,0x11,0x69,0x63,0x67,0x10, -0x69,0xa2,0xc0,0x1d,0x6e,0x75,0x6d,0x65,0x72,0x61,0x6c,0x73,0x79,0x6d,0x62,0x6f, -0x6c,0x73,0xa3,0xc0,0x13,0x6a,0x61,0x6e,0x67,0xa3,0xa3,0x6d,0xa2,0xf0,0x6e,0xa8, -0x23,0x6f,6,0x70,0x63,0x70,0x56,0x72,0x8a,0x73,0xa2,0x4c,0x74,0x10,0x74,0x1f, -0x6f,0x6d,0x61,0x6e,0x73,0x69,0x79,0x61,0x71,0x6e,0x75,0x6d,0x62,0x65,0x72,0x73, -0xa5,0x28,0x18,0x74,0x69,0x63,0x61,0x6c,0x63,0x68,0x61,0x72,0x1f,0x61,0x63,0x74, -0x65,0x72,0x72,0x65,0x63,0x6f,0x67,0x6e,0x69,0x74,0x69,0x6f,0x6e,0x85,1,0x69, -0x46,0x6e,0x1e,0x61,0x6d,0x65,0x6e,0x74,0x61,0x6c,0x64,0x69,0x6e,0x67,0x62,0x61, -0x74,0x73,0xa3,0xf2,0x11,0x79,0x61,0x47,1,0x61,0x30,0x6d,0x13,0x61,0x6e,0x79, -0x61,0xa3,0x7a,0x11,0x67,0x65,0xa5,0xf,0x63,0xa2,0x7b,0x67,0xa2,0x7b,0x6c,1, -0x63,0xa2,0x6c,0x64,6,0x70,0x42,0x70,0x3a,0x73,0x5a,0x74,0x88,0x75,0x14,0x79, -0x67,0x68,0x75,0x72,0xa5,0x3b,0x11,0x65,0x72,1,0x6d,0x2e,0x73,0x12,0x69,0x61, -0x6e,0xa3,0x8c,0x11,0x69,0x63,0xa3,0xf1,0x10,0x6f,1,0x67,0x3a,0x75,0x18,0x74, -0x68,0x61,0x72,0x61,0x62,0x69,0x61,0x6e,0xa3,0xbb,0x13,0x64,0x69,0x61,0x6e,0xa5, -0x22,0x14,0x75,0x72,0x6b,0x69,0x63,0xa3,0xbf,0x68,0x42,0x69,0x54,0x6e,0x1a,0x6f, -0x72,0x74,0x68,0x61,0x72,0x61,0x62,0x69,0x61,0x6e,0xa3,0xf0,0x17,0x75,0x6e,0x67, -0x61,0x72,0x69,0x61,0x6e,0xa5,4,0x14,0x74,0x61,0x6c,0x69,0x63,0xa3,0x58,0x13, -0x68,0x69,0x6b,0x69,0xa3,0x9d,0x10,0x72,0x85,0x12,0x68,0x61,0x6d,0x65,6,0x6f, -0x86,0x6f,0x6c,0x72,0xa2,0x61,0x75,0xa2,0x62,0x79,0x14,0x61,0x6e,0x6d,0x61,0x72, -0x58,0x12,0x65,0x78,0x74,2,0x61,0xa3,0xb6,0x62,0xa3,0xee,0x65,0x13,0x6e,0x64, -0x65,0x64,1,0x61,0xa3,0xb6,0x62,0xa3,0xee,1,0x64,0x52,0x6e,0x15,0x67,0x6f, -0x6c,0x69,0x61,0x6e,0x6a,0x12,0x73,0x75,0x70,0xa4,0xd,0x16,0x70,0x6c,0x65,0x6d, -0x65,0x6e,0x74,0xa5,0xd,0x10,0x69,0xa2,0xec,0x13,0x66,0x69,0x65,0x72,1,0x6c, -0x3c,0x74,0x19,0x6f,0x6e,0x65,0x6c,0x65,0x74,0x74,0x65,0x72,0x73,0xa3,0x8a,0x15, -0x65,0x74,0x74,0x65,0x72,0x73,0x2d,0x10,0x6f,0xa3,0xed,1,0x6c,0x44,0x73,0x11, -0x69,0x63,0xa2,0x5c,0x18,0x61,0x6c,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0x5c, -0x13,0x74,0x61,0x6e,0x69,0xa5,3,0x61,0xa2,0x9b,0x65,0xa4,0x4c,0x69,1,0x61, -0xa2,0x8f,0x73,0x10,0x63,5,0x70,0x18,0x70,0xa2,0x71,0x73,0x36,0x74,0x17,0x65, -0x63,0x68,0x6e,0x69,0x63,0x61,0x6c,0x81,0x15,0x79,0x6d,0x62,0x6f,0x6c,0x73,0x8f, -0x61,0xa2,0x66,0x65,0x46,0x6d,0x19,0x61,0x74,0x68,0x73,0x79,0x6d,0x62,0x6f,0x6c, -0x73,1,0x61,0xa3,0x66,0x62,0xa3,0x69,0x17,0x6c,0x6c,0x61,0x6e,0x65,0x6f,0x75, -0x73,2,0x6d,0x3a,0x73,0x6c,0x74,0x17,0x65,0x63,0x68,0x6e,0x69,0x63,0x61,0x6c, -0x81,0x11,0x61,0x74,0x1f,0x68,0x65,0x6d,0x61,0x74,0x69,0x63,0x61,0x6c,0x73,0x79, -0x6d,0x62,0x6f,0x6c,0x73,1,0x61,0xa3,0x66,0x62,0xa3,0x69,0x15,0x79,0x6d,0x62, -0x6f,0x6c,0x73,0x8e,0x12,0x61,0x6e,0x64,1,0x61,0x3c,0x70,0x19,0x69,0x63,0x74, -0x6f,0x67,0x72,0x61,0x70,0x68,0x73,0xa3,0xcd,0x14,0x72,0x72,0x6f,0x77,0x73,0xa3, -0x73,0x10,0x6f,0xa3,0xd8,7,0x72,0x6f,0x72,0x44,0x73,0x4e,0x74,0x62,0x79,0x19, -0x61,0x6e,0x6e,0x75,0x6d,0x65,0x72,0x61,0x6c,0x73,0xa5,0x20,0x13,0x63,0x68,0x65, -0x6e,0xa5,0xc,0x18,0x61,0x72,0x61,0x6d,0x67,0x6f,0x6e,0x64,0x69,0xa5,0x14,0x10, -0x68,2,0x61,0x3a,0x65,0x4a,0x6f,0x17,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x73, -0x7f,0x16,0x6c,0x70,0x68,0x61,0x6e,0x75,0x6d,0xa3,0x5d,0x16,0x6d,0x61,0x74,0x69, -0x63,0x61,0x6c,1,0x61,0x36,0x6f,0x17,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x73, -0x7f,0x11,0x6c,0x70,0x1f,0x68,0x61,0x6e,0x75,0x6d,0x65,0x72,0x69,0x63,0x73,0x79, -0x6d,0x62,0x6f,0x6c,0x73,0xa3,0x5d,0x68,0x50,0x6b,0x7e,0x6c,0x88,0x6e,1,0x64, -0x34,0x69,0x15,0x63,0x68,0x61,0x65,0x61,0x6e,0xa3,0xea,0x12,0x61,0x69,0x63,0xa3, -0xc6,1,0x61,0x3e,0x6a,0x12,0x6f,0x6e,0x67,0xa2,0xaa,0x14,0x74,0x69,0x6c,0x65, -0x73,0xa3,0xaa,0x13,0x6a,0x61,0x6e,0x69,0xa3,0xe9,0x13,0x61,0x73,0x61,0x72,0xa5, -0x1f,0x15,0x61,0x79,0x61,0x6c,0x61,0x6d,0x4f,3,0x64,0x6c,0x65,0x7e,0x6e,0xa2, -0x47,0x72,0x14,0x6f,0x69,0x74,0x69,0x63,1,0x63,0x3c,0x68,0x19,0x69,0x65,0x72, -0x6f,0x67,0x6c,0x79,0x70,0x68,0x73,0xa3,0xd7,0x15,0x75,0x72,0x73,0x69,0x76,0x65, -0xa3,0xd6,0x17,0x65,0x66,0x61,0x69,0x64,0x72,0x69,0x6e,0xa5,0x21,0x17,0x74,0x65, -0x69,0x6d,0x61,0x79,0x65,0x6b,0xa2,0xb8,0x12,0x65,0x78,0x74,0xa2,0xd5,0x16,0x65, -0x6e,0x73,0x69,0x6f,0x6e,0x73,0xa3,0xd5,0x18,0x64,0x65,0x6b,0x69,0x6b,0x61,0x6b, -0x75,0x69,0xa3,0xeb,6,0x6b,0x3b,0x6b,0x56,0x6f,0x5a,0x75,0x64,0x79,0x11,0x69, -0x61,0x1f,0x6b,0x65,0x6e,0x67,0x70,0x75,0x61,0x63,0x68,0x75,0x65,0x68,0x6d,0x6f, -0x6e,0x67,0xa5,0x27,0x10,0x6f,0xa3,0x92,0x14,0x62,0x6c,0x6f,0x63,0x6b,0x21,1, -0x6d,0x2c,0x73,0x11,0x68,0x75,0xa5,0x15,0x17,0x62,0x65,0x72,0x66,0x6f,0x72,0x6d, -0x73,0x7b,0x61,0x44,0x62,0x21,0x65,0x10,0x77,1,0x61,0xa5,0xe,0x74,0x14,0x61, -0x69,0x6c,0x75,0x65,0xa3,0x8b,2,0x62,0x3c,0x67,0x4a,0x6e,0x17,0x64,0x69,0x6e, -0x61,0x67,0x61,0x72,0x69,0xa5,0x26,0x15,0x61,0x74,0x61,0x65,0x61,0x6e,0xa3,0xef, -0x16,0x6d,0x75,0x6e,0x64,0x61,0x72,0x69,0xa5,0x47,0x67,0xc4,0x5d,0x6a,0xc1,0xe4, -0x6a,0xa2,0xdf,0x6b,0xa2,0xf8,0x6c,4,0x61,0x54,0x65,0xa2,0x6b,0x69,0xa2,0x82, -0x6f,0xa2,0xc1,0x79,1,0x63,0x2e,0x64,0x12,0x69,0x61,0x6e,0xa3,0xa9,0x12,0x69, -0x61,0x6e,0xa3,0xa7,1,0x6f,0x55,0x74,0x11,0x69,0x6e,1,0x31,0x96,0x65,0x11, -0x78,0x74,6,0x64,0x21,0x64,0xa3,0x95,0x65,0x2c,0x66,0xa5,0x39,0x67,0xa5,0x3a, -0xa2,0xe7,0x13,0x6e,0x64,0x65,0x64,6,0x64,0xc,0x64,0xa3,0x95,0x65,0xa3,0xe7, -0x66,0xa5,0x39,0x67,0xa5,0x3a,0x61,0x2a,0x62,0x29,0x63,0xa3,0x94,0x26,0x18,0x64, -0x64,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x6d,0x24,0x12,0x73,0x75,0x70,0x24,0x16, -0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x25,1,0x70,0x42,0x74,0x1d,0x74,0x65,0x72, -0x6c,0x69,0x6b,0x65,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0x79,0x12,0x63,0x68,0x61, -0xa3,0x9c,2,0x6d,0x4e,0x6e,0x54,0x73,0x10,0x75,0xa2,0xb0,0x12,0x73,0x75,0x70, -0xa4,0x31,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa5,0x31,0x11,0x62,0x75,0xa3, -0x6f,0x12,0x65,0x61,0x72,1,0x61,0xa3,0xe8,0x62,1,0x69,0x38,0x73,0x17,0x79, -0x6c,0x6c,0x61,0x62,0x61,0x72,0x79,0xa3,0x75,0x17,0x64,0x65,0x6f,0x67,0x72,0x61, -0x6d,0x73,0xa3,0x76,0x1a,0x77,0x73,0x75,0x72,0x72,0x6f,0x67,0x61,0x74,0x65,0x73, -0xa3,0x4d,0x10,0x61,1,0x6d,0x32,0x76,0x14,0x61,0x6e,0x65,0x73,0x65,0xa3,0xb5, -0x10,0x6f,0x5c,0x12,0x65,0x78,0x74,1,0x61,0xa3,0xb4,0x62,0xa3,0xb9,1,0x61, -0xa2,0x43,0x68,4,0x61,0x40,0x69,0x50,0x6d,0x6e,0x6f,0x86,0x75,0x15,0x64,0x61, -0x77,0x61,0x64,0x69,0xa3,0xe6,0x16,0x72,0x6f,0x73,0x68,0x74,0x68,0x69,0xa3,0x89, -0x1d,0x74,0x61,0x6e,0x73,0x6d,0x61,0x6c,0x6c,0x73,0x63,0x72,0x69,0x70,0x74,0xa5, -0x30,0x11,0x65,0x72,0x68,0x16,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0x71,0x12, -0x6a,0x6b,0x69,0xa3,0xe5,5,0x74,0x35,0x74,0x34,0x77,0x7a,0x79,0x13,0x61,0x68, -0x6c,0x69,0xa3,0xa2,0x14,0x61,0x6b,0x61,0x6e,0x61,0x9e,1,0x65,0x4c,0x70,0x10, -0x68,0x1f,0x6f,0x6e,0x65,0x74,0x69,0x63,0x65,0x78,0x74,0x65,0x6e,0x73,0x69,0x6f, -0x6e,0x73,0xa3,0x6b,0x11,0x78,0x74,0xa3,0x6b,0x10,0x69,0xa5,0x46,0x69,0xa2,0x4e, -0x6b,0xa2,0x51,0x6e,3,0x61,0x34,0x62,0x84,0x67,0x8a,0x6e,0x12,0x61,0x64,0x61, -0x4d,1,0x65,0x40,0x73,0x11,0x75,0x70,0xa2,0xcb,0x16,0x70,0x6c,0x65,0x6d,0x65, -0x6e,0x74,0xa3,0xcb,0x11,0x78,0x74,2,0x61,0xa5,0x13,0x62,0xa5,0x38,0x65,0x13, -0x6e,0x64,0x65,0x64,1,0x61,0xa5,0x13,0x62,0xa5,0x38,0x11,0x75,0x6e,0xa3,0x42, -0x11,0x78,0x69,0x96,0x17,0x72,0x61,0x64,0x69,0x63,0x61,0x6c,0x73,0x97,0x12,0x74, -0x68,0x69,0xa3,0xc1,0x1c,0x74,0x6f,0x76,0x69,0x6b,0x6e,0x75,0x6d,0x65,0x72,0x61, -0x6c,0x73,0xa5,0x45,0x67,0xa2,0xb5,0x68,0xa4,0x84,0x69,3,0x64,0x4c,0x6d,0xa2, -0x55,0x6e,0xa2,0x62,0x70,0x13,0x61,0x65,0x78,0x74,0x2a,0x16,0x65,0x6e,0x73,0x69, -0x6f,0x6e,0x73,0x2b,1,0x63,0x99,0x65,0x17,0x6f,0x67,0x72,0x61,0x70,0x68,0x69, -0x63,1,0x64,0x56,0x73,0x15,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa4,0xb,0x1d,0x61, -0x6e,0x64,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xa5,0xb,0x13, -0x65,0x73,0x63,0x72,0x1f,0x69,0x70,0x74,0x69,0x6f,0x6e,0x63,0x68,0x61,0x72,0x61, -0x63,0x74,0x65,0x72,0x73,0x99,0x1c,0x70,0x65,0x72,0x69,0x61,0x6c,0x61,0x72,0x61, -0x6d,0x61,0x69,0x63,0xa3,0xba,1,0x64,0x62,0x73,0x1b,0x63,0x72,0x69,0x70,0x74, -0x69,0x6f,0x6e,0x61,0x6c,0x70,0x61,1,0x68,0x32,0x72,0x14,0x74,0x68,0x69,0x61, -0x6e,0xa3,0xbd,0x13,0x6c,0x61,0x76,0x69,0xa3,0xbe,0x11,0x69,0x63,1,0x6e,0x3e, -0x73,0x1a,0x69,0x79,0x61,0x71,0x6e,0x75,0x6d,0x62,0x65,0x72,0x73,0xa5,0x1e,0x19, -0x75,0x6d,0x62,0x65,0x72,0x66,0x6f,0x72,0x6d,0x73,0xa3,0xb2,4,0x65,0x74,0x6c, -0xa2,0x82,0x6f,0xa2,0x9a,0x72,0xa2,0x9e,0x75,2,0x6a,0x34,0x6e,0x3e,0x72,0x14, -0x6d,0x75,0x6b,0x68,0x69,0x43,0x14,0x61,0x72,0x61,0x74,0x69,0x45,0x18,0x6a,0x61, -0x6c,0x61,0x67,0x6f,0x6e,0x64,0x69,0xa5,0x1c,1,0x6e,0xa2,0x46,0x6f,1,0x6d, -0x6e,0x72,0x13,0x67,0x69,0x61,0x6e,0x5a,1,0x65,0x40,0x73,0x11,0x75,0x70,0xa2, -0x87,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0x87,0x11,0x78,0x74,0xa4,0x1b, -0x14,0x65,0x6e,0x64,0x65,0x64,0xa5,0x1b,0x1a,0x65,0x74,0x72,0x69,0x63,0x73,0x68, -0x61,0x70,0x65,0x73,0x8c,0x12,0x65,0x78,0x74,0xa2,0xe3,0x14,0x65,0x6e,0x64,0x65, -0x64,0xa3,0xe3,0x1e,0x65,0x72,0x61,0x6c,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74, -0x69,0x6f,0x6e,0x71,0x17,0x61,0x67,0x6f,0x6c,0x69,0x74,0x69,0x63,0xa2,0x88,0x12, -0x73,0x75,0x70,0xa4,0xa,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa5,0xa,0x13, -0x74,0x68,0x69,0x63,0xa3,0x59,1,0x61,0x5c,0x65,0x11,0x65,0x6b,0x30,1,0x61, -0x38,0x65,0x11,0x78,0x74,0x6e,0x14,0x65,0x6e,0x64,0x65,0x64,0x6f,0x17,0x6e,0x64, -0x63,0x6f,0x70,0x74,0x69,0x63,0x31,0x13,0x6e,0x74,0x68,0x61,0xa3,0xe4,2,0x61, -0xa2,0x48,0x65,0xa2,0xdf,0x69,1,0x67,0x30,0x72,0x14,0x61,0x67,0x61,0x6e,0x61, -0x9d,0x10,0x68,1,0x70,0x3a,0x73,0x18,0x75,0x72,0x72,0x6f,0x67,0x61,0x74,0x65, -0x73,0xa3,0x4b,1,0x72,0x3c,0x75,0x19,0x73,0x75,0x72,0x72,0x6f,0x67,0x61,0x74, -0x65,0x73,0xa3,0x4c,0x11,0x69,0x76,0x1f,0x61,0x74,0x65,0x75,0x73,0x65,0x73,0x75, -0x72,0x72,0x6f,0x67,0x61,0x74,0x65,0x73,0xa3,0x4c,2,0x6c,0x32,0x6e,0x9a,0x74, -0x12,0x72,0x61,0x6e,0xa5,2,0x10,0x66,2,0x61,0x58,0x6d,0x70,0x77,0x14,0x69, -0x64,0x74,0x68,0x61,0x1f,0x6e,0x64,0x66,0x75,0x6c,0x6c,0x77,0x69,0x64,0x74,0x68, -0x66,0x6f,0x72,0x6d,0x73,0xa3,0x57,0x1a,0x6e,0x64,0x66,0x75,0x6c,0x6c,0x66,0x6f, -0x72,0x6d,0x73,0xa3,0x57,0x13,0x61,0x72,0x6b,0x73,0xa3,0x52,2,0x67,0x34,0x69, -0xa2,0x45,0x75,0x12,0x6e,0x6f,0x6f,0xa3,0x63,0x11,0x75,0x6c,0xa2,0x4a,2,0x63, -0x3c,0x6a,0x5e,0x73,0x17,0x79,0x6c,0x6c,0x61,0x62,0x6c,0x65,0x73,0xa3,0x4a,0x1f, -0x6f,0x6d,0x70,0x61,0x74,0x69,0x62,0x69,0x6c,0x69,0x74,0x79,0x6a,0x61,0x6d,0x6f, -0xa3,0x41,0x12,0x61,0x6d,0x6f,0x5c,0x17,0x65,0x78,0x74,0x65,0x6e,0x64,0x65,0x64, -1,0x61,0xa3,0xb4,0x62,0xa3,0xb9,0x19,0x66,0x69,0x72,0x6f,0x68,0x69,0x6e,0x67, -0x79,0x61,0xa5,0x1d,0x13,0x62,0x72,0x65,0x77,0x37,0x61,0xa4,0xc,0x62,0xa6,0x59, -0x63,0xa8,0x2e,0x64,0xac,0xe3,0x65,5,0x6d,0xa9,0x6d,0x94,0x6e,0xa2,0x41,0x74, -0x15,0x68,0x69,0x6f,0x70,0x69,0x63,0x5e,1,0x65,0x40,0x73,0x11,0x75,0x70,0xa2, -0x86,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0x86,0x11,0x78,0x74,0xa2,0x85, -2,0x61,0xa3,0xc8,0x62,0xa5,0x37,0x65,0x13,0x6e,0x64,0x65,0x64,0xa2,0x85,1, -0x61,0xa3,0xc8,0x62,0xa5,0x37,0x16,0x6f,0x74,0x69,0x63,0x6f,0x6e,0x73,0xa3,0xce, -0x15,0x63,0x6c,0x6f,0x73,0x65,0x64,2,0x61,0x5a,0x63,0x9e,0x69,0x1c,0x64,0x65, -0x6f,0x67,0x72,0x61,0x70,0x68,0x69,0x63,0x73,0x75,0x70,0xa2,0xc4,0x16,0x70,0x6c, -0x65,0x6d,0x65,0x6e,0x74,0xa3,0xc4,0x16,0x6c,0x70,0x68,0x61,0x6e,0x75,0x6d,0x86, -1,0x65,0x2c,0x73,0x11,0x75,0x70,0xa3,0xc3,0x13,0x72,0x69,0x63,0x73,0x86,0x18, -0x75,0x70,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0xc3,0x11,0x6a,0x6b,0xa2,0x44, -0x1f,0x6c,0x65,0x74,0x74,0x65,0x72,0x73,0x61,0x6e,0x64,0x6d,0x6f,0x6e,0x74,0x68, -0x73,0xa3,0x44,0x61,0x4a,0x67,0x76,0x6c,1,0x62,0x30,0x79,0x13,0x6d,0x61,0x69, -0x63,0xa5,0x25,0x13,0x61,0x73,0x61,0x6e,0xa3,0xe2,0x13,0x72,0x6c,0x79,0x64,0x1f, -0x79,0x6e,0x61,0x73,0x74,0x69,0x63,0x63,0x75,0x6e,0x65,0x69,0x66,0x6f,0x72,0x6d, -0xa5,1,0x1f,0x79,0x70,0x74,0x69,0x61,0x6e,0x68,0x69,0x65,0x72,0x6f,0x67,0x6c, -0x79,0x70,0x68,1,0x66,0x26,0x73,0xa3,0xc2,0x1c,0x6f,0x72,0x6d,0x61,0x74,0x63, -0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x73,0xa5,0x24,7,0x6e,0xc0,0xf2,0x6e,0x3e,0x72, -0xa2,0x5d,0x73,0xa2,0xe5,0x76,0x14,0x65,0x73,0x74,0x61,0x6e,0xa3,0xbc,1,0x61, -0x92,0x63,0x13,0x69,0x65,0x6e,0x74,1,0x67,0x34,0x73,0x15,0x79,0x6d,0x62,0x6f, -0x6c,0x73,0xa3,0xa5,0x13,0x72,0x65,0x65,0x6b,1,0x6d,0x34,0x6e,0x15,0x75,0x6d, -0x62,0x65,0x72,0x73,0xa3,0x7f,0x13,0x75,0x73,0x69,0x63,0xa2,0x7e,0x19,0x61,0x6c, -0x6e,0x6f,0x74,0x61,0x74,0x69,0x6f,0x6e,0xa3,0x7e,0x10,0x74,0x1f,0x6f,0x6c,0x69, -0x61,0x6e,0x68,0x69,0x65,0x72,0x6f,0x67,0x6c,0x79,0x70,0x68,0x73,0xa3,0xfe,2, -0x61,0x32,0x6d,0xa2,0x7e,0x72,0x12,0x6f,0x77,0x73,0x7d,0x12,0x62,0x69,0x63,0x38, -3,0x65,0x4a,0x6d,0x80,0x70,0xa2,0x50,0x73,0x11,0x75,0x70,0xa2,0x80,0x16,0x70, -0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0x80,0x11,0x78,0x74,3,0x61,0xa3,0xd2,0x62, -0xa5,0x35,0x63,0xa5,0x41,0x65,0x13,0x6e,0x64,0x65,0x64,2,0x61,0xa3,0xd2,0x62, -0xa5,0x35,0x63,0xa5,0x41,0x12,0x61,0x74,0x68,0xa2,0xd3,0x18,0x65,0x6d,0x61,0x74, -0x69,0x63,0x61,0x6c,0x61,0x1f,0x6c,0x70,0x68,0x61,0x62,0x65,0x74,0x69,0x63,0x73, -0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0xd3,1,0x66,0x42,0x72,0x1e,0x65,0x73,0x65, -0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x66,0x6f,0x72,0x6d,0x73,1,0x61,0xa3,0x51, -0x62,0xa3,0x55,0x14,0x65,0x6e,0x69,0x61,0x6e,0x35,0x12,0x63,0x69,0x69,0x23,0x64, -0x9e,0x65,0xa2,0x42,0x68,0xa2,0x4d,0x6c,1,0x63,0x62,0x70,0x17,0x68,0x61,0x62, -0x65,0x74,0x69,0x63,0x70,1,0x66,0xa3,0x50,0x72,0x1e,0x65,0x73,0x65,0x6e,0x74, -0x61,0x74,0x69,0x6f,0x6e,0x66,0x6f,0x72,0x6d,0x73,0xa3,0x50,0x16,0x68,0x65,0x6d, -0x69,0x63,0x61,0x6c,0xa2,0xd0,0x16,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0xd0, -0x12,0x6c,0x61,0x6d,0xa5,7,0x1a,0x67,0x65,0x61,0x6e,0x6e,0x75,0x6d,0x62,0x65, -0x72,0x73,0xa3,0x77,0x11,0x6f,0x6d,0xa3,0xfd,7,0x6f,0x71,0x6f,0x64,0x72,0xa2, -0x41,0x75,0xa2,0x58,0x79,0x1b,0x7a,0x61,0x6e,0x74,0x69,0x6e,0x65,0x6d,0x75,0x73, -0x69,0x63,0xa2,0x5b,0x18,0x61,0x6c,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0x5b, -1,0x70,0x34,0x78,0x16,0x64,0x72,0x61,0x77,0x69,0x6e,0x67,0x89,0x14,0x6f,0x6d, -0x6f,0x66,0x6f,0xa0,0x12,0x65,0x78,0x74,0xa2,0x43,0x14,0x65,0x6e,0x64,0x65,0x64, -0xa3,0x43,0x10,0x61,1,0x68,0x40,0x69,0x12,0x6c,0x6c,0x65,0x92,0x17,0x70,0x61, -0x74,0x74,0x65,0x72,0x6e,0x73,0x93,0x11,0x6d,0x69,0xa3,0xc9,1,0x67,0x2c,0x68, -0x11,0x69,0x64,0xa3,0x64,0x14,0x69,0x6e,0x65,0x73,0x65,0xa3,0x81,0x61,0x48,0x65, -0xa2,0x4e,0x68,0xa2,0x52,0x6c,0x1a,0x6f,0x63,0x6b,0x65,0x6c,0x65,0x6d,0x65,0x6e, -0x74,0x73,0x8b,3,0x6c,0x34,0x6d,0x40,0x73,0x66,0x74,0x11,0x61,0x6b,0xa3,0xc7, -0x14,0x69,0x6e,0x65,0x73,0x65,0xa3,0x93,0x11,0x75,0x6d,0xa2,0xb1,0x12,0x73,0x75, -0x70,0xa2,0xca,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0xca,1,0x69,0x30, -0x73,0x13,0x61,0x76,0x61,0x68,0xa3,0xdd,0x15,0x63,0x6c,0x61,0x74,0x69,0x6e,0x23, -0x14,0x6e,0x67,0x61,0x6c,0x69,0x41,0x16,0x61,0x69,0x6b,0x73,0x75,0x6b,0x69,0xa5, -8,5,0x6f,0xc1,0x60,0x6f,0xa2,0x69,0x75,0xa4,0x24,0x79,1,0x70,0xa2,0x44, -0x72,0x14,0x69,0x6c,0x6c,0x69,0x63,0x32,1,0x65,0x4c,0x73,0x11,0x75,0x70,0xa2, -0x61,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa2,0x61,0x12,0x61,0x72,0x79,0xa3, -0x61,0x11,0x78,0x74,4,0x61,0xa3,0x9e,0x62,0xa3,0xa0,0x63,0xa5,9,0x64,0xa5, -0x43,0x65,0x13,0x6e,0x64,0x65,0x64,3,0x61,0xa3,0x9e,0x62,0xa3,0xa0,0x63,0xa5, -9,0x64,0xa5,0x43,0x10,0x72,1,0x69,0x34,0x6f,0x15,0x6d,0x69,0x6e,0x6f,0x61, -0x6e,0xa5,0x36,0x1a,0x6f,0x74,0x73,0x79,0x6c,0x6c,0x61,0x62,0x61,0x72,0x79,0xa3, -0x7b,3,0x6d,0x5a,0x6e,0xa2,0x95,0x70,0xa2,0xa0,0x75,0x17,0x6e,0x74,0x69,0x6e, -0x67,0x72,0x6f,0x64,0xa2,0x9a,0x17,0x6e,0x75,0x6d,0x65,0x72,0x61,0x6c,0x73,0xa3, -0x9a,2,0x62,0x3a,0x6d,0xa2,0x5f,0x70,0x15,0x61,0x74,0x6a,0x61,0x6d,0x6f,0xa3, -0x41,0x14,0x69,0x6e,0x69,0x6e,0x67,2,0x64,0x46,0x68,0x9e,0x6d,0x1d,0x61,0x72, -0x6b,0x73,0x66,0x6f,0x72,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0x77,0x1e,0x69,0x61, -0x63,0x72,0x69,0x74,0x69,0x63,0x61,0x6c,0x6d,0x61,0x72,0x6b,0x73,0x2e,2,0x65, -0x40,0x66,0xa6,0x4c,0x73,0x18,0x75,0x70,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3, -0x83,0x16,0x78,0x74,0x65,0x6e,0x64,0x65,0x64,0xa3,0xe0,0x17,0x61,0x6c,0x66,0x6d, -0x61,0x72,0x6b,0x73,0xa3,0x52,0x11,0x6f,0x6e,0x1f,0x69,0x6e,0x64,0x69,0x63,0x6e, -0x75,0x6d,0x62,0x65,0x72,0x66,0x6f,0x72,0x6d,0x73,0xa3,0xb2,0x1b,0x74,0x72,0x6f, -0x6c,0x70,0x69,0x63,0x74,0x75,0x72,0x65,0x73,0x83,0x12,0x74,0x69,0x63,0xa2,0x84, -0x1b,0x65,0x70,0x61,0x63,0x74,0x6e,0x75,0x6d,0x62,0x65,0x72,0x73,0xa3,0xdf,1, -0x6e,0x3e,0x72,0x1b,0x72,0x65,0x6e,0x63,0x79,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73, -0x75,0x15,0x65,0x69,0x66,0x6f,0x72,0x6d,0xa2,0x98,0x16,0x6e,0x75,0x6d,0x62,0x65, -0x72,0x73,0xa2,0x99,0x1d,0x61,0x6e,0x64,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74, -0x69,0x6f,0x6e,0xa3,0x99,0x61,0xa2,0xe4,0x68,0xa4,0xe,0x6a,0x10,0x6b,0xa2,0x47, -4,0x63,0x8c,0x65,0xa2,0x80,0x72,0xa2,0x9b,0x73,0xa2,0xad,0x75,0x1f,0x6e,0x69, -0x66,0x69,0x65,0x64,0x69,0x64,0x65,0x6f,0x67,0x72,0x61,0x70,0x68,0x73,0xa2,0x47, -0x18,0x65,0x78,0x74,0x65,0x6e,0x73,0x69,0x6f,0x6e,7,0x65,0x6b,0x65,0xa5,0, -0x66,0xa5,0x12,0x67,0xa5,0x2e,0x68,0xa5,0x42,0x14,0x6f,0x6d,0x70,0x61,0x74,0xa2, -0x45,1,0x66,0x96,0x69,1,0x62,0x44,0x64,0x17,0x65,0x6f,0x67,0x72,0x61,0x70, -0x68,0x73,0xa2,0x4f,0x12,0x73,0x75,0x70,0xa3,0x5f,0x14,0x69,0x6c,0x69,0x74,0x79, -0xa2,0x45,1,0x66,0x54,0x69,0x18,0x64,0x65,0x6f,0x67,0x72,0x61,0x70,0x68,0x73, -0xa2,0x4f,0x19,0x73,0x75,0x70,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0x5f,0x13, -0x6f,0x72,0x6d,0x73,0xa3,0x53,0x11,0x78,0x74,7,0x65,0xc,0x65,0xa5,0,0x66, -0xa5,0x12,0x67,0xa5,0x2e,0x68,0xa5,0x42,0x61,0xa3,0x46,0x62,0xa3,0x5e,0x63,0xa3, -0xc5,0x64,0xa3,0xd1,0x19,0x61,0x64,0x69,0x63,0x61,0x6c,0x73,0x73,0x75,0x70,0x94, -0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x95,1,0x74,0x50,0x79,0x14,0x6d,0x62, -0x6f,0x6c,0x73,0x9a,0x1d,0x61,0x6e,0x64,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74, -0x69,0x6f,0x6e,0x9b,0x14,0x72,0x6f,0x6b,0x65,0x73,0xa3,0x82,2,0x6e,0x48,0x72, -0x64,0x75,0x1d,0x63,0x61,0x73,0x69,0x61,0x6e,0x61,0x6c,0x62,0x61,0x6e,0x69,0x61, -0x6e,0xa3,0xde,0x1d,0x61,0x64,0x69,0x61,0x6e,0x73,0x79,0x6c,0x6c,0x61,0x62,0x69, -0x63,0x73,0x63,0x12,0x69,0x61,0x6e,0xa3,0xa8,2,0x61,0x3a,0x65,0x4c,0x6f,0x16, -0x72,0x61,0x73,0x6d,0x69,0x61,0x6e,0xa5,0x2d,1,0x6b,0x26,0x6d,0xa3,0xa4,0x11, -0x6d,0x61,0xa3,0xd4,1,0x72,0x38,0x73,0x17,0x73,0x73,0x79,0x6d,0x62,0x6f,0x6c, -0x73,0xa5,0x19,0x13,0x6f,0x6b,0x65,0x65,0x60,0x12,0x73,0x75,0x70,0xa2,0xff,0x16, -0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0xff,3,0x65,0x3e,0x69,0x8e,0x6f,0xa2, -0x71,0x75,0x15,0x70,0x6c,0x6f,0x79,0x61,0x6e,0xa3,0xe1,1,0x73,0x60,0x76,0x16, -0x61,0x6e,0x61,0x67,0x61,0x72,0x69,0x3e,0x12,0x65,0x78,0x74,0xa2,0xb3,1,0x61, -0xa5,0x44,0x65,0x13,0x6e,0x64,0x65,0x64,0xa2,0xb3,0x10,0x61,0xa5,0x44,0x13,0x65, -0x72,0x65,0x74,0xa3,0x5a,2,0x61,0x3a,0x6e,0x82,0x76,0x16,0x65,0x73,0x61,0x6b, -0x75,0x72,0x75,0xa5,0x2f,0x18,0x63,0x72,0x69,0x74,0x69,0x63,0x61,0x6c,0x73,0x2e, -2,0x65,0x30,0x66,0x36,0x73,0x11,0x75,0x70,0xa3,0x83,0x11,0x78,0x74,0xa3,0xe0, -0x18,0x6f,0x72,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0x77,0x14,0x67,0x62,0x61,0x74, -0x73,0x91,1,0x67,0x3e,0x6d,0x12,0x69,0x6e,0x6f,0xa2,0xab,0x14,0x74,0x69,0x6c, -0x65,0x73,0xa3,0xab,0x11,0x72,0x61,0xa5,0x1a,8,0x6d,0x5f,0x6d,0x3a,0x6e,0x48, -0x73,0x7a,0x76,0xa2,0x4b,0x77,0x12,0x69,0x64,0x65,0x43,0x11,0x65,0x64,0x32,0x12, -0x69,0x61,0x6c,0x33,2,0x61,0x40,0x62,0x37,0x6f,1,0x62,0x28,0x6e,0x10,0x65, -0x21,0x13,0x72,0x65,0x61,0x6b,0x37,0x10,0x72,0x34,0x12,0x72,0x6f,0x77,0x35,2, -0x6d,0x38,0x71,0x46,0x75,1,0x62,0x3d,0x70,0x3e,0x11,0x65,0x72,0x3f,1,0x61, -0x24,0x6c,0x39,0x11,0x6c,0x6c,0x39,1,0x72,0x3b,0x75,0x12,0x61,0x72,0x65,0x3b, -0x12,0x65,0x72,0x74,0x40,0x13,0x69,0x63,0x61,0x6c,0x41,0x63,0x58,0x65,0x92,0x66, -0x96,0x69,1,0x6e,0x36,0x73,0x10,0x6f,0x30,0x14,0x6c,0x61,0x74,0x65,0x64,0x31, -0x11,0x69,0x74,0x2e,0x12,0x69,0x61,0x6c,0x2f,2,0x61,0x36,0x69,0x48,0x6f,0x10, -0x6d,0x24,0x12,0x70,0x61,0x74,0x25,0x10,0x6e,0x22,0x15,0x6f,0x6e,0x69,0x63,0x61, -0x6c,0x23,0x13,0x72,0x63,0x6c,0x65,0x27,0x11,0x6e,0x63,0x27,2,0x69,0x3a,0x6f, -0x44,0x72,0x10,0x61,0x2c,0x14,0x63,0x74,0x69,0x6f,0x6e,0x2d,0x10,0x6e,0x28,0x11, -0x61,0x6c,0x29,0x11,0x6e,0x74,0x2b,4,0x61,0x3a,0x66,0x4c,0x68,0x5e,0x6e,0x70, -0x77,0x2a,0x12,0x69,0x64,0x65,0x2b,0x22,0x17,0x6d,0x62,0x69,0x67,0x75,0x6f,0x75, -0x73,0x23,0x26,0x17,0x75,0x6c,0x6c,0x77,0x69,0x64,0x74,0x68,0x27,0x24,0x17,0x61, -0x6c,0x66,0x77,0x69,0x64,0x74,0x68,0x25,0x20,1,0x61,0x30,0x65,0x14,0x75,0x74, -0x72,0x61,0x6c,0x21,0x28,0x13,0x72,0x72,0x6f,0x77,0x29,0xd,0x6e,0xc0,0xfb,0x73, -0x6d,0x73,0x3a,0x74,0x98,0x75,0xa2,0x49,0x7a,2,0x6c,0x3b,0x70,0x3d,0x73,0x39, -5,0x6f,0x28,0x6f,0x57,0x70,0x34,0x75,0x16,0x72,0x72,0x6f,0x67,0x61,0x74,0x65, -0x45,0x11,0x61,0x63,1,0x65,0x32,0x69,0x15,0x6e,0x67,0x6d,0x61,0x72,0x6b,0x31, -0x18,0x73,0x65,0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0x39,0x63,0x53,0x6b,0x55,0x6d, -0x51,0x1d,0x69,0x74,0x6c,0x65,0x63,0x61,0x73,0x65,0x6c,0x65,0x74,0x74,0x65,0x72, -0x27,1,0x6e,0x40,0x70,0x1c,0x70,0x65,0x72,0x63,0x61,0x73,0x65,0x6c,0x65,0x74, -0x74,0x65,0x72,0x23,0x17,0x61,0x73,0x73,0x69,0x67,0x6e,0x65,0x64,0x21,0x6e,0x8a, -0x6f,0xa2,0x47,0x70,8,0x66,0x14,0x66,0x5b,0x69,0x59,0x6f,0x4f,0x72,0x24,0x73, -0x49,0x17,0x69,0x76,0x61,0x74,0x65,0x75,0x73,0x65,0x43,0x61,0x2c,0x63,0x4d,0x64, -0x47,0x65,0x4b,0x1f,0x72,0x61,0x67,0x72,0x61,0x70,0x68,0x73,0x65,0x70,0x61,0x72, -0x61,0x74,0x6f,0x72,0x3d,2,0x64,0x33,0x6c,0x35,0x6f,0x36,0x1b,0x6e,0x73,0x70, -0x61,0x63,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0x2d,1,0x70,0x7c,0x74,0x12,0x68, -0x65,0x72,3,0x6c,0x38,0x6e,0x42,0x70,0x4c,0x73,0x14,0x79,0x6d,0x62,0x6f,0x6c, -0x57,0x14,0x65,0x74,0x74,0x65,0x72,0x2b,0x14,0x75,0x6d,0x62,0x65,0x72,0x37,0x19, -0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4f,0x1c,0x65,0x6e,0x70,0x75, -0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x49,0x66,0x9e,0x66,0x88,0x69,0xa2, -0x4b,0x6c,0xa2,0x5c,0x6d,4,0x61,0x60,0x63,0x31,0x65,0x2f,0x6e,0x2d,0x6f,0x15, -0x64,0x69,0x66,0x69,0x65,0x72,1,0x6c,0x30,0x73,0x14,0x79,0x6d,0x62,0x6f,0x6c, -0x55,0x14,0x65,0x74,0x74,0x65,0x72,0x29,0x17,0x74,0x68,0x73,0x79,0x6d,0x62,0x6f, -0x6c,0x51,1,0x69,0x2e,0x6f,0x13,0x72,0x6d,0x61,0x74,0x41,0x1d,0x6e,0x61,0x6c, -0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x5b,0x10,0x6e,0x1f,0x69, -0x74,0x69,0x61,0x6c,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x59, -6,0x6d,0x18,0x6d,0x29,0x6f,0x28,0x74,0x27,0x75,0x23,0x2a,0x1c,0x77,0x65,0x72, -0x63,0x61,0x73,0x65,0x6c,0x65,0x74,0x74,0x65,0x72,0x25,0x65,0x28,0x69,0x3c,0x6c, -0x25,0x19,0x74,0x74,0x65,0x72,0x6e,0x75,0x6d,0x62,0x65,0x72,0x35,0x1a,0x6e,0x65, -0x73,0x65,0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0x3b,0x63,0x44,0x64,0xa2,0x60,0x65, -0x1b,0x6e,0x63,0x6c,0x6f,0x73,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0x2f,6,0x6e, -0x39,0x6e,0x46,0x6f,0x4e,0x73,0x45,0x75,0x1b,0x72,0x72,0x65,0x6e,0x63,0x79,0x73, -0x79,0x6d,0x62,0x6f,0x6c,0x53,0x20,0x12,0x74,0x72,0x6c,0x3f,0x42,0x10,0x6e,1, -0x6e,0x2c,0x74,0x12,0x72,0x6f,0x6c,0x3f,0x1f,0x65,0x63,0x74,0x6f,0x72,0x70,0x75, -0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4d,0x63,0x3f,0x66,0x41,0x6c,0x1d, -0x6f,0x73,0x65,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4b,2, -0x61,0x30,0x65,0x4a,0x69,0x12,0x67,0x69,0x74,0x33,0x1c,0x73,0x68,0x70,0x75,0x6e, -0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x47,0x1a,0x63,0x69,0x6d,0x61,0x6c,0x6e, -0x75,0x6d,0x62,0x65,0x72,0x33,0,0x13,0x6e,0xc1,0xf,0x74,0x76,0x74,0x4c,0x76, -0x9a,0x77,0xa2,0x48,0x79,0xa2,0x49,0x7a,1,0x61,0x2c,0x68,0x12,0x61,0x69,0x6e, -0x8b,0x11,0x69,0x6e,0x85,2,0x61,0x36,0x65,0x3c,0x68,0x14,0x69,0x6e,0x79,0x65, -0x68,0xa3,0x66,1,0x68,0x71,0x77,0x73,1,0x68,0x28,0x74,0x10,0x68,0x77,0x16, -0x6d,0x61,0x72,0x62,0x75,0x74,0x61,0x74,0x13,0x67,0x6f,0x61,0x6c,0x3d,0x1a,0x65, -0x72,0x74,0x69,0x63,0x61,0x6c,0x74,0x61,0x69,0x6c,0xa3,0x67,0x11,0x61,0x77,0x79, -1,0x65,0x32,0x75,0x11,0x64,0x68,0x80,0x11,0x68,0x65,0x83,0x10,0x68,0x7a,1, -0x62,0x34,0x77,0x16,0x69,0x74,0x68,0x74,0x61,0x69,0x6c,0x7f,0x14,0x61,0x72,0x72, -0x65,0x65,0x7d,0x6e,0xa2,0x4c,0x70,0xa2,0x69,0x71,0xa2,0x69,0x72,0xa2,0x6f,0x73, -5,0x74,0x22,0x74,0x38,0x77,0x4c,0x79,0x16,0x72,0x69,0x61,0x63,0x77,0x61,0x77, -0x6f,0x18,0x72,0x61,0x69,0x67,0x68,0x74,0x77,0x61,0x77,0xa3,0x55,0x15,0x61,0x73, -0x68,0x6b,0x61,0x66,0x6d,0x61,0x2e,0x65,0x38,0x68,0x11,0x69,0x6e,0x6b,0x10,0x64, -0x62,0x11,0x68,0x65,0x65,1,0x65,0x2e,0x6d,0x13,0x6b,0x61,0x74,0x68,0x69,0x10, -0x6e,0x67,2,0x6f,0x2c,0x75,0x50,0x79,0x10,0x61,0x91,1,0x6a,0x28,0x6f,0x10, -0x6e,0x55,0x1a,0x6f,0x69,0x6e,0x69,0x6e,0x67,0x67,0x72,0x6f,0x75,0x70,0x21,0x10, -0x6e,0x57,0x10,0x65,0x59,0x10,0x61,1,0x66,0x5b,0x70,0x10,0x68,0x5d,1,0x65, -0x38,0x6f,0x18,0x68,0x69,0x6e,0x67,0x79,0x61,0x79,0x65,0x68,0x93,1,0x68,0x5f, -0x76,0x16,0x65,0x72,0x73,0x65,0x64,0x70,0x65,0x61,0x67,0xc1,0xc7,0x67,0xa4,0x52, -0x68,0xa4,0x59,0x6b,0xa4,0x99,0x6c,0xa4,0xb2,0x6d,2,0x61,0x2e,0x65,0xa4,0x3e, -0x69,0x10,0x6d,0x53,1,0x6c,0xa2,0xe7,0x6e,0x16,0x69,0x63,0x68,0x61,0x65,0x61, -0x6e,0,0x12,0x6e,0x76,0x73,0x51,0x73,0x3e,0x74,0x5c,0x77,0xa0,0x79,0xa2,0x42, -0x7a,0x13,0x61,0x79,0x69,0x6e,0xa3,0x54,0x10,0x61,1,0x64,0x2e,0x6d,0x12,0x65, -0x6b,0x68,0xa3,0x4c,0x11,0x68,0x65,0xa3,0x4b,3,0x61,0x38,0x65,0x3c,0x68,0x4a, -0x77,0x13,0x65,0x6e,0x74,0x79,0xa3,0x51,0x10,0x77,0xa3,0x4d,1,0x6e,0xa3,0x4e, -0x74,0x10,0x68,0xa3,0x4f,0x14,0x61,0x6d,0x65,0x64,0x68,0xa3,0x50,0x11,0x61,0x77, -0xa3,0x52,0x12,0x6f,0x64,0x68,0xa3,0x53,0x6e,0x3a,0x6f,0x40,0x70,0x46,0x71,0x4a, -0x72,0x12,0x65,0x73,0x68,0xa3,0x4a,0x11,0x75,0x6e,0xa3,0x46,0x11,0x6e,0x65,0xa3, -0x47,0x10,0x65,0xa3,0x48,0x12,0x6f,0x70,0x68,0xa3,0x49,0x67,0x33,0x67,0x38,0x68, -0x40,0x6b,0x5e,0x6c,0x66,0x6d,0x11,0x65,0x6d,0xa3,0x45,0x13,0x69,0x6d,0x65,0x6c, -0xa1,1,0x65,0x32,0x75,0x14,0x6e,0x64,0x72,0x65,0x64,0xa3,0x42,0x11,0x74,0x68, -0xa3,0x41,0x12,0x61,0x70,0x68,0xa3,0x43,0x14,0x61,0x6d,0x65,0x64,0x68,0xa3,0x44, -0x61,0x34,0x62,0x4a,0x64,0x50,0x66,0x12,0x69,0x76,0x65,0x9f,1,0x6c,0x2a,0x79, -0x11,0x69,0x6e,0x97,0x12,0x65,0x70,0x68,0x95,0x12,0x65,0x74,0x68,0x99,1,0x61, -0x30,0x68,0x14,0x61,0x6d,0x65,0x64,0x68,0x9d,0x13,0x6c,0x65,0x74,0x68,0x9b,0x15, -0x61,0x79,0x61,0x6c,0x61,0x6d,6,0x6e,0x2c,0x6e,0x34,0x72,0x5e,0x73,0x62,0x74, -0x11,0x74,0x61,0xa3,0x63,2,0x67,0x2e,0x6e,0x32,0x79,0x10,0x61,0xa3,0x60,0x10, -0x61,0xa3,0x5d,1,0x61,0xa3,0x5e,0x6e,0x10,0x61,0xa3,0x5f,0x10,0x61,0xa3,0x61, -0x11,0x73,0x61,0xa3,0x62,0x62,0x3c,0x6a,0x42,0x6c,0x10,0x6c,1,0x61,0xa3,0x5b, -0x6c,0x10,0x61,0xa3,0x5c,0x11,0x68,0x61,0xa3,0x59,0x10,0x61,0xa3,0x5a,0x11,0x65, -0x6d,0x51,0x10,0x61,1,0x66,0x37,0x6d,0x11,0x61,0x6c,0x39,1,0x61,0x40,0x65, -0x3e,1,0x68,0x28,0x74,0x10,0x68,0x45,0x40,0x13,0x67,0x6f,0x61,0x6c,0x43,2, -0x68,0x3b,0x6d,0x5c,0x6e,0x1a,0x69,0x66,0x69,0x72,0x6f,0x68,0x69,0x6e,0x67,0x79, -0x61,1,0x6b,0x2a,0x70,0x10,0x61,0xa3,0x65,0x15,0x69,0x6e,0x6e,0x61,0x79,0x61, -0xa3,0x64,0x1a,0x7a,0x61,0x6f,0x6e,0x68,0x65,0x68,0x67,0x6f,0x61,0x6c,0x3d,2, -0x61,0x3a,0x68,0x44,0x6e,0x17,0x6f,0x74,0x74,0x65,0x64,0x68,0x65,0x68,0x4b,1, -0x66,0x47,0x70,0x10,0x68,0x49,0x12,0x61,0x70,0x68,0x89,0x11,0x61,0x6d,0x4c,0x12, -0x61,0x64,0x68,0x4f,0x61,0x6e,0x62,0xa2,0x54,0x64,0xa2,0x70,0x65,0x31,0x66,2, -0x61,0x3e,0x65,0x4a,0x69,0x19,0x6e,0x61,0x6c,0x73,0x65,0x6d,0x6b,0x61,0x74,0x68, -0x35,0x15,0x72,0x73,0x69,0x79,0x65,0x68,0x8f,0x86,0x10,0x68,0x33,2,0x66,0x3c, -0x69,0x70,0x6c,1,0x61,0x28,0x65,0x10,0x66,0x27,0x11,0x70,0x68,0x25,0x14,0x72, -0x69,0x63,0x61,0x6e,2,0x66,0x30,0x6e,0x36,0x71,0x11,0x61,0x66,0xa3,0x58,0x11, -0x65,0x68,0xa3,0x56,0x12,0x6f,0x6f,0x6e,0xa3,0x57,0x10,0x6e,0x23,1,0x65,0x4a, -0x75,0x10,0x72,0x1f,0x75,0x73,0x68,0x61,0x73,0x6b,0x69,0x79,0x65,0x68,0x62,0x61, -0x72,0x72,0x65,0x65,0x8d,1,0x68,0x29,0x74,0x10,0x68,0x2b,0x11,0x61,0x6c,0x2c, -0x16,0x61,0x74,0x68,0x72,0x69,0x73,0x68,0x2f,7,0x6e,0x2e,0x6e,0x2c,0x72,0x3e, -0x74,0x56,0x75,0x21,0x18,0x6f,0x6e,0x6a,0x6f,0x69,0x6e,0x69,0x6e,0x67,0x21,0x28, -0x1a,0x69,0x67,0x68,0x74,0x6a,0x6f,0x69,0x6e,0x69,0x6e,0x67,0x29,0x2a,0x19,0x72, -0x61,0x6e,0x73,0x70,0x61,0x72,0x65,0x6e,0x74,0x2b,0x63,0x23,0x64,0x40,0x6a,0x56, -0x6c,0x26,0x19,0x65,0x66,0x74,0x6a,0x6f,0x69,0x6e,0x69,0x6e,0x67,0x27,0x24,0x19, -0x75,0x61,0x6c,0x6a,0x6f,0x69,0x6e,0x69,0x6e,0x67,0x25,0x19,0x6f,0x69,0x6e,0x63, -0x61,0x75,0x73,0x69,0x6e,0x67,0x23,0,0x13,0x6e,0xc0,0xd0,0x73,0x49,0x73,0x48, -0x75,0x78,0x77,0x84,0x78,0x9c,0x7a,0x10,0x77,0x58,1,0x6a,0x75,0x73,0x13,0x70, -0x61,0x63,0x65,0x59,4,0x61,0x51,0x67,0x53,0x70,0x28,0x75,0x30,0x79,0x57,0x54, -0x12,0x61,0x63,0x65,0x55,0x16,0x72,0x72,0x6f,0x67,0x61,0x74,0x65,0x53,0x15,0x6e, -0x6b,0x6e,0x6f,0x77,0x6e,0x21,1,0x6a,0x5d,0x6f,0x17,0x72,0x64,0x6a,0x6f,0x69, -0x6e,0x65,0x72,0x5d,0x10,0x78,0x21,0x6e,0x60,0x6f,0xa2,0x41,0x70,0xa2,0x50,0x71, -0xa2,0x6e,0x72,1,0x65,0x24,0x69,0x6f,0x1e,0x67,0x69,0x6f,0x6e,0x61,0x6c,0x69, -0x6e,0x64,0x69,0x63,0x61,0x74,0x6f,0x72,0x6f,4,0x65,0x3e,0x6c,0x5b,0x6f,0x46, -0x73,0x45,0x75,0x46,0x14,0x6d,0x65,0x72,0x69,0x63,0x47,0x15,0x78,0x74,0x6c,0x69, -0x6e,0x65,0x5b,0x17,0x6e,0x73,0x74,0x61,0x72,0x74,0x65,0x72,0x45,0x10,0x70,0x48, -0x1c,0x65,0x6e,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x49,1, -0x6f,0x3e,0x72,0x4c,0x1a,0x65,0x66,0x69,0x78,0x6e,0x75,0x6d,0x65,0x72,0x69,0x63, -0x4d,0x4a,0x1b,0x73,0x74,0x66,0x69,0x78,0x6e,0x75,0x6d,0x65,0x72,0x69,0x63,0x4b, -0x10,0x75,0x4e,0x16,0x6f,0x74,0x61,0x74,0x69,0x6f,0x6e,0x4f,0x68,0x7b,0x68,0x50, -0x69,0x86,0x6a,0xa2,0x61,0x6c,0xa2,0x65,0x6d,0x1c,0x61,0x6e,0x64,0x61,0x74,0x6f, -0x72,0x79,0x62,0x72,0x65,0x61,0x6b,0x2d,4,0x32,0x5f,0x33,0x61,0x65,0x34,0x6c, -0x6d,0x79,0x3a,0x13,0x70,0x68,0x65,0x6e,0x3b,0x19,0x62,0x72,0x65,0x77,0x6c,0x65, -0x74,0x74,0x65,0x72,0x6d,2,0x64,0x28,0x6e,0x3c,0x73,0x41,0x3c,0x18,0x65,0x6f, -0x67,0x72,0x61,0x70,0x68,0x69,0x63,0x3d,0x3e,1,0x66,0x3e,0x73,0x11,0x65,0x70, -1,0x61,0x22,0x65,0x14,0x72,0x61,0x62,0x6c,0x65,0x3f,0x18,0x69,0x78,0x6e,0x75, -0x6d,0x65,0x72,0x69,0x63,0x41,2,0x6c,0x63,0x74,0x65,0x76,0x67,1,0x66,0x43, -0x69,0x15,0x6e,0x65,0x66,0x65,0x65,0x64,0x43,0x61,0x40,0x62,0x70,0x63,0xa2,0x55, -0x65,0xa2,0xdb,0x67,0x10,0x6c,0x38,0x11,0x75,0x65,0x39,2,0x69,0x23,0x6c,0x34, -0x6d,0x16,0x62,0x69,0x67,0x75,0x6f,0x75,0x73,0x23,0x24,0x17,0x70,0x68,0x61,0x62, -0x65,0x74,0x69,0x63,0x25,4,0x32,0x27,0x61,0x29,0x62,0x2b,0x6b,0x2d,0x72,0x12, -0x65,0x61,0x6b,2,0x61,0x36,0x62,0x3e,0x73,0x15,0x79,0x6d,0x62,0x6f,0x6c,0x73, -0x57,0x13,0x66,0x74,0x65,0x72,0x29,1,0x65,0x2a,0x6f,0x11,0x74,0x68,0x27,0x13, -0x66,0x6f,0x72,0x65,0x2b,7,0x6d,0x51,0x6d,0x33,0x6f,0x28,0x70,0x69,0x72,0x35, -1,0x6d,0x76,0x6e,1,0x64,0x3c,0x74,0x1a,0x69,0x6e,0x67,0x65,0x6e,0x74,0x62, -0x72,0x65,0x61,0x6b,0x2f,0x15,0x69,0x74,0x69,0x6f,0x6e,0x61,0x1f,0x6c,0x6a,0x61, -0x70,0x61,0x6e,0x65,0x73,0x65,0x73,0x74,0x61,0x72,0x74,0x65,0x72,0x6b,1,0x62, -0x3a,0x70,0x19,0x6c,0x65,0x78,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x51,0x18,0x69, -0x6e,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0x33,0x61,0x6a,0x62,0x2f,0x6a,0x6b,0x6c, -0x30,0x13,0x6f,0x73,0x65,0x70,1,0x61,0x38,0x75,0x18,0x6e,0x63,0x74,0x75,0x61, -0x74,0x69,0x6f,0x6e,0x31,0x18,0x72,0x65,0x6e,0x74,0x68,0x65,0x73,0x69,0x73,0x69, -0x1b,0x72,0x72,0x69,0x61,0x67,0x65,0x72,0x65,0x74,0x75,0x72,0x6e,0x35,2,0x62, -0x3e,0x6d,0x46,0x78,0x36,0x18,0x63,0x6c,0x61,0x6d,0x61,0x74,0x69,0x6f,0x6e,0x37, -0x70,0x12,0x61,0x73,0x65,0x71,0x72,0x16,0x6f,0x64,0x69,0x66,0x69,0x65,0x72,0x73, -1,0x64,0x42,0x6e,1,0x6f,0x32,0x75,0x26,0x14,0x6d,0x65,0x72,0x69,0x63,0x27, -0x11,0x6e,0x65,0x21,1,0x65,0x2e,0x69,0x24,0x12,0x67,0x69,0x74,0x25,0x22,0x14, -0x63,0x69,0x6d,0x61,0x6c,0x23,0,0x18,0x6e,0xc4,0x6f,0x74,0xc1,0x91,0x77,0x96, -0x77,0xa2,0x4c,0x78,0xa2,0x70,0x79,0xa2,0x7a,0x7a,6,0x73,0x1e,0x73,0x34,0x78, -0x42,0x79,0x48,0x7a,0x11,0x7a,0x7a,0xa3,0x67,0x10,0x79,1,0x65,0xa3,0xae,0x6d, -0xa3,0x81,0x11,0x78,0x78,0xa3,0x66,0x11,0x79,0x79,0x21,0x61,0x30,0x69,0x58,0x6d, -0x11,0x74,0x68,0xa3,0x80,0x10,0x6e,1,0x61,0x26,0x62,0xa3,0xb1,0x1a,0x62,0x61, -0x7a,0x61,0x72,0x73,0x71,0x75,0x61,0x72,0x65,0xa3,0xb1,0x11,0x6e,0x68,0x23,2, -0x61,0x30,0x63,0x5a,0x6f,0x11,0x6c,0x65,0xa3,0x9b,1,0x6e,0x3c,0x72,0x10,0x61, -0xa2,0x92,0x15,0x6e,0x67,0x63,0x69,0x74,0x69,0xa3,0x92,0x12,0x63,0x68,0x6f,0xa3, -0xbc,0x11,0x68,0x6f,0xa3,0xbc,1,0x70,0x2c,0x73,0x11,0x75,0x78,0xa3,0x65,0x11, -0x65,0x6f,0x9b,1,0x65,0x2c,0x69,0x72,0x11,0x69,0x69,0x73,0x11,0x7a,0x69,0xa2, -0xc0,0x11,0x64,0x69,0xa3,0xc0,0x74,0x66,0x75,0xa2,0xde,0x76,1,0x61,0x48,0x69, -1,0x73,0x38,0x74,0x10,0x68,0xa2,0xc5,0x13,0x6b,0x75,0x71,0x69,0xa3,0xc5,0x10, -0x70,0xa3,0x64,0x10,0x69,0xa2,0x63,0x10,0x69,0xa3,0x63,7,0x68,0x3e,0x68,0x34, -0x69,0x48,0x6e,0x86,0x6f,0x11,0x74,0x6f,0xa3,0xc4,0x10,0x61,1,0x61,0x24,0x69, -0x6d,0x6a,0x11,0x6e,0x61,0x6b,2,0x62,0x3a,0x66,0x4a,0x72,0x10,0x68,0xa2,0x9e, -0x12,0x75,0x74,0x61,0xa3,0x9e,1,0x65,0x24,0x74,0x6f,0x12,0x74,0x61,0x6e,0x6f, -0x14,0x69,0x6e,0x61,0x67,0x68,0x99,0x11,0x73,0x61,0xa3,0xc3,0x61,0x36,0x65,0xa2, -0x65,0x66,0xa2,0x71,0x67,0x11,0x6c,0x67,0x75,6,0x6c,0x28,0x6c,0x32,0x6d,0x38, -0x6e,0x44,0x76,0x10,0x74,0xa3,0x7f,1,0x65,0x89,0x75,0x97,1,0x69,0x24,0x6c, -0x67,0x10,0x6c,0x67,0x10,0x67,0xa2,0x9a,1,0x73,0x2a,0x75,0x10,0x74,0xa3,0x9a, -0x10,0x61,0xa3,0xc3,0x67,0x36,0x69,0x52,0x6b,0x10,0x72,0xa2,0x99,0x10,0x69,0xa3, -0x99,1,0x61,0x30,0x62,0x7a,0x13,0x61,0x6e,0x77,0x61,0x7b,0x12,0x6c,0x6f,0x67, -0x75,2,0x6c,0x32,0x74,0x34,0x76,0x12,0x69,0x65,0x74,0xa3,0x7f,0x10,0x65,0x89, -0x12,0x68,0x61,0x6d,0xa3,0x6a,1,0x6c,0x2a,0x6e,0x10,0x67,0xa3,0x62,0x10,0x75, -0x68,0x11,0x67,0x75,0x69,0x11,0x6e,0x67,0x99,1,0x67,0x32,0x6e,0x14,0x6b,0x6e, -0x6f,0x77,0x6e,0xa3,0x67,0x11,0x61,0x72,0x8a,0x13,0x69,0x74,0x69,0x63,0x8b,0x71, -0xc1,0x13,0x71,0xa2,0xde,0x72,0xa2,0xe3,0x73,6,0x69,0x8a,0x69,0x72,0x6f,0xa2, -0x4c,0x75,0xa2,0x75,0x79,1,0x6c,0x46,0x72,4,0x63,0x65,0x65,0xa3,0x5f,0x69, -0x2c,0x6a,0xa3,0x60,0x6e,0xa3,0x61,0x11,0x61,0x63,0x65,0x10,0x6f,0x94,0x16,0x74, -0x69,0x6e,0x61,0x67,0x72,0x69,0x95,2,0x64,0x3c,0x67,0x4c,0x6e,1,0x64,0xa3, -0x91,0x68,0x62,0x12,0x61,0x6c,0x61,0x63,0x10,0x64,0xa2,0xa6,0x12,0x68,0x61,0x6d, -0xa3,0xa6,0x17,0x6e,0x77,0x72,0x69,0x74,0x69,0x6e,0x67,0xa3,0x70,2,0x67,0x3a, -0x72,0x52,0x79,0x10,0x6f,0xa2,0xb0,0x12,0x6d,0x62,0x6f,0xa3,0xb0,1,0x64,0x26, -0x6f,0xa3,0xb8,0xa2,0xb7,0x12,0x69,0x61,0x6e,0xa3,0xb7,0x10,0x61,0xa2,0x98,0x16, -0x73,0x6f,0x6d,0x70,0x65,0x6e,0x67,0xa3,0x98,0x11,0x6e,0x64,0xa2,0x71,0x14,0x61, -0x6e,0x65,0x73,0x65,0xa3,0x71,0x61,0x5c,0x67,0xa2,0x43,0x68,1,0x61,0x2a,0x72, -0x10,0x64,0xa3,0x97,2,0x72,0x28,0x76,0x30,0x77,0x87,0x12,0x61,0x64,0x61,0xa3, -0x97,0x12,0x69,0x61,0x6e,0x87,2,0x6d,0x40,0x72,0x58,0x75,0x10,0x72,0xa2,0x6f, -0x15,0x61,0x73,0x68,0x74,0x72,0x61,0xa3,0x6f,1,0x61,0x26,0x72,0xa3,0x7e,0x14, -0x72,0x69,0x74,0x61,0x6e,0xa3,0x7e,1,0x61,0xa3,0x5e,0x62,0xa3,0x85,0x11,0x6e, -0x77,0xa3,0x70,0x11,0x61,0x61,1,0x63,0x2f,0x69,0x23,3,0x65,0x3e,0x6a,0x48, -0x6f,0x4e,0x75,0x10,0x6e,1,0x69,0x24,0x72,0x61,0x10,0x63,0x61,0x13,0x6a,0x61, -0x6e,0x67,0xa3,0x6e,0x11,0x6e,0x67,0xa3,0x6e,1,0x68,0x2a,0x72,0x10,0x6f,0xa3, -0x5d,0x10,0x67,0xa3,0xb6,0x6e,0xa2,0x83,0x6f,0xa4,1,0x70,5,0x6c,0x1e,0x6c, -0x44,0x72,0x4a,0x73,0x1b,0x61,0x6c,0x74,0x65,0x72,0x70,0x61,0x68,0x6c,0x61,0x76, -0x69,0xa3,0x7b,0x11,0x72,0x64,0xa3,0x5c,0x11,0x74,0x69,0xa3,0x7d,0x61,0x7c,0x65, -0xa2,0x54,0x68,3,0x61,0x3e,0x6c,0x4e,0x6e,0x5e,0x6f,0x16,0x65,0x6e,0x69,0x63, -0x69,0x61,0x6e,0xa3,0x5b,0x10,0x67,0xa2,0x5a,0x12,0x73,0x70,0x61,0xa3,0x5a,2, -0x69,0xa3,0x7a,0x70,0xa3,0x7b,0x76,0xa3,0x7c,0x10,0x78,0xa3,0x5b,2,0x68,0x3e, -0x6c,0x50,0x75,0x10,0x63,0xa2,0xa5,0x14,0x69,0x6e,0x68,0x61,0x75,0xa3,0xa5,0x17, -0x61,0x77,0x68,0x68,0x6d,0x6f,0x6e,0x67,0xa3,0x4b,0x10,0x6d,0xa2,0x90,0x14,0x79, -0x72,0x65,0x6e,0x65,0xa3,0x90,0x11,0x72,0x6d,0xa3,0x59,6,0x6b,0x36,0x6b,0x56, -0x73,0x6e,0x75,0x74,0x79,0x11,0x69,0x61,0x1f,0x6b,0x65,0x6e,0x67,0x70,0x75,0x61, -0x63,0x68,0x75,0x65,0x68,0x6d,0x6f,0x6e,0x67,0xa3,0xba,1,0x67,0x2e,0x6f,0xa2, -0x57,0x10,0x6f,0xa3,0x57,0x10,0x62,0xa3,0x84,0x11,0x68,0x75,0xa3,0x96,0x12,0x73, -0x68,0x75,0xa3,0x96,0x61,0x42,0x62,0x9e,0x65,0x10,0x77,1,0x61,0xa3,0xaa,0x74, -0x14,0x61,0x69,0x6c,0x75,0x65,0x97,3,0x62,0x32,0x67,0x40,0x6e,0x56,0x72,0x10, -0x62,0xa3,0x8e,0x15,0x61,0x74,0x61,0x65,0x61,0x6e,0xa3,0x8f,0x10,0x6d,0xa2,0xc7, -0x15,0x75,0x6e,0x64,0x61,0x72,0x69,0xa3,0xc7,0x10,0x64,0xa2,0xbb,0x16,0x69,0x6e, -0x61,0x67,0x61,0x72,0x69,0xa3,0xbb,0x11,0x61,0x74,0xa3,0x8f,4,0x67,0x3c,0x6c, -0x4e,0x72,0xa2,0x8e,0x73,0xa2,0x9c,0x75,0x11,0x67,0x72,0xa3,0xc2,1,0x61,0x2a, -0x68,0x11,0x61,0x6d,0x5b,0x10,0x6d,0x5b,1,0x63,0xa2,0x6a,0x64,6,0x70,0x41, -0x70,0x3a,0x73,0x58,0x74,0x86,0x75,0x14,0x79,0x67,0x68,0x75,0x72,0xa3,0xc2,0x11, -0x65,0x72,1,0x6d,0x2c,0x73,0x12,0x69,0x61,0x6e,0x9b,0x11,0x69,0x63,0xa3,0x59, -0x10,0x6f,1,0x67,0x3a,0x75,0x18,0x74,0x68,0x61,0x72,0x61,0x62,0x69,0x61,0x6e, -0xa3,0x85,0x13,0x64,0x69,0x61,0x6e,0xa3,0xb8,0x14,0x75,0x72,0x6b,0x69,0x63,0xa3, -0x58,0x68,0x42,0x69,0x54,0x6e,0x1a,0x6f,0x72,0x74,0x68,0x61,0x72,0x61,0x62,0x69, -0x61,0x6e,0xa3,0x8e,0x17,0x75,0x6e,0x67,0x61,0x72,0x69,0x61,0x6e,0xa3,0x4c,0x14, -0x74,0x61,0x6c,0x69,0x63,0x5d,1,0x68,0x26,0x6b,0xa3,0x6d,0x12,0x69,0x6b,0x69, -0xa3,0x6d,2,0x69,0x2c,0x6b,0x30,0x79,0x10,0x61,0x5f,0x11,0x79,0x61,0x5f,0x10, -0x68,0xa3,0x58,2,0x61,0x36,0x67,0x3c,0x6d,0x10,0x61,0x84,0x12,0x6e,0x79,0x61, -0x85,0x11,0x67,0x65,0xa3,0xab,0x10,0x65,0xa3,0xab,0x68,0xc3,0x15,0x6b,0xc2,0x2c, -0x6b,0xa4,0x17,0x6c,0xa4,0xba,0x6d,8,0x6f,0x46,0x6f,0x48,0x72,0x74,0x74,0x80, -0x75,0x86,0x79,1,0x61,0x28,0x6d,0x10,0x72,0x59,0x13,0x6e,0x6d,0x61,0x72,0x59, -2,0x64,0x2e,0x6e,0x32,0x6f,0x10,0x6e,0xa3,0x72,0x10,0x69,0xa3,0xa3,0x10,0x67, -0x56,0x14,0x6f,0x6c,0x69,0x61,0x6e,0x57,0x10,0x6f,0xa2,0x95,0x10,0x6f,0xa3,0x95, -0x11,0x65,0x69,0xa3,0x73,0x11,0x6c,0x74,0xa2,0xa4,0x12,0x61,0x6e,0x69,0xa3,0xa4, -0x61,0x36,0x65,0xa2,0x67,0x69,0xa2,0xbd,0x6c,0x11,0x79,0x6d,0x55,6,0x6e,0x38, -0x6e,0x32,0x72,0x5c,0x73,0x6c,0x79,0x10,0x61,0xa3,0x55,1,0x64,0x38,0x69,0xa2, -0x79,0x15,0x63,0x68,0x61,0x65,0x61,0x6e,0xa3,0x79,0xa2,0x54,0x12,0x61,0x69,0x63, -0xa3,0x54,0x10,0x63,0xa2,0xa9,0x12,0x68,0x65,0x6e,0xa3,0xa9,0x18,0x61,0x72,0x61, -0x6d,0x67,0x6f,0x6e,0x64,0x69,0xa3,0xaf,0x68,0x36,0x6b,0x4c,0x6c,0x15,0x61,0x79, -0x61,0x6c,0x61,0x6d,0x55,1,0x61,0x26,0x6a,0xa3,0xa0,0x13,0x6a,0x61,0x6e,0x69, -0xa3,0xa0,0x10,0x61,0xa2,0xb4,0x12,0x73,0x61,0x72,0xa3,0xb4,3,0x64,0x78,0x65, -0x94,0x6e,0xa2,0x42,0x72,1,0x63,0xa3,0x8d,0x6f,0xa2,0x56,0x13,0x69,0x74,0x69, -0x63,1,0x63,0x3c,0x68,0x19,0x69,0x65,0x72,0x6f,0x67,0x6c,0x79,0x70,0x68,0x73, -0xa3,0x56,0x15,0x75,0x72,0x73,0x69,0x76,0x65,0xa3,0x8d,1,0x65,0x26,0x66,0xa3, -0xb5,0x16,0x66,0x61,0x69,0x64,0x72,0x69,0x6e,0xa3,0xb5,0x17,0x74,0x65,0x69,0x6d, -0x61,0x79,0x65,0x6b,0xa3,0x73,0x10,0x64,0xa2,0x8c,0x17,0x65,0x6b,0x69,0x6b,0x61, -0x6b,0x75,0x69,0xa3,0x8c,0x11,0x61,0x6f,0xa3,0x5c,6,0x6e,0x1a,0x6e,0x34,0x6f, -0x38,0x70,0x3e,0x74,0x11,0x68,0x69,0xa3,0x78,0x11,0x64,0x61,0x4b,0x11,0x72,0x65, -0xa3,0x77,0x11,0x65,0x6c,0xa3,0x8a,0x61,0x32,0x68,0xa2,0x44,0x69,0x11,0x74,0x73, -0xa3,0xbf,5,0x74,0x23,0x74,0x34,0x77,0x56,0x79,0x13,0x61,0x68,0x6c,0x69,0xa3, -0x4f,0x14,0x61,0x6b,0x61,0x6e,0x61,0x4c,0x19,0x6f,0x72,0x68,0x69,0x72,0x61,0x67, -0x61,0x6e,0x61,0x8d,0x10,0x69,0xa3,0xc6,0x69,0x38,0x6c,0x40,0x6e,1,0x61,0x4d, -0x6e,0x12,0x61,0x64,0x61,0x4b,0x12,0x74,0x68,0x69,0xa3,0x78,0x10,0x69,0xa3,0x4f, -4,0x61,0x40,0x69,0x52,0x6d,0x70,0x6f,0x7c,0x75,0x15,0x64,0x61,0x77,0x61,0x64, -0x69,0xa3,0x91,0x10,0x72,0x92,0x15,0x6f,0x73,0x68,0x74,0x68,0x69,0x93,0x1d,0x74, -0x61,0x6e,0x73,0x6d,0x61,0x6c,0x6c,0x73,0x63,0x72,0x69,0x70,0x74,0xa3,0xbf,1, -0x65,0x24,0x72,0x4f,0x10,0x72,0x4f,0x10,0x6a,0xa2,0x9d,0x11,0x6b,0x69,0xa3,0x9d, -4,0x61,0x5c,0x65,0x90,0x69,0xa0,0x6f,0xa2,0x5d,0x79,1,0x63,0x34,0x64,0x10, -0x69,0xa2,0x6c,0x11,0x61,0x6e,0xa3,0x6c,0x10,0x69,0xa2,0x6b,0x11,0x61,0x6e,0xa3, -0x6b,2,0x6e,0x42,0x6f,0x46,0x74,3,0x66,0xa3,0x50,0x67,0xa3,0x51,0x69,0x24, -0x6e,0x53,0x10,0x6e,0x53,0x10,0x61,0xa3,0x6a,0x50,0x10,0x6f,0x51,0x11,0x70,0x63, -0xa2,0x52,0x11,0x68,0x61,0xa3,0x52,2,0x6d,0x2e,0x6e,0x36,0x73,0x10,0x75,0xa3, -0x83,0x10,0x62,0x80,0x10,0x75,0x81,2,0x61,0xa3,0x53,0x62,0x83,0x65,0x11,0x61, -0x72,1,0x61,0xa3,0x53,0x62,0x83,0x11,0x6d,0x61,0xa3,0x8b,0x68,0x6e,0x69,0xa2, -0x95,0x6a,2,0x61,0x30,0x70,0x52,0x75,0x11,0x72,0x63,0xa3,0x94,1,0x6d,0x38, -0x76,0x10,0x61,0xa2,0x4e,0x13,0x6e,0x65,0x73,0x65,0xa3,0x4e,0x10,0x6f,0xa3,0xad, -0x11,0x61,0x6e,0xa3,0x69,6,0x6c,0x1e,0x6c,0x34,0x6d,0x3a,0x72,0x48,0x75,0x11, -0x6e,0x67,0xa3,0x4c,0x11,0x75,0x77,0xa3,0x9c,0x10,0x6e,1,0x67,0xa3,0x4b,0x70, -0xa3,0xba,0x11,0x6b,0x74,0x8d,0x61,0x3c,0x65,0xa2,0x43,0x69,0x11,0x72,0x61,0x48, -0x13,0x67,0x61,0x6e,0x61,0x49,1,0x6e,0x34,0x74,0x10,0x72,0xa2,0xa2,0x11,0x61, -0x6e,0xa3,0xa2,0x42,6,0x6f,0xe,0x6f,0x77,0x73,0xa3,0x49,0x74,0xa3,0x4a,0x75, -0x12,0x6e,0x6f,0x6f,0x77,0x62,0xa3,0xac,0x67,0x3e,0x69,0x42,0x19,0x66,0x69,0x72, -0x6f,0x68,0x69,0x6e,0x67,0x79,0x61,0xa3,0xb6,0x44,0x11,0x75,0x6c,0x45,0x11,0x62, -0x72,0x46,0x11,0x65,0x77,0x47,2,0x6d,0x2e,0x6e,0x4a,0x74,0x11,0x61,0x6c,0x5d, -0x1c,0x70,0x65,0x72,0x69,0x61,0x6c,0x61,0x72,0x61,0x6d,0x61,0x69,0x63,0xa3,0x74, -2,0x64,0x66,0x68,0x6a,0x73,0x1b,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x61, -0x6c,0x70,0x61,1,0x68,0x32,0x72,0x14,0x74,0x68,0x69,0x61,0x6e,0xa3,0x7d,0x13, -0x6c,0x61,0x76,0x69,0xa3,0x7a,0x10,0x73,0xa3,0x4d,0x15,0x65,0x72,0x69,0x74,0x65, -0x64,0x23,0x64,0xc1,0xd,0x64,0xa2,0x7a,0x65,0xa2,0xc1,0x67,4,0x65,0x82,0x6c, -0x9a,0x6f,0xa2,0x46,0x72,0xa2,0x55,0x75,2,0x6a,0x3c,0x6e,0x4e,0x72,1,0x6d, -0x24,0x75,0x41,0x13,0x75,0x6b,0x68,0x69,0x41,1,0x61,0x24,0x72,0x3f,0x13,0x72, -0x61,0x74,0x69,0x3f,0x18,0x6a,0x61,0x6c,0x61,0x67,0x6f,0x6e,0x64,0x69,0xa3,0xb3, -0x10,0x6f,1,0x6b,0xa3,0x48,0x72,0x38,0x13,0x67,0x69,0x61,0x6e,0x39,0x11,0x61, -0x67,0x90,0x15,0x6f,0x6c,0x69,0x74,0x69,0x63,0x91,1,0x6e,0x30,0x74,0x10,0x68, -0x3a,0x11,0x69,0x63,0x3b,1,0x67,0xa3,0xb3,0x6d,0xa3,0xaf,1,0x61,0x32,0x65, -1,0x65,0x24,0x6b,0x3d,0x10,0x6b,0x3d,0x10,0x6e,0xa2,0x89,0x12,0x74,0x68,0x61, -0xa3,0x89,4,0x65,0x46,0x69,0x6c,0x6f,0x8c,0x73,0x9a,0x75,0x11,0x70,0x6c,0xa2, -0x87,0x13,0x6f,0x79,0x61,0x6e,0xa3,0x87,1,0x73,0x38,0x76,0x10,0x61,0x34,0x15, -0x6e,0x61,0x67,0x61,0x72,0x69,0x35,0x13,0x65,0x72,0x65,0x74,0x33,1,0x61,0x36, -0x76,0x16,0x65,0x73,0x61,0x6b,0x75,0x72,0x75,0xa3,0xbe,0x10,0x6b,0xa3,0xbe,0x11, -0x67,0x72,0xa2,0xb2,0x10,0x61,0xa3,0xb2,0x11,0x72,0x74,0x33,2,0x67,0x3a,0x6c, -0x72,0x74,0x11,0x68,0x69,0x36,0x13,0x6f,0x70,0x69,0x63,0x37,0x10,0x79,2,0x64, -0xa3,0x45,0x68,0xa3,0x46,0x70,0xa2,0x47,0x1e,0x74,0x69,0x61,0x6e,0x68,0x69,0x65, -0x72,0x6f,0x67,0x6c,0x79,0x70,0x68,0x73,0xa3,0x47,1,0x62,0x36,0x79,0x10,0x6d, -0xa2,0xb9,0x12,0x61,0x69,0x63,0xa3,0xb9,0x10,0x61,0xa2,0x88,0x12,0x73,0x61,0x6e, -0xa3,0x88,0x61,0xa2,0xc9,0x62,0xa4,0x2e,0x63,6,0x6f,0x52,0x6f,0x76,0x70,0x92, -0x75,0xa2,0x41,0x79,1,0x70,0x3e,0x72,2,0x69,0x2a,0x6c,0x31,0x73,0xa3,0x44, -0x13,0x6c,0x6c,0x69,0x63,0x31,0x10,0x72,1,0x69,0x34,0x6f,0x15,0x6d,0x69,0x6e, -0x6f,0x61,0x6e,0xa3,0xc1,0x11,0x6f,0x74,0x7f,1,0x6d,0x30,0x70,0x10,0x74,0x2e, -0x11,0x69,0x63,0x2f,0x12,0x6d,0x6f,0x6e,0x21,1,0x6d,0x28,0x72,0x10,0x74,0x7f, -0x10,0x6e,0xa3,0xc1,0x16,0x6e,0x65,0x69,0x66,0x6f,0x72,0x6d,0xa3,0x65,0x61,0x32, -0x68,0xa2,0x41,0x69,0x11,0x72,0x74,0xa3,0x43,3,0x6b,0x4c,0x6e,0x50,0x72,0x76, -0x75,0x1d,0x63,0x61,0x73,0x69,0x61,0x6e,0x61,0x6c,0x62,0x61,0x6e,0x69,0x61,0x6e, -0xa3,0x9f,0x10,0x6d,0xa3,0x76,1,0x61,0x24,0x73,0x71,0x1d,0x64,0x69,0x61,0x6e, -0x61,0x62,0x6f,0x72,0x69,0x67,0x69,0x6e,0x61,0x6c,0x71,0x10,0x69,0xa2,0x68,0x11, -0x61,0x6e,0xa3,0x68,3,0x61,0x32,0x65,0x44,0x6f,0x52,0x72,0x10,0x73,0xa3,0xbd, -1,0x6b,0x26,0x6d,0xa3,0x42,0x11,0x6d,0x61,0xa3,0x76,0x10,0x72,0x2c,0x13,0x6f, -0x6b,0x65,0x65,0x2d,0x16,0x72,0x61,0x73,0x6d,0x69,0x61,0x6e,0xa3,0xbd,6,0x68, -0x4a,0x68,0x48,0x6e,0x4e,0x72,0x76,0x76,1,0x65,0x2a,0x73,0x10,0x74,0xa3,0x75, -0x13,0x73,0x74,0x61,0x6e,0xa3,0x75,0x11,0x6f,0x6d,0xa3,0xa1,0x11,0x61,0x74,0x1f, -0x6f,0x6c,0x69,0x61,0x6e,0x68,0x69,0x65,0x72,0x6f,0x67,0x6c,0x79,0x70,0x68,0x73, -0xa3,0x9c,1,0x61,0x3e,0x6d,2,0x65,0x2a,0x69,0xa3,0x74,0x6e,0x27,0x13,0x6e, -0x69,0x61,0x6e,0x27,0x10,0x62,0x24,0x11,0x69,0x63,0x25,0x64,0x30,0x66,0x44,0x67, -0x11,0x68,0x62,0xa3,0x9f,0x10,0x6c,1,0x61,0x26,0x6d,0xa3,0xa7,0x10,0x6d,0xa3, -0xa7,0x11,0x61,0x6b,0xa3,0x93,6,0x6c,0x3c,0x6c,0x52,0x6f,0x56,0x72,0x66,0x75, -1,0x67,0x30,0x68,1,0x64,0x79,0x69,0x10,0x64,0x79,0x10,0x69,0x8e,0x13,0x6e, -0x65,0x73,0x65,0x8f,0x11,0x69,0x73,0xa1,0x11,0x70,0x6f,0x2a,0x13,0x6d,0x6f,0x66, -0x6f,0x2b,0x10,0x61,1,0x68,0x2e,0x69,0x7c,0x12,0x6c,0x6c,0x65,0x7d,0xa2,0x41, -0x11,0x6d,0x69,0xa3,0x41,0x61,0x48,0x65,0x9c,0x68,1,0x61,0x2a,0x6b,0x10,0x73, -0xa3,0xa8,0x15,0x69,0x6b,0x73,0x75,0x6b,0x69,0xa3,0xa8,3,0x6c,0x3a,0x6d,0x48, -0x73,0x54,0x74,1,0x61,0x24,0x6b,0x9f,0x10,0x6b,0x9f,0x10,0x69,0x9c,0x13,0x6e, -0x65,0x73,0x65,0x9d,0x10,0x75,0xa2,0x82,0x10,0x6d,0xa3,0x82,0x10,0x73,0xa2,0x86, -0x13,0x61,0x76,0x61,0x68,0xa3,0x86,0x11,0x6e,0x67,0x28,0x12,0x61,0x6c,0x69,0x29, -3,0x6c,0x42,0x6e,0x90,0x74,0xa2,0x46,0x76,0x24,0x17,0x6f,0x77,0x65,0x6c,0x6a, -0x61,0x6d,0x6f,0x25,0x22,1,0x65,0x54,0x76,0x28,1,0x73,0x38,0x74,0x2a,0x17, -0x73,0x79,0x6c,0x6c,0x61,0x62,0x6c,0x65,0x2b,0x16,0x79,0x6c,0x6c,0x61,0x62,0x6c, -0x65,0x29,0x18,0x61,0x64,0x69,0x6e,0x67,0x6a,0x61,0x6d,0x6f,0x23,1,0x61,0x21, -0x6f,0x1a,0x74,0x61,0x70,0x70,0x6c,0x69,0x63,0x61,0x62,0x6c,0x65,0x21,0x26,0x1a, -0x72,0x61,0x69,0x6c,0x69,0x6e,0x67,0x6a,0x61,0x6d,0x6f,0x27,1,0x6e,0x2c,0x79, -0x22,0x11,0x65,0x73,0x23,0x20,0x10,0x6f,0x21,1,0x6e,0x2c,0x79,0x22,0x11,0x65, -0x73,0x23,0x20,0x10,0x6f,0x21,2,0x6d,0x30,0x6e,0x3a,0x79,0x22,0x11,0x65,0x73, -0x23,0x24,0x13,0x61,0x79,0x62,0x65,0x25,0x20,0x10,0x6f,0x21,2,0x6d,0x30,0x6e, -0x3a,0x79,0x22,0x11,0x65,0x73,0x23,0x24,0x13,0x61,0x79,0x62,0x65,0x25,0x20,0x10, -0x6f,0x21,0xb,0x72,0x39,0x76,0xc,0x76,0x33,0x78,0x2a,0x7a,0x11,0x77,0x6a,0x43, -0x10,0x78,0x21,0x72,0x28,0x73,0x50,0x74,0x31,1,0x65,0x24,0x69,0x39,0x1e,0x67, -0x69,0x6f,0x6e,0x61,0x6c,0x69,0x6e,0x64,0x69,0x63,0x61,0x74,0x6f,0x72,0x39,1, -0x6d,0x35,0x70,0x18,0x61,0x63,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0x35,0x6c,0x1f, -0x6c,0x3c,0x6f,0x4a,0x70,1,0x70,0x37,0x72,0x14,0x65,0x70,0x65,0x6e,0x64,0x37, -0x28,1,0x66,0x2b,0x76,0x2c,0x10,0x74,0x2f,0x13,0x74,0x68,0x65,0x72,0x21,0x63, -0x4c,0x65,0x64,0x67,1,0x61,0x3a,0x6c,0x19,0x75,0x65,0x61,0x66,0x74,0x65,0x72, -0x7a,0x77,0x6a,0x41,0x10,0x7a,0x41,2,0x6e,0x23,0x6f,0x24,0x72,0x25,0x14,0x6e, -0x74,0x72,0x6f,0x6c,0x23,2,0x62,0x34,0x6d,0x4e,0x78,0x26,0x13,0x74,0x65,0x6e, -0x64,0x27,0x3a,1,0x61,0x24,0x67,0x3d,0x11,0x73,0x65,0x3a,0x12,0x67,0x61,0x7a, -0x3d,0x3e,0x16,0x6f,0x64,0x69,0x66,0x69,0x65,0x72,0x3f,9,0x6e,0x4a,0x6e,0x34, -0x6f,0x44,0x73,0x60,0x75,0x94,0x78,0x10,0x78,0x21,0x10,0x75,0x2a,0x14,0x6d,0x65, -0x72,0x69,0x63,0x2b,1,0x6c,0x2c,0x74,0x12,0x68,0x65,0x72,0x21,0x14,0x65,0x74, -0x74,0x65,0x72,0x2d,3,0x63,0x36,0x65,0x46,0x70,0x31,0x74,0x32,0x12,0x65,0x72, -0x6d,0x33,0x3c,0x16,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x65,0x3d,0x2e,0x10,0x70,0x2f, -0x10,0x70,0x34,0x12,0x70,0x65,0x72,0x35,0x61,0x46,0x63,0x52,0x65,0x64,0x66,0x72, -0x6c,2,0x65,0x2d,0x66,0x3b,0x6f,0x28,0x12,0x77,0x65,0x72,0x29,0x10,0x74,0x22, -0x12,0x65,0x72,0x6d,0x23,1,0x6c,0x24,0x72,0x37,0x24,0x12,0x6f,0x73,0x65,0x25, -0x10,0x78,0x38,0x13,0x74,0x65,0x6e,0x64,0x39,0x10,0x6f,0x26,0x13,0x72,0x6d,0x61, -0x74,0x27,0,0x10,0x6c,0x88,0x72,0x40,0x72,0x36,0x73,0x5e,0x77,0x7a,0x78,0x8a, -0x7a,0x11,0x77,0x6a,0x4b,1,0x65,0x24,0x69,0x3b,0x1e,0x67,0x69,0x6f,0x6e,0x61, -0x6c,0x69,0x6e,0x64,0x69,0x63,0x61,0x74,0x6f,0x72,0x3b,1,0x69,0x24,0x71,0x3f, -0x18,0x6e,0x67,0x6c,0x65,0x71,0x75,0x6f,0x74,0x65,0x3f,0x17,0x73,0x65,0x67,0x73, -0x70,0x61,0x63,0x65,0x4d,0x10,0x78,0x21,0x6c,0x36,0x6d,0x3c,0x6e,0x76,0x6f,0x13, -0x74,0x68,0x65,0x72,0x21,1,0x65,0x23,0x66,0x35,3,0x62,0x37,0x69,0x28,0x6c, -0x29,0x6e,0x2b,0x10,0x64,1,0x6c,0x34,0x6e,0x11,0x75,0x6d,0x2a,0x12,0x6c,0x65, -0x74,0x37,0x14,0x65,0x74,0x74,0x65,0x72,0x29,2,0x65,0x36,0x6c,0x39,0x75,0x2c, -0x14,0x6d,0x65,0x72,0x69,0x63,0x2d,0x14,0x77,0x6c,0x69,0x6e,0x65,0x39,0x66,0x3f, -0x66,0x40,0x67,0x4e,0x68,0x70,0x6b,0x10,0x61,0x26,0x15,0x74,0x61,0x6b,0x61,0x6e, -0x61,0x27,0x10,0x6f,0x24,0x13,0x72,0x6d,0x61,0x74,0x25,1,0x61,0x3a,0x6c,0x19, -0x75,0x65,0x61,0x66,0x74,0x65,0x72,0x7a,0x77,0x6a,0x49,0x10,0x7a,0x49,1,0x65, -0x24,0x6c,0x3d,0x19,0x62,0x72,0x65,0x77,0x6c,0x65,0x74,0x74,0x65,0x72,0x3d,0x61, -0x86,0x63,0x92,0x64,0x94,0x65,2,0x62,0x44,0x6d,0x5e,0x78,0x2e,0x13,0x74,0x65, -0x6e,0x64,0x32,0x15,0x6e,0x75,0x6d,0x6c,0x65,0x74,0x2f,0x42,1,0x61,0x24,0x67, -0x45,0x11,0x73,0x65,0x42,0x12,0x67,0x61,0x7a,0x45,0x46,0x16,0x6f,0x64,0x69,0x66, -0x69,0x65,0x72,0x47,0x15,0x6c,0x65,0x74,0x74,0x65,0x72,0x23,0x10,0x72,0x31,1, -0x6f,0x24,0x71,0x41,0x18,0x75,0x62,0x6c,0x65,0x71,0x75,0x6f,0x74,0x65,0x41,2, -0x63,0x32,0x6e,0x3c,0x6f,0x22,0x12,0x70,0x65,0x6e,0x23,0x24,0x13,0x6c,0x6f,0x73, -0x65,0x25,0x20,0x12,0x6f,0x6e,0x65,0x21,6,0x6f,0x65,0x6f,0x4a,0x72,0x5c,0x74, -0x64,0x76,0x1d,0x69,0x73,0x75,0x61,0x6c,0x6f,0x72,0x64,0x65,0x72,0x6c,0x65,0x66, -0x74,0x3d,0x18,0x76,0x65,0x72,0x73,0x74,0x72,0x75,0x63,0x6b,0x2d,0x13,0x69,0x67, -0x68,0x74,0x2f,0x11,0x6f,0x70,0x30,0x12,0x61,0x6e,0x64,2,0x62,0x32,0x6c,0x62, -0x72,0x13,0x69,0x67,0x68,0x74,0x3b,0x14,0x6f,0x74,0x74,0x6f,0x6d,0x32,0x12,0x61, -0x6e,0x64,1,0x6c,0x2e,0x72,0x13,0x69,0x67,0x68,0x74,0x35,0x12,0x65,0x66,0x74, -0x3f,0x12,0x65,0x66,0x74,0x36,0x17,0x61,0x6e,0x64,0x72,0x69,0x67,0x68,0x74,0x39, -0x62,0x2c,0x6c,0x5c,0x6e,0x10,0x61,0x21,0x14,0x6f,0x74,0x74,0x6f,0x6d,0x22,0x12, -0x61,0x6e,0x64,1,0x6c,0x2e,0x72,0x13,0x69,0x67,0x68,0x74,0x27,0x12,0x65,0x66, -0x74,0x25,0x12,0x65,0x66,0x74,0x28,0x17,0x61,0x6e,0x64,0x72,0x69,0x67,0x68,0x74, -0x2b,0xd,0x6e,0xaa,0x72,0x70,0x72,0x92,0x73,0xa2,0x46,0x74,0xa2,0x54,0x76,1, -0x69,0x60,0x6f,0x12,0x77,0x65,0x6c,0x62,1,0x64,0x3a,0x69,0x19,0x6e,0x64,0x65, -0x70,0x65,0x6e,0x64,0x65,0x6e,0x74,0x67,0x17,0x65,0x70,0x65,0x6e,0x64,0x65,0x6e, -0x74,0x65,1,0x72,0x2e,0x73,0x13,0x61,0x72,0x67,0x61,0x61,0x12,0x61,0x6d,0x61, -0x5f,0x1d,0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x73,0x68,0x69,0x66,0x74,0x65,0x72, -0x57,0x1e,0x79,0x6c,0x6c,0x61,0x62,0x6c,0x65,0x6d,0x6f,0x64,0x69,0x66,0x69,0x65, -0x72,0x59,0x12,0x6f,0x6e,0x65,1,0x6c,0x2c,0x6d,0x12,0x61,0x72,0x6b,0x5d,0x14, -0x65,0x74,0x74,0x65,0x72,0x5b,0x6e,0x3c,0x6f,0x7c,0x70,0x18,0x75,0x72,0x65,0x6b, -0x69,0x6c,0x6c,0x65,0x72,0x55,1,0x6f,0x4c,0x75,1,0x6b,0x3c,0x6d,0x12,0x62, -0x65,0x72,0x50,0x15,0x6a,0x6f,0x69,0x6e,0x65,0x72,0x53,0x11,0x74,0x61,0x4f,0x16, -0x6e,0x6a,0x6f,0x69,0x6e,0x65,0x72,0x4d,0x13,0x74,0x68,0x65,0x72,0x21,0x67,0x3e, -0x67,0x4a,0x69,0x64,0x6a,0x82,0x6d,0x1d,0x6f,0x64,0x69,0x66,0x79,0x69,0x6e,0x67, -0x6c,0x65,0x74,0x74,0x65,0x72,0x4b,0x1c,0x65,0x6d,0x69,0x6e,0x61,0x74,0x69,0x6f, -0x6e,0x6d,0x61,0x72,0x6b,0x45,0x1e,0x6e,0x76,0x69,0x73,0x69,0x62,0x6c,0x65,0x73, -0x74,0x61,0x63,0x6b,0x65,0x72,0x47,0x14,0x6f,0x69,0x6e,0x65,0x72,0x49,0x61,0xa2, -0xba,0x62,0xa2,0xc0,0x63,1,0x61,0xa2,0xa2,0x6f,0x16,0x6e,0x73,0x6f,0x6e,0x61, -0x6e,0x74,0x2a,8,0x6b,0x67,0x6b,0x48,0x6d,0x52,0x70,0x5c,0x73,0xa2,0x42,0x77, -0x19,0x69,0x74,0x68,0x73,0x74,0x61,0x63,0x6b,0x65,0x72,0x43,0x14,0x69,0x6c,0x6c, -0x65,0x72,0x35,0x14,0x65,0x64,0x69,0x61,0x6c,0x37,1,0x6c,0x52,0x72,0x10,0x65, -1,0x63,0x2e,0x66,0x13,0x69,0x78,0x65,0x64,0x3d,0x19,0x65,0x64,0x69,0x6e,0x67, -0x72,0x65,0x70,0x68,0x61,0x3b,0x18,0x61,0x63,0x65,0x68,0x6f,0x6c,0x64,0x65,0x72, -0x39,0x10,0x75,1,0x62,0x3e,0x63,0x1b,0x63,0x65,0x65,0x64,0x69,0x6e,0x67,0x72, -0x65,0x70,0x68,0x61,0x41,0x15,0x6a,0x6f,0x69,0x6e,0x65,0x64,0x3f,0x64,0x4c,0x66, -0x52,0x68,0x5a,0x69,0x1e,0x6e,0x69,0x74,0x69,0x61,0x6c,0x70,0x6f,0x73,0x74,0x66, -0x69,0x78,0x65,0x64,0x33,0x12,0x65,0x61,0x64,0x2d,0x13,0x69,0x6e,0x61,0x6c,0x2f, -0x18,0x65,0x61,0x64,0x6c,0x65,0x74,0x74,0x65,0x72,0x31,0x1d,0x6e,0x74,0x69,0x6c, -0x6c,0x61,0x74,0x69,0x6f,0x6e,0x6d,0x61,0x72,0x6b,0x29,0x16,0x76,0x61,0x67,0x72, -0x61,0x68,0x61,0x23,1,0x69,0x4a,0x72,0x10,0x61,0x1f,0x68,0x6d,0x69,0x6a,0x6f, -0x69,0x6e,0x69,0x6e,0x67,0x6e,0x75,0x6d,0x62,0x65,0x72,0x27,0x12,0x6e,0x64,0x75, -0x25,2,0x72,0x38,0x74,0x46,0x75,0x26,0x15,0x70,0x72,0x69,0x67,0x68,0x74,0x27, -0x20,0x15,0x6f,0x74,0x61,0x74,0x65,0x64,0x21,1,0x72,0x24,0x75,0x25,0x22,0x18, -0x61,0x6e,0x73,0x66,0x6f,0x72,0x6d,0x65,0x64,1,0x72,0x32,0x75,0x15,0x70,0x72, -0x69,0x67,0x68,0x74,0x25,0x15,0x6f,0x74,0x61,0x74,0x65,0x64,0x23,0xd,0x6e,0xc1, -0x86,0x73,0xa8,0x73,0x4c,0x74,0xa2,0x76,0x75,0xa2,0x83,0x7a,0xd8,0x70,0,2, -0x6c,0xd9,0x20,0,0x70,0xd9,0x40,0,0x73,0xc3,0,0xfe,0xf,0,0,0, -7,0x6f,0x3c,0x6f,0xff,8,0,0,0,0x70,0x3a,0x75,0x6e,0x79,0x13,0x6d, -0x62,0x6f,0x6c,0xff,0xf,0,0,0,0x11,0x61,0x63,1,0x65,0x34,0x69,0x15, -0x6e,0x67,0x6d,0x61,0x72,0x6b,0xa5,0,0x18,0x73,0x65,0x70,0x61,0x72,0x61,0x74, -0x6f,0x72,0xc3,0,0x16,0x72,0x72,0x6f,0x67,0x61,0x74,0x65,0xe1,0,0,0x63, -0xff,2,0,0,0,0x65,0x38,0x6b,0xff,4,0,0,0,0x6d,0xff,1, -0,0,0,0x16,0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0xd9,0x70,0,0x1d,0x69, -0x74,0x6c,0x65,0x63,0x61,0x73,0x65,0x6c,0x65,0x74,0x74,0x65,0x72,0x31,1,0x6e, -0x40,0x70,0x1c,0x70,0x65,0x72,0x63,0x61,0x73,0x65,0x6c,0x65,0x74,0x74,0x65,0x72, -0x25,0x17,0x61,0x73,0x73,0x69,0x67,0x6e,0x65,0x64,0x23,0x6e,0xa2,0x69,0x6f,0xa2, -0x89,0x70,0xfe,0x30,0xf8,0,0,9,0x69,0x33,0x69,0xff,0x10,0,0,0, -0x6f,0xfd,0x80,0,0,0x72,0x54,0x73,0xf9,0,0,0x75,0x12,0x6e,0x63,0x74, -0xfe,0x30,0xf8,0,0,0x15,0x75,0x61,0x74,0x69,0x6f,0x6e,0xff,0x30,0xf8,0, -0,0x17,0x69,0x76,0x61,0x74,0x65,0x75,0x73,0x65,0xdd,0,0,0x61,0x48,0x63, -0xfd,0x40,0,0,0x64,0xe9,0,0,0x65,0xfd,0x20,0,0,0x66,0xff,0x20, -0,0,0,0x1f,0x72,0x61,0x67,0x72,0x61,0x70,0x68,0x73,0x65,0x70,0x61,0x72, -0x61,0x74,0x6f,0x72,0xd9,0x40,0,0xbe,0,3,0x64,0xa7,0,0x6c,0xab,0, -0x6f,0x30,0x75,0x13,0x6d,0x62,0x65,0x72,0xbf,0,0xb2,0,0x1b,0x6e,0x73,0x70, -0x61,0x63,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0xa1,1,0x70,0x92,0x74,0x12,0x68, -0x65,0x72,0xe6,0x80,1,3,0x6c,0x40,0x6e,0x4a,0x70,0x56,0x73,0x14,0x79,0x6d, -0x62,0x6f,0x6c,0xff,8,0,0,0,0x14,0x65,0x74,0x74,0x65,0x72,0x61,0x14, -0x75,0x6d,0x62,0x65,0x72,0xb3,0,0x19,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69, -0x6f,0x6e,0xfd,0x80,0,0,0x1c,0x65,0x6e,0x70,0x75,0x6e,0x63,0x74,0x75,0x61, -0x74,0x69,0x6f,0x6e,0xf9,0,0,0x66,0xc0,0xc4,0x66,0xa2,0x47,0x69,0xa2,0x64, -0x6c,0xa2,0x79,0x6d,0xa4,0xc0,4,0x61,0x6c,0x63,0xa5,0,0x65,0xa3,0x80,0x6e, -0xa1,0x6f,0x15,0x64,0x69,0x66,0x69,0x65,0x72,1,0x6c,0x38,0x73,0x14,0x79,0x6d, -0x62,0x6f,0x6c,0xff,4,0,0,0,0x14,0x65,0x74,0x74,0x65,0x72,0x41,1, -0x72,0x3c,0x74,0x16,0x68,0x73,0x79,0x6d,0x62,0x6f,0x6c,0xff,1,0,0,0, -0x10,0x6b,0xa5,0xc0,1,0x69,0x32,0x6f,0x13,0x72,0x6d,0x61,0x74,0xdb,0,0, -0x1d,0x6e,0x61,0x6c,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xff, -0x20,0,0,0,0x10,0x6e,0x1f,0x69,0x74,0x69,0x61,0x6c,0x70,0x75,0x6e,0x63, -0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xff,0x10,0,0,0,0x9c,7,0x6d,0x18, -0x6d,0x41,0x6f,0x28,0x74,0x31,0x75,0x25,0x60,0x1c,0x77,0x65,0x72,0x63,0x61,0x73, -0x65,0x6c,0x65,0x74,0x74,0x65,0x72,0x29,0x63,0x3d,0x65,0x28,0x69,0x42,0x6c,0x29, -0x13,0x74,0x74,0x65,0x72,0x9c,0x15,0x6e,0x75,0x6d,0x62,0x65,0x72,0xab,0,0x1a, -0x6e,0x65,0x73,0x65,0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0xd9,0x20,0,0x63,0x46, -0x64,0xa2,0x96,0x65,0x1b,0x6e,0x63,0x6c,0x6f,0x73,0x69,0x6e,0x67,0x6d,0x61,0x72, -0x6b,0xa3,0x80,0xe6,0x80,1,7,0x6e,0x57,0x6e,0x52,0x6f,0x5e,0x73,0xe1,0, -0,0x75,0x1b,0x72,0x72,0x65,0x6e,0x63,0x79,0x73,0x79,0x6d,0x62,0x6f,0x6c,0xff, -2,0,0,0,0x22,0x12,0x74,0x72,0x6c,0xd9,0x80,0,0xdc,0,0,1, -0x6d,0x62,0x6e,1,0x6e,0x30,0x74,0x12,0x72,0x6f,0x6c,0xd9,0x80,0,0x1f,0x65, -0x63,0x74,0x6f,0x72,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xfd, -0x40,0,0,0x19,0x62,0x69,0x6e,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0xa5,0xc0, -0x61,0x58,0x63,0xd9,0x80,0,0x66,0xdb,0,0,0x6c,0x1d,0x6f,0x73,0x65,0x70, -0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xfd,0x20,0,0,0x18,0x73, -0x65,0x64,0x6c,0x65,0x74,0x74,0x65,0x72,0x3d,2,0x61,0x32,0x65,0x50,0x69,0x12, -0x67,0x69,0x74,0xa7,0,0x1c,0x73,0x68,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74, -0x69,0x6f,0x6e,0xe9,0,0,0x1a,0x63,0x69,0x6d,0x61,0x6c,0x6e,0x75,0x6d,0x62, -0x65,0x72,0xa7,0 +0x61,0x6b,0xc3,8,2,0x64,0x4a,0x6e,0xa2,0xad,0x73,1,0x63,0xd9,0x40,3, +0x6f,0x16,0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0xd9,0x40,3,2,0x63,0xa2,0x44, +0x65,0xa2,0x6c,0x73,0x40,2,0x62,0x48,0x74,0x64,0x75,0xa2,0x48,0x1b,0x6e,0x61, +0x72,0x79,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0xa3,0x48,0x44,0x1c,0x69,0x6e, +0x61,0x72,0x79,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x45,0x46,1,0x61,0x40, +0x72,0x1c,0x69,0x6e,0x61,0x72,0x79,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x47, +0x11,0x72,0x74,0x41,0x3e,0x10,0x6f,1,0x6d,0x30,0x6e,0x14,0x74,0x69,0x6e,0x75, +0x65,0x3f,0x16,0x70,0x61,0x74,0x6d,0x61,0x74,0x68,1,0x63,0x30,0x73,0x13,0x74, +0x61,0x72,0x74,0xa3,0x49,0x16,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x65,0xa3,0x4a,1, +0x6e,0x36,0x6f,0x42,0x16,0x67,0x72,0x61,0x70,0x68,0x69,0x63,0x43,0x15,0x74,0x69, +0x66,0x69,0x65,0x72,1,0x73,0x30,0x74,0x12,0x79,0x70,0x65,0xd9,0x70,1,0x14, +0x74,0x61,0x74,0x75,0x73,0xc3,0x19,2,0x64,0x2e,0x70,0x86,0x73,0x10,0x63,0xc3, +0x17,0x11,0x69,0x63,1,0x70,0x46,0x73,0x1e,0x79,0x6c,0x6c,0x61,0x62,0x69,0x63, +0x63,0x61,0x74,0x65,0x67,0x6f,0x72,0x79,0xc3,0x17,0x10,0x6f,0x1f,0x73,0x69,0x74, +0x69,0x6f,0x6e,0x61,0x6c,0x63,0x61,0x74,0x65,0x67,0x6f,0x72,0x79,0xc3,0x16,0x10, +0x63,0xc3,0x16,2,0x67,0xc3,6,0x6f,0x26,0x74,0xc3,7,0x11,0x69,0x6e,1, +0x63,0x4a,0x69,0x11,0x6e,0x67,1,0x67,0x2e,0x74,0x12,0x79,0x70,0x65,0xc3,7, +0x13,0x72,0x6f,0x75,0x70,0xc3,6,0x48,0x15,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x49, +0x66,0x86,0x67,0xa2,0x4a,0x68,3,0x61,0x36,0x65,0x58,0x73,0x68,0x79,0x13,0x70, +0x68,0x65,0x6e,0x3d,0x1f,0x6e,0x67,0x75,0x6c,0x73,0x79,0x6c,0x6c,0x61,0x62,0x6c, +0x65,0x74,0x79,0x70,0x65,0xc3,0xb,0x10,0x78,0x3a,0x14,0x64,0x69,0x67,0x69,0x74, +0x3b,0x10,0x74,0xc3,0xb,0x16,0x75,0x6c,0x6c,0x63,0x6f,0x6d,0x70,0x1f,0x6f,0x73, +0x69,0x74,0x69,0x6f,0x6e,0x65,0x78,0x63,0x6c,0x75,0x73,0x69,0x6f,0x6e,0x33,2, +0x63,0xa2,0x44,0x65,0xa2,0x4b,0x72,3,0x61,0x34,0x62,0x84,0x65,0x8a,0x6c,0x12, +0x69,0x6e,0x6b,0x39,0x11,0x70,0x68,0x7c,0x12,0x65,0x6d,0x65,3,0x62,0x5e,0x63, +0x30,0x65,0x48,0x6c,0x12,0x69,0x6e,0x6b,0x39,0x1a,0x6c,0x75,0x73,0x74,0x65,0x72, +0x62,0x72,0x65,0x61,0x6b,0xc3,0x12,0x14,0x78,0x74,0x65,0x6e,0x64,0x37,0x12,0x61, +0x73,0x65,0x35,0x11,0x78,0x74,0x37,0xc2,5,1,0x62,0xc3,0x12,0x6d,0xd9,0x20, +0,0x1c,0x6e,0x65,0x72,0x61,0x6c,0x63,0x61,0x74,0x65,0x67,0x6f,0x72,0x79,0xc2, +5,0x13,0x6d,0x61,0x73,0x6b,0xd9,0x20,0,0x61,0xa2,0xa2,0x62,0xa2,0xd0,0x63, +0xa4,0x4f,0x64,0xa6,0x1c,0x65,5,0x6d,0x75,0x6d,0x6e,0x70,0xa2,0x6b,0x78,0x10, +0x74,0x30,1,0x65,0x2c,0x70,0x12,0x69,0x63,0x74,0xa1,0x12,0x6e,0x64,0x65,1, +0x64,0x24,0x72,0x31,0x1b,0x70,0x69,0x63,0x74,0x6f,0x67,0x72,0x61,0x70,0x68,0x69, +0x63,0xa1,0x10,0x6f,1,0x64,0x97,0x6a,0x10,0x69,0x92,3,0x63,0x44,0x6b,0x54, +0x6d,0x70,0x70,0x1a,0x72,0x65,0x73,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x95, +0x17,0x6f,0x6d,0x70,0x6f,0x6e,0x65,0x6e,0x74,0x9b,0x1c,0x65,0x79,0x63,0x61,0x70, +0x73,0x65,0x71,0x75,0x65,0x6e,0x63,0x65,0xa3,0x42,0x16,0x6f,0x64,0x69,0x66,0x69, +0x65,0x72,0x96,0x13,0x62,0x61,0x73,0x65,0x99,0x12,0x72,0x65,0x73,0x95,0x61,0x30, +0x62,0x4e,0x63,0x12,0x6f,0x6d,0x70,0x9b,0xc2,4,0x1b,0x73,0x74,0x61,0x73,0x69, +0x61,0x6e,0x77,0x69,0x64,0x74,0x68,0xc3,4,0x12,0x61,0x73,0x65,0x99,3,0x67, +0x44,0x68,0x4a,0x6c,0x4e,0x73,0x1a,0x63,0x69,0x69,0x68,0x65,0x78,0x64,0x69,0x67, +0x69,0x74,0x23,0x10,0x65,0xd9,0x40,0,0x11,0x65,0x78,0x23,1,0x6e,0x38,0x70, +0x11,0x68,0x61,0x20,0x14,0x62,0x65,0x74,0x69,0x63,0x21,0x11,0x75,0x6d,0x79,5, +0x6c,0x22,0x6c,0x36,0x6d,0x52,0x70,1,0x62,0xd9,0x40,0xd,0x74,0xc3,0x15,2, +0x61,0x32,0x6b,0xc3,1,0x6f,0x11,0x63,0x6b,0xc3,1,0x11,0x6e,0x6b,0x7b,0x10, +0x67,0xd9,0x40,1,0x61,0xa2,0x4f,0x63,0xc3,0,0x69,0x11,0x64,0x69,2,0x63, +0x54,0x6d,0x74,0x70,0x1b,0x61,0x69,0x72,0x65,0x64,0x62,0x72,0x61,0x63,0x6b,0x65, +0x74,0xd8,0x40,0xd,0x13,0x74,0x79,0x70,0x65,0xc3,0x15,0x24,1,0x6c,0x30,0x6f, +0x14,0x6e,0x74,0x72,0x6f,0x6c,0x25,0x12,0x61,0x73,0x73,0xc3,0,0x26,0x14,0x69, +0x72,0x72,0x6f,0x72,1,0x65,0x38,0x69,0x16,0x6e,0x67,0x67,0x6c,0x79,0x70,0x68, +0xd9,0x40,1,0x10,0x64,0x27,0x17,0x73,0x69,0x63,0x65,0x6d,0x6f,0x6a,0x69,0xa3, +0x41,6,0x68,0x7c,0x68,0x54,0x69,0x85,0x6f,0xa2,0x6f,0x77,4,0x63,0x30,0x6b, +0x36,0x6c,0x87,0x74,0x8b,0x75,0x89,1,0x66,0x8d,0x6d,0x8f,0x11,0x63,0x66,0x91, +0x18,0x61,0x6e,0x67,0x65,0x73,0x77,0x68,0x65,0x6e,4,0x63,0x44,0x6c,0x6c,0x6e, +0x7e,0x74,0x98,0x75,0x18,0x70,0x70,0x65,0x72,0x63,0x61,0x73,0x65,0x64,0x89,0x12, +0x61,0x73,0x65,1,0x66,0x30,0x6d,0x14,0x61,0x70,0x70,0x65,0x64,0x8f,0x14,0x6f, +0x6c,0x64,0x65,0x64,0x8d,0x18,0x6f,0x77,0x65,0x72,0x63,0x61,0x73,0x65,0x64,0x87, +0x1c,0x66,0x6b,0x63,0x63,0x61,0x73,0x65,0x66,0x6f,0x6c,0x64,0x65,0x64,0x91,0x18, +0x69,0x74,0x6c,0x65,0x63,0x61,0x73,0x65,0x64,0x8b,0x13,0x6d,0x70,0x65,0x78,0x33, +0x61,0x2e,0x63,0xa2,0x48,0x66,0xd9,0x40,2,1,0x6e,0x72,0x73,0x10,0x65,3, +0x64,0x83,0x66,0x3a,0x69,0x4a,0x73,0x17,0x65,0x6e,0x73,0x69,0x74,0x69,0x76,0x65, +0x65,0x15,0x6f,0x6c,0x64,0x69,0x6e,0x67,0xd9,0x40,2,0x17,0x67,0x6e,0x6f,0x72, +0x61,0x62,0x6c,0x65,0x85,0x13,0x6f,0x6e,0x69,0x63,0x1f,0x61,0x6c,0x63,0x6f,0x6d, +0x62,0x69,0x6e,0x69,0x6e,0x67,0x63,0x6c,0x61,0x73,0x73,0xc3,2,0x10,0x63,0xc3, +2,3,0x61,0x30,0x65,0x34,0x69,0xa2,0x41,0x74,0xc3,3,0x11,0x73,0x68,0x29, +2,0x63,0x3a,0x66,0x58,0x70,0x2c,0x16,0x72,0x65,0x63,0x61,0x74,0x65,0x64,0x2d, +0x1d,0x6f,0x6d,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x74,0x79,0x70,0x65,0xc3, +3,0x15,0x61,0x75,0x6c,0x74,0x69,0x67,0x1f,0x6e,0x6f,0x72,0x61,0x62,0x6c,0x65, +0x63,0x6f,0x64,0x65,0x70,0x6f,0x69,0x6e,0x74,0x2b,0x2a,0x10,0x61,0x2e,0x15,0x63, +0x72,0x69,0x74,0x69,0x63,0x2f,3,0x66,0x34,0x6e,0x3e,0x74,0x42,0x79,0x22,0x11, +0x65,0x73,0x23,0x20,0x13,0x61,0x6c,0x73,0x65,0x21,0x20,0x10,0x6f,0x21,0x22,0x12, +0x72,0x75,0x65,0x23,0xb,0x6b,0x5b,0x6f,0x23,0x6f,0x3c,0x72,0x4c,0x76,1,0x69, +0x24,0x72,0x33,0x13,0x72,0x61,0x6d,0x61,0x33,0x10,0x76,0x22,0x14,0x65,0x72,0x6c, +0x61,0x79,0x23,0xa2,0xe2,0x13,0x69,0x67,0x68,0x74,0xa3,0xe2,0x6b,0x58,0x6c,0x74, +0x6e,3,0x6b,0x2f,0x6f,0x30,0x72,0x21,0x75,0x12,0x6b,0x74,0x61,0x2f,0x19,0x74, +0x72,0x65,0x6f,0x72,0x64,0x65,0x72,0x65,0x64,0x21,1,0x61,0x24,0x76,0x31,0x18, +0x6e,0x61,0x76,0x6f,0x69,0x63,0x69,0x6e,0x67,0x31,0xa2,0xe0,0x12,0x65,0x66,0x74, +0xa3,0xe0,0x64,0x45,0x64,0x4e,0x68,0x88,0x69,1,0x6f,0x26,0x73,0xa3,0xf0,0x1a, +0x74,0x61,0x73,0x75,0x62,0x73,0x63,0x72,0x69,0x70,0x74,0xa3,0xf0,2,0x61,0xa3, +0xea,0x62,0xa3,0xe9,0x6f,0x13,0x75,0x62,0x6c,0x65,1,0x61,0x30,0x62,0x13,0x65, +0x6c,0x6f,0x77,0xa3,0xe9,0x13,0x62,0x6f,0x76,0x65,0xa3,0xea,0x12,0x61,0x6e,0x72, +0x2c,0x15,0x65,0x61,0x64,0x69,0x6e,0x67,0x2d,0x61,0xa2,0x7b,0x62,0xa2,0xd4,0x63, +0x11,0x63,0x63,4,0x31,0x3c,0x32,0xa2,0x42,0x33,0xa2,0x56,0x38,0xa2,0x64,0x39, +0x10,0x31,0xa3,0x5b,9,0x35,0xa,0x35,0x3f,0x36,0x41,0x37,0x43,0x38,0x45,0x39, +0x47,0x30,0x30,0x31,0x3c,0x32,0x42,0x33,0x4e,0x34,0x3d,0x34,1,0x33,0xa3,0x67, +0x37,0xa3,0x6b,0x36,0x10,0x38,0xa3,0x76,0x38,1,0x32,0xa3,0x7a,0x39,0xa3,0x81, +0x3a,2,0x30,0xa3,0x82,0x32,0xa3,0x84,0x33,0xa3,0x85,9,0x35,0xa,0x35,0x53, +0x36,0x55,0x37,0x57,0x38,0x59,0x39,0x5b,0x30,0x49,0x31,0x4b,0x32,0x4d,0x33,0x4f, +0x34,0x51,6,0x33,8,0x33,0x63,0x34,0x65,0x35,0x67,0x36,0x69,0x30,0x5d,0x31, +0x5f,0x32,0x61,0x10,0x34,0xa3,0x54,0xa2,0xe6,3,0x62,0xa0,0x6c,0xa3,0xe4,0x72, +0xa3,0xe8,0x74,2,0x61,0x74,0x62,0x7c,0x74,0x14,0x61,0x63,0x68,0x65,0x64,1, +0x61,0x3e,0x62,0x13,0x65,0x6c,0x6f,0x77,0xa2,0xca,0x13,0x6c,0x65,0x66,0x74,0xa3, +0xc8,0x13,0x62,0x6f,0x76,0x65,0xa2,0xd6,0x14,0x72,0x69,0x67,0x68,0x74,0xa3,0xd8, +0xa2,0xd6,0x10,0x72,0xa3,0xd8,0xa2,0xca,0x10,0x6c,0xa3,0xc8,0x12,0x6f,0x76,0x65, +0xa2,0xe6,1,0x6c,0x30,0x72,0x13,0x69,0x67,0x68,0x74,0xa3,0xe8,0x12,0x65,0x66, +0x74,0xa3,0xe4,0xa2,0xdc,2,0x65,0x2c,0x6c,0xa3,0xda,0x72,0xa3,0xde,0x12,0x6c, +0x6f,0x77,0xa2,0xdc,1,0x6c,0x30,0x72,0x13,0x69,0x67,0x68,0x74,0xa3,0xde,0x12, +0x65,0x66,0x74,0xa3,0xda,0xb,0x6e,0xc0,0xca,0x72,0x5f,0x72,0x46,0x73,0xa2,0x48, +0x77,1,0x68,0x24,0x73,0x33,0x17,0x69,0x74,0x65,0x73,0x70,0x61,0x63,0x65,0x33, +0x22,1,0x69,0x30,0x6c,2,0x65,0x3d,0x69,0x4b,0x6f,0x3f,0x18,0x67,0x68,0x74, +0x74,0x6f,0x6c,0x65,0x66,0x74,0x22,2,0x65,0x38,0x69,0x48,0x6f,0x16,0x76,0x65, +0x72,0x72,0x69,0x64,0x65,0x3f,0x17,0x6d,0x62,0x65,0x64,0x64,0x69,0x6e,0x67,0x3d, +0x15,0x73,0x6f,0x6c,0x61,0x74,0x65,0x4b,0x30,0x1e,0x65,0x67,0x6d,0x65,0x6e,0x74, +0x73,0x65,0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0x31,0x6e,0xa2,0x41,0x6f,0xa2,0x53, +0x70,2,0x61,0x66,0x64,0x86,0x6f,0x1b,0x70,0x64,0x69,0x72,0x65,0x63,0x74,0x69, +0x6f,0x6e,0x61,0x6c,1,0x66,0x32,0x69,0x15,0x73,0x6f,0x6c,0x61,0x74,0x65,0x4d, +0x14,0x6f,0x72,0x6d,0x61,0x74,0x41,0x1f,0x72,0x61,0x67,0x72,0x61,0x70,0x68,0x73, +0x65,0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0x2f,1,0x66,0x41,0x69,0x4d,1,0x6f, +0x28,0x73,0x10,0x6d,0x43,0x1b,0x6e,0x73,0x70,0x61,0x63,0x69,0x6e,0x67,0x6d,0x61, +0x72,0x6b,0x43,1,0x6e,0x35,0x74,0x19,0x68,0x65,0x72,0x6e,0x65,0x75,0x74,0x72, +0x61,0x6c,0x35,0x65,0x88,0x65,0x98,0x66,0xa2,0x6a,0x6c,0x20,1,0x65,0x30,0x72, +2,0x65,0x37,0x69,0x49,0x6f,0x39,0x18,0x66,0x74,0x74,0x6f,0x72,0x69,0x67,0x68, +0x74,0x20,2,0x65,0x38,0x69,0x48,0x6f,0x16,0x76,0x65,0x72,0x72,0x69,0x64,0x65, +0x39,0x17,0x6d,0x62,0x65,0x64,0x64,0x69,0x6e,0x67,0x37,0x15,0x73,0x6f,0x6c,0x61, +0x74,0x65,0x49,3,0x6e,0x25,0x73,0x27,0x74,0x29,0x75,0x15,0x72,0x6f,0x70,0x65, +0x61,0x6e,2,0x6e,0x3c,0x73,0x46,0x74,0x18,0x65,0x72,0x6d,0x69,0x6e,0x61,0x74, +0x6f,0x72,0x29,0x14,0x75,0x6d,0x62,0x65,0x72,0x25,0x17,0x65,0x70,0x61,0x72,0x61, +0x74,0x6f,0x72,0x27,1,0x69,0x28,0x73,0x10,0x69,0x47,0x1f,0x72,0x73,0x74,0x73, +0x74,0x72,0x6f,0x6e,0x67,0x69,0x73,0x6f,0x6c,0x61,0x74,0x65,0x47,0x61,0x4e,0x62, +0x84,0x63,1,0x6f,0x24,0x73,0x2d,0x1c,0x6d,0x6d,0x6f,0x6e,0x73,0x65,0x70,0x61, +0x72,0x61,0x74,0x6f,0x72,0x2d,2,0x6c,0x3b,0x6e,0x2b,0x72,0x13,0x61,0x62,0x69, +0x63,1,0x6c,0x30,0x6e,0x14,0x75,0x6d,0x62,0x65,0x72,0x2b,0x14,0x65,0x74,0x74, +0x65,0x72,0x3b,0x2e,1,0x6e,0x45,0x6f,0x1c,0x75,0x6e,0x64,0x61,0x72,0x79,0x6e, +0x65,0x75,0x74,0x72,0x61,0x6c,0x45,0,0x16,0x6d,0xc9,0x20,0x74,0xc2,0x30,0x77, +0x89,0x77,0x86,0x79,0xa2,0x46,0x7a,1,0x61,0x58,0x6e,0x1a,0x61,0x6d,0x65,0x6e, +0x6e,0x79,0x6d,0x75,0x73,0x69,0x63,0xa4,0x40,0x19,0x61,0x6c,0x6e,0x6f,0x74,0x61, +0x74,0x69,0x6f,0x6e,0xa5,0x40,0x1c,0x6e,0x61,0x62,0x61,0x7a,0x61,0x72,0x73,0x71, +0x75,0x61,0x72,0x65,0xa5,0x18,0x10,0x61,1,0x6e,0x36,0x72,0x16,0x61,0x6e,0x67, +0x63,0x69,0x74,0x69,0xa3,0xfc,0x12,0x63,0x68,0x6f,0xa5,0x2c,1,0x65,0x88,0x69, +2,0x6a,0x3c,0x72,0x68,0x73,0x17,0x79,0x6c,0x6c,0x61,0x62,0x6c,0x65,0x73,0xa3, +0x48,0x12,0x69,0x6e,0x67,0xa2,0x74,0x1e,0x68,0x65,0x78,0x61,0x67,0x72,0x61,0x6d, +0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0x74,0x16,0x61,0x64,0x69,0x63,0x61,0x6c, +0x73,0xa3,0x49,0x13,0x7a,0x69,0x64,0x69,0xa5,0x34,0x74,0xa2,0x65,0x75,0xa4,0x4f, +0x76,3,0x61,0x3c,0x65,0x80,0x69,0xa2,0x50,0x73,0xa2,0x6c,0x12,0x73,0x75,0x70, +0xa3,0x7d,1,0x69,0xa3,0x9f,0x72,0x1e,0x69,0x61,0x74,0x69,0x6f,0x6e,0x73,0x65, +0x6c,0x65,0x63,0x74,0x6f,0x72,0x73,0xa2,0x6c,0x19,0x73,0x75,0x70,0x70,0x6c,0x65, +0x6d,0x65,0x6e,0x74,0xa3,0x7d,1,0x64,0x3c,0x72,0x19,0x74,0x69,0x63,0x61,0x6c, +0x66,0x6f,0x72,0x6d,0x73,0xa3,0x91,0x14,0x69,0x63,0x65,0x78,0x74,0xa2,0xaf,0x16, +0x65,0x6e,0x73,0x69,0x6f,0x6e,0x73,0xa3,0xaf,0x15,0x74,0x68,0x6b,0x75,0x71,0x69, +0xa5,0x3f,5,0x69,0x3f,0x69,0x5a,0x6f,0x8c,0x72,0x1c,0x61,0x6e,0x73,0x70,0x6f, +0x72,0x74,0x61,0x6e,0x64,0x6d,0x61,0x70,0xa2,0xcf,0x16,0x73,0x79,0x6d,0x62,0x6f, +0x6c,0x73,0xa3,0xcf,2,0x62,0x34,0x66,0x3c,0x72,0x13,0x68,0x75,0x74,0x61,0xa3, +0xfb,0x13,0x65,0x74,0x61,0x6e,0x57,0x14,0x69,0x6e,0x61,0x67,0x68,0xa3,0x90,0x11, +0x74,0x6f,0xa5,0x3d,0x61,0x3e,0x65,0xa2,0xa0,0x68,0x10,0x61,1,0x61,0x24,0x69, +0x53,0x11,0x6e,0x61,0x3d,4,0x67,0x8e,0x69,0xa2,0x49,0x6b,0xa2,0x72,0x6d,0xa2, +0x74,0x6e,0x10,0x67,1,0x73,0x68,0x75,0x10,0x74,0xa4,0x10,1,0x63,0x40,0x73, +0x11,0x75,0x70,0xa4,0x33,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa5,0x33,0x18, +0x6f,0x6d,0x70,0x6f,0x6e,0x65,0x6e,0x74,0x73,0xa5,0x11,0x10,0x61,0xa5,0x3c,2, +0x61,0x2a,0x62,0x32,0x73,0xa3,0x60,0x12,0x6c,0x6f,0x67,0xa3,0x62,0x13,0x61,0x6e, +0x77,0x61,0xa3,0x65,3,0x6c,0x52,0x74,0x56,0x76,0x5e,0x78,0x16,0x75,0x61,0x6e, +0x6a,0x69,0x6e,0x67,0xa2,0x7c,0x16,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0x7c, +0x10,0x65,0xa3,0x70,0x12,0x68,0x61,0x6d,0xa3,0xae,0x12,0x69,0x65,0x74,0xa3,0xb7, +0x11,0x72,0x69,0xa3,0xdc,0x11,0x69,0x6c,0x48,0x12,0x73,0x75,0x70,0xa4,0x2b,0x16, +0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa5,0x2b,0x13,0x6c,0x75,0x67,0x75,0x4b,2, +0x63,0x8c,0x67,0xa2,0x41,0x6e,0x1f,0x69,0x66,0x69,0x65,0x64,0x63,0x61,0x6e,0x61, +0x64,0x69,0x61,0x6e,0x61,0x62,0x6f,0x1f,0x72,0x69,0x67,0x69,0x6e,0x61,0x6c,0x73, +0x79,0x6c,0x6c,0x61,0x62,0x69,0x63,0x73,0x62,0x17,0x65,0x78,0x74,0x65,0x6e,0x64, +0x65,0x64,0xa2,0xad,0x10,0x61,0xa5,0x3e,0x11,0x61,0x73,0x62,0x12,0x65,0x78,0x74, +0xa2,0xad,0x10,0x61,0xa5,0x3e,0x15,0x61,0x72,0x69,0x74,0x69,0x63,0xa3,0x78,0x70, +0xc3,0x4b,0x70,0xa6,0x61,0x72,0xa8,0x1d,0x73,7,0x6f,0xc1,0xbe,0x6f,0xa2,0x69, +0x70,0xa2,0x85,0x75,0xa2,0xa4,0x79,2,0x6c,0x50,0x6d,0x62,0x72,0x12,0x69,0x61, +0x63,0x3a,0x12,0x73,0x75,0x70,0xa4,0x17,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74, +0xa5,0x17,0x17,0x6f,0x74,0x69,0x6e,0x61,0x67,0x72,0x69,0xa3,0x8f,0x13,0x62,0x6f, +0x6c,0x73,1,0x61,0x4c,0x66,0x10,0x6f,0x1f,0x72,0x6c,0x65,0x67,0x61,0x63,0x79, +0x63,0x6f,0x6d,0x70,0x75,0x74,0x69,0x6e,0x67,0xa5,0x32,0x1f,0x6e,0x64,0x70,0x69, +0x63,0x74,0x6f,0x67,0x72,0x61,0x70,0x68,0x73,0x65,0x78,0x74,1,0x61,0xa5,0x2a, +0x65,0x14,0x6e,0x64,0x65,0x64,0x61,0xa5,0x2a,2,0x67,0x34,0x72,0x3e,0x79,0x13, +0x6f,0x6d,0x62,0x6f,0xa5,0x16,0x13,0x64,0x69,0x61,0x6e,0xa5,0x23,0x17,0x61,0x73, +0x6f,0x6d,0x70,0x65,0x6e,0x67,0xa3,0xda,1,0x61,0x32,0x65,0x14,0x63,0x69,0x61, +0x6c,0x73,0xa3,0x56,0x12,0x63,0x69,0x6e,0x1f,0x67,0x6d,0x6f,0x64,0x69,0x66,0x69, +0x65,0x72,0x6c,0x65,0x74,0x74,0x65,0x72,0x73,0x2d,2,0x6e,0x48,0x70,0x76,0x74, +0x1d,0x74,0x6f,0x6e,0x73,0x69,0x67,0x6e,0x77,0x72,0x69,0x74,0x69,0x6e,0x67,0xa5, +6,0x15,0x64,0x61,0x6e,0x65,0x73,0x65,0xa2,0x9b,0x12,0x73,0x75,0x70,0xa2,0xdb, +0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0xdb,4,0x61,0xa2,0xa8,0x65,0x5c, +0x6d,0x9e,0x70,0xa2,0x4b,0x73,0x13,0x79,0x6d,0x62,0x6f,0x1f,0x6c,0x73,0x61,0x6e, +0x64,0x70,0x69,0x63,0x74,0x6f,0x67,0x72,0x61,0x70,0x68,0x73,0xa5,5,0x10,0x72, +1,0x61,0x4e,0x73,0x12,0x63,0x72,0x69,0x1f,0x70,0x74,0x73,0x61,0x6e,0x64,0x73, +0x75,0x62,0x73,0x63,0x72,0x69,0x70,0x74,0x73,0x73,0x14,0x6e,0x64,0x73,0x75,0x62, +0x73,0x1b,0x61,0x74,0x68,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x73,0xa3,0x6a, +1,0x6c,0x40,0x75,1,0x61,0x6e,0x6e,0x17,0x63,0x74,0x75,0x61,0x74,0x69,0x6f, +0x6e,0xa3,0x8e,0x15,0x65,0x6d,0x65,0x6e,0x74,0x61,1,0x6c,0x50,0x72,0x1e,0x79, +0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x75,0x73,0x65,0x61,0x72,0x65,0x61,1,0x61, +0xa3,0x6d,0x62,0xa3,0x6e,3,0x61,0x5c,0x6d,0x78,0x70,0xa2,0x41,0x73,0x13,0x79, +0x6d,0x62,0x6f,0x1f,0x6c,0x73,0x61,0x6e,0x64,0x70,0x69,0x63,0x74,0x6f,0x67,0x72, +0x61,0x70,0x68,0x73,0xa5,5,0x14,0x72,0x72,0x6f,0x77,0x73,2,0x61,0xa3,0x67, +0x62,0xa3,0x68,0x63,0xa3,0xfa,0x13,0x61,0x74,0x68,0x65,0x1f,0x6d,0x61,0x74,0x69, +0x63,0x61,0x6c,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x73,0xa3,0x6a,0x19,0x75, +0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xa3,0x8e,0x61,0x88,0x68,0xa2,0x48, +0x69,0xa2,0x71,0x6d,0x12,0x61,0x6c,0x6c,1,0x66,0x46,0x6b,0x15,0x61,0x6e,0x61, +0x65,0x78,0x74,0xa4,0x29,0x15,0x65,0x6e,0x73,0x69,0x6f,0x6e,0xa5,0x29,0x12,0x6f, +0x72,0x6d,1,0x73,0xa3,0x54,0x76,0x16,0x61,0x72,0x69,0x61,0x6e,0x74,0x73,0xa3, +0x54,1,0x6d,0x36,0x75,0x16,0x72,0x61,0x73,0x68,0x74,0x72,0x61,0xa3,0xa1,0x15, +0x61,0x72,0x69,0x74,0x61,0x6e,0xa3,0xac,1,0x61,0x52,0x6f,0x13,0x72,0x74,0x68, +0x61,0x1f,0x6e,0x64,0x66,0x6f,0x72,0x6d,0x61,0x74,0x63,0x6f,0x6e,0x74,0x72,0x6f, +0x6c,0x73,0xa3,0xf7,1,0x72,0x2e,0x76,0x12,0x69,0x61,0x6e,0xa3,0x79,0x12,0x61, +0x64,0x61,0xa3,0xd9,1,0x64,0x50,0x6e,0x13,0x68,0x61,0x6c,0x61,0x50,0x1d,0x61, +0x72,0x63,0x68,0x61,0x69,0x63,0x6e,0x75,0x6d,0x62,0x65,0x72,0x73,0xa3,0xf9,0x13, +0x64,0x68,0x61,0x6d,0xa3,0xf8,5,0x72,0x35,0x72,0x44,0x73,0x64,0x75,1,0x61, +0xa3,0x4e,0x6e,0x17,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x71,0x17,0x69,0x76, +0x61,0x74,0x65,0x75,0x73,0x65,0xa2,0x4e,0x13,0x61,0x72,0x65,0x61,0xa3,0x4e,0x1b, +0x61,0x6c,0x74,0x65,0x72,0x70,0x61,0x68,0x6c,0x61,0x76,0x69,0xa3,0xf6,0x61,0x40, +0x68,0x82,0x6c,0x19,0x61,0x79,0x69,0x6e,0x67,0x63,0x61,0x72,0x64,0x73,0xa3,0xcc, +2,0x68,0x38,0x6c,0x4a,0x75,0x15,0x63,0x69,0x6e,0x68,0x61,0x75,0xa3,0xf5,0x17, +0x61,0x77,0x68,0x68,0x6d,0x6f,0x6e,0x67,0xa3,0xf3,0x15,0x6d,0x79,0x72,0x65,0x6e, +0x65,0xa3,0xf4,1,0x61,0x8e,0x6f,1,0x65,0x74,0x6e,0x16,0x65,0x74,0x69,0x63, +0x65,0x78,0x74,0xa2,0x72,1,0x65,0x2c,0x73,0x11,0x75,0x70,0xa3,0x8d,0x15,0x6e, +0x73,0x69,0x6f,0x6e,0x73,0xa2,0x72,0x19,0x73,0x75,0x70,0x70,0x6c,0x65,0x6d,0x65, +0x6e,0x74,0xa3,0x8d,0x15,0x6e,0x69,0x63,0x69,0x61,0x6e,0xa3,0x97,1,0x67,0x3e, +0x69,0x13,0x73,0x74,0x6f,0x73,0xa2,0xa6,0x13,0x64,0x69,0x73,0x63,0xa3,0xa6,0x12, +0x73,0x70,0x61,0xa3,0x96,1,0x65,0x5c,0x75,1,0x6d,0x2a,0x6e,0x11,0x69,0x63, +0x67,0x10,0x69,0xa2,0xc0,0x1d,0x6e,0x75,0x6d,0x65,0x72,0x61,0x6c,0x73,0x79,0x6d, +0x62,0x6f,0x6c,0x73,0xa3,0xc0,0x13,0x6a,0x61,0x6e,0x67,0xa3,0xa3,0x6d,0xa2,0xf0, +0x6e,0xa8,0x23,0x6f,6,0x70,0x63,0x70,0x56,0x72,0x8a,0x73,0xa2,0x4c,0x74,0x10, +0x74,0x1f,0x6f,0x6d,0x61,0x6e,0x73,0x69,0x79,0x61,0x71,0x6e,0x75,0x6d,0x62,0x65, +0x72,0x73,0xa5,0x28,0x18,0x74,0x69,0x63,0x61,0x6c,0x63,0x68,0x61,0x72,0x1f,0x61, +0x63,0x74,0x65,0x72,0x72,0x65,0x63,0x6f,0x67,0x6e,0x69,0x74,0x69,0x6f,0x6e,0x85, +1,0x69,0x46,0x6e,0x1e,0x61,0x6d,0x65,0x6e,0x74,0x61,0x6c,0x64,0x69,0x6e,0x67, +0x62,0x61,0x74,0x73,0xa3,0xf2,0x11,0x79,0x61,0x47,1,0x61,0x30,0x6d,0x13,0x61, +0x6e,0x79,0x61,0xa3,0x7a,0x11,0x67,0x65,0xa5,0xf,0x63,0xa2,0x7b,0x67,0xa2,0x7b, +0x6c,1,0x63,0xa2,0x6c,0x64,6,0x70,0x42,0x70,0x3a,0x73,0x5a,0x74,0x88,0x75, +0x14,0x79,0x67,0x68,0x75,0x72,0xa5,0x3b,0x11,0x65,0x72,1,0x6d,0x2e,0x73,0x12, +0x69,0x61,0x6e,0xa3,0x8c,0x11,0x69,0x63,0xa3,0xf1,0x10,0x6f,1,0x67,0x3a,0x75, +0x18,0x74,0x68,0x61,0x72,0x61,0x62,0x69,0x61,0x6e,0xa3,0xbb,0x13,0x64,0x69,0x61, +0x6e,0xa5,0x22,0x14,0x75,0x72,0x6b,0x69,0x63,0xa3,0xbf,0x68,0x42,0x69,0x54,0x6e, +0x1a,0x6f,0x72,0x74,0x68,0x61,0x72,0x61,0x62,0x69,0x61,0x6e,0xa3,0xf0,0x17,0x75, +0x6e,0x67,0x61,0x72,0x69,0x61,0x6e,0xa5,4,0x14,0x74,0x61,0x6c,0x69,0x63,0xa3, +0x58,0x13,0x68,0x69,0x6b,0x69,0xa3,0x9d,0x10,0x72,0x85,0x12,0x68,0x61,0x6d,0x65, +6,0x6f,0x86,0x6f,0x6c,0x72,0xa2,0x61,0x75,0xa2,0x62,0x79,0x14,0x61,0x6e,0x6d, +0x61,0x72,0x58,0x12,0x65,0x78,0x74,2,0x61,0xa3,0xb6,0x62,0xa3,0xee,0x65,0x13, +0x6e,0x64,0x65,0x64,1,0x61,0xa3,0xb6,0x62,0xa3,0xee,1,0x64,0x52,0x6e,0x15, +0x67,0x6f,0x6c,0x69,0x61,0x6e,0x6a,0x12,0x73,0x75,0x70,0xa4,0xd,0x16,0x70,0x6c, +0x65,0x6d,0x65,0x6e,0x74,0xa5,0xd,0x10,0x69,0xa2,0xec,0x13,0x66,0x69,0x65,0x72, +1,0x6c,0x3c,0x74,0x19,0x6f,0x6e,0x65,0x6c,0x65,0x74,0x74,0x65,0x72,0x73,0xa3, +0x8a,0x15,0x65,0x74,0x74,0x65,0x72,0x73,0x2d,0x10,0x6f,0xa3,0xed,1,0x6c,0x44, +0x73,0x11,0x69,0x63,0xa2,0x5c,0x18,0x61,0x6c,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73, +0xa3,0x5c,0x13,0x74,0x61,0x6e,0x69,0xa5,3,0x61,0xa2,0x9b,0x65,0xa4,0x4c,0x69, +1,0x61,0xa2,0x8f,0x73,0x10,0x63,5,0x70,0x18,0x70,0xa2,0x71,0x73,0x36,0x74, +0x17,0x65,0x63,0x68,0x6e,0x69,0x63,0x61,0x6c,0x81,0x15,0x79,0x6d,0x62,0x6f,0x6c, +0x73,0x8f,0x61,0xa2,0x66,0x65,0x46,0x6d,0x19,0x61,0x74,0x68,0x73,0x79,0x6d,0x62, +0x6f,0x6c,0x73,1,0x61,0xa3,0x66,0x62,0xa3,0x69,0x17,0x6c,0x6c,0x61,0x6e,0x65, +0x6f,0x75,0x73,2,0x6d,0x3a,0x73,0x6c,0x74,0x17,0x65,0x63,0x68,0x6e,0x69,0x63, +0x61,0x6c,0x81,0x11,0x61,0x74,0x1f,0x68,0x65,0x6d,0x61,0x74,0x69,0x63,0x61,0x6c, +0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,1,0x61,0xa3,0x66,0x62,0xa3,0x69,0x15,0x79, +0x6d,0x62,0x6f,0x6c,0x73,0x8e,0x12,0x61,0x6e,0x64,1,0x61,0x3c,0x70,0x19,0x69, +0x63,0x74,0x6f,0x67,0x72,0x61,0x70,0x68,0x73,0xa3,0xcd,0x14,0x72,0x72,0x6f,0x77, +0x73,0xa3,0x73,0x10,0x6f,0xa3,0xd8,7,0x72,0x6f,0x72,0x44,0x73,0x4e,0x74,0x62, +0x79,0x19,0x61,0x6e,0x6e,0x75,0x6d,0x65,0x72,0x61,0x6c,0x73,0xa5,0x20,0x13,0x63, +0x68,0x65,0x6e,0xa5,0xc,0x18,0x61,0x72,0x61,0x6d,0x67,0x6f,0x6e,0x64,0x69,0xa5, +0x14,0x10,0x68,2,0x61,0x3a,0x65,0x4a,0x6f,0x17,0x70,0x65,0x72,0x61,0x74,0x6f, +0x72,0x73,0x7f,0x16,0x6c,0x70,0x68,0x61,0x6e,0x75,0x6d,0xa3,0x5d,0x16,0x6d,0x61, +0x74,0x69,0x63,0x61,0x6c,1,0x61,0x36,0x6f,0x17,0x70,0x65,0x72,0x61,0x74,0x6f, +0x72,0x73,0x7f,0x11,0x6c,0x70,0x1f,0x68,0x61,0x6e,0x75,0x6d,0x65,0x72,0x69,0x63, +0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0x5d,0x68,0x50,0x6b,0x7e,0x6c,0x88,0x6e, +1,0x64,0x34,0x69,0x15,0x63,0x68,0x61,0x65,0x61,0x6e,0xa3,0xea,0x12,0x61,0x69, +0x63,0xa3,0xc6,1,0x61,0x3e,0x6a,0x12,0x6f,0x6e,0x67,0xa2,0xaa,0x14,0x74,0x69, +0x6c,0x65,0x73,0xa3,0xaa,0x13,0x6a,0x61,0x6e,0x69,0xa3,0xe9,0x13,0x61,0x73,0x61, +0x72,0xa5,0x1f,0x15,0x61,0x79,0x61,0x6c,0x61,0x6d,0x4f,3,0x64,0x6c,0x65,0x7e, +0x6e,0xa2,0x47,0x72,0x14,0x6f,0x69,0x74,0x69,0x63,1,0x63,0x3c,0x68,0x19,0x69, +0x65,0x72,0x6f,0x67,0x6c,0x79,0x70,0x68,0x73,0xa3,0xd7,0x15,0x75,0x72,0x73,0x69, +0x76,0x65,0xa3,0xd6,0x17,0x65,0x66,0x61,0x69,0x64,0x72,0x69,0x6e,0xa5,0x21,0x17, +0x74,0x65,0x69,0x6d,0x61,0x79,0x65,0x6b,0xa2,0xb8,0x12,0x65,0x78,0x74,0xa2,0xd5, +0x16,0x65,0x6e,0x73,0x69,0x6f,0x6e,0x73,0xa3,0xd5,0x18,0x64,0x65,0x6b,0x69,0x6b, +0x61,0x6b,0x75,0x69,0xa3,0xeb,6,0x6b,0x3b,0x6b,0x56,0x6f,0x5a,0x75,0x64,0x79, +0x11,0x69,0x61,0x1f,0x6b,0x65,0x6e,0x67,0x70,0x75,0x61,0x63,0x68,0x75,0x65,0x68, +0x6d,0x6f,0x6e,0x67,0xa5,0x27,0x10,0x6f,0xa3,0x92,0x14,0x62,0x6c,0x6f,0x63,0x6b, +0x21,1,0x6d,0x2c,0x73,0x11,0x68,0x75,0xa5,0x15,0x17,0x62,0x65,0x72,0x66,0x6f, +0x72,0x6d,0x73,0x7b,0x61,0x44,0x62,0x21,0x65,0x10,0x77,1,0x61,0xa5,0xe,0x74, +0x14,0x61,0x69,0x6c,0x75,0x65,0xa3,0x8b,2,0x62,0x3c,0x67,0x4a,0x6e,0x17,0x64, +0x69,0x6e,0x61,0x67,0x61,0x72,0x69,0xa5,0x26,0x15,0x61,0x74,0x61,0x65,0x61,0x6e, +0xa3,0xef,0x16,0x6d,0x75,0x6e,0x64,0x61,0x72,0x69,0xa5,0x47,0x67,0xc4,0x5d,0x6a, +0xc1,0xe4,0x6a,0xa2,0xdf,0x6b,0xa2,0xf8,0x6c,4,0x61,0x54,0x65,0xa2,0x6b,0x69, +0xa2,0x82,0x6f,0xa2,0xc1,0x79,1,0x63,0x2e,0x64,0x12,0x69,0x61,0x6e,0xa3,0xa9, +0x12,0x69,0x61,0x6e,0xa3,0xa7,1,0x6f,0x55,0x74,0x11,0x69,0x6e,1,0x31,0x96, +0x65,0x11,0x78,0x74,6,0x64,0x21,0x64,0xa3,0x95,0x65,0x2c,0x66,0xa5,0x39,0x67, +0xa5,0x3a,0xa2,0xe7,0x13,0x6e,0x64,0x65,0x64,6,0x64,0xc,0x64,0xa3,0x95,0x65, +0xa3,0xe7,0x66,0xa5,0x39,0x67,0xa5,0x3a,0x61,0x2a,0x62,0x29,0x63,0xa3,0x94,0x26, +0x18,0x64,0x64,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x6d,0x24,0x12,0x73,0x75,0x70, +0x24,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x25,1,0x70,0x42,0x74,0x1d,0x74, +0x65,0x72,0x6c,0x69,0x6b,0x65,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0x79,0x12,0x63, +0x68,0x61,0xa3,0x9c,2,0x6d,0x4e,0x6e,0x54,0x73,0x10,0x75,0xa2,0xb0,0x12,0x73, +0x75,0x70,0xa4,0x31,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa5,0x31,0x11,0x62, +0x75,0xa3,0x6f,0x12,0x65,0x61,0x72,1,0x61,0xa3,0xe8,0x62,1,0x69,0x38,0x73, +0x17,0x79,0x6c,0x6c,0x61,0x62,0x61,0x72,0x79,0xa3,0x75,0x17,0x64,0x65,0x6f,0x67, +0x72,0x61,0x6d,0x73,0xa3,0x76,0x1a,0x77,0x73,0x75,0x72,0x72,0x6f,0x67,0x61,0x74, +0x65,0x73,0xa3,0x4d,0x10,0x61,1,0x6d,0x32,0x76,0x14,0x61,0x6e,0x65,0x73,0x65, +0xa3,0xb5,0x10,0x6f,0x5c,0x12,0x65,0x78,0x74,1,0x61,0xa3,0xb4,0x62,0xa3,0xb9, +1,0x61,0xa2,0x43,0x68,4,0x61,0x40,0x69,0x50,0x6d,0x6e,0x6f,0x86,0x75,0x15, +0x64,0x61,0x77,0x61,0x64,0x69,0xa3,0xe6,0x16,0x72,0x6f,0x73,0x68,0x74,0x68,0x69, +0xa3,0x89,0x1d,0x74,0x61,0x6e,0x73,0x6d,0x61,0x6c,0x6c,0x73,0x63,0x72,0x69,0x70, +0x74,0xa5,0x30,0x11,0x65,0x72,0x68,0x16,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3, +0x71,0x12,0x6a,0x6b,0x69,0xa3,0xe5,5,0x74,0x35,0x74,0x34,0x77,0x7a,0x79,0x13, +0x61,0x68,0x6c,0x69,0xa3,0xa2,0x14,0x61,0x6b,0x61,0x6e,0x61,0x9e,1,0x65,0x4c, +0x70,0x10,0x68,0x1f,0x6f,0x6e,0x65,0x74,0x69,0x63,0x65,0x78,0x74,0x65,0x6e,0x73, +0x69,0x6f,0x6e,0x73,0xa3,0x6b,0x11,0x78,0x74,0xa3,0x6b,0x10,0x69,0xa5,0x46,0x69, +0xa2,0x4e,0x6b,0xa2,0x51,0x6e,3,0x61,0x34,0x62,0x84,0x67,0x8a,0x6e,0x12,0x61, +0x64,0x61,0x4d,1,0x65,0x40,0x73,0x11,0x75,0x70,0xa2,0xcb,0x16,0x70,0x6c,0x65, +0x6d,0x65,0x6e,0x74,0xa3,0xcb,0x11,0x78,0x74,2,0x61,0xa5,0x13,0x62,0xa5,0x38, +0x65,0x13,0x6e,0x64,0x65,0x64,1,0x61,0xa5,0x13,0x62,0xa5,0x38,0x11,0x75,0x6e, +0xa3,0x42,0x11,0x78,0x69,0x96,0x17,0x72,0x61,0x64,0x69,0x63,0x61,0x6c,0x73,0x97, +0x12,0x74,0x68,0x69,0xa3,0xc1,0x1c,0x74,0x6f,0x76,0x69,0x6b,0x6e,0x75,0x6d,0x65, +0x72,0x61,0x6c,0x73,0xa5,0x45,0x67,0xa2,0xb5,0x68,0xa4,0x84,0x69,3,0x64,0x4c, +0x6d,0xa2,0x55,0x6e,0xa2,0x62,0x70,0x13,0x61,0x65,0x78,0x74,0x2a,0x16,0x65,0x6e, +0x73,0x69,0x6f,0x6e,0x73,0x2b,1,0x63,0x99,0x65,0x17,0x6f,0x67,0x72,0x61,0x70, +0x68,0x69,0x63,1,0x64,0x56,0x73,0x15,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa4,0xb, +0x1d,0x61,0x6e,0x64,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xa5, +0xb,0x13,0x65,0x73,0x63,0x72,0x1f,0x69,0x70,0x74,0x69,0x6f,0x6e,0x63,0x68,0x61, +0x72,0x61,0x63,0x74,0x65,0x72,0x73,0x99,0x1c,0x70,0x65,0x72,0x69,0x61,0x6c,0x61, +0x72,0x61,0x6d,0x61,0x69,0x63,0xa3,0xba,1,0x64,0x62,0x73,0x1b,0x63,0x72,0x69, +0x70,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x70,0x61,1,0x68,0x32,0x72,0x14,0x74,0x68, +0x69,0x61,0x6e,0xa3,0xbd,0x13,0x6c,0x61,0x76,0x69,0xa3,0xbe,0x11,0x69,0x63,1, +0x6e,0x3e,0x73,0x1a,0x69,0x79,0x61,0x71,0x6e,0x75,0x6d,0x62,0x65,0x72,0x73,0xa5, +0x1e,0x19,0x75,0x6d,0x62,0x65,0x72,0x66,0x6f,0x72,0x6d,0x73,0xa3,0xb2,4,0x65, +0x74,0x6c,0xa2,0x82,0x6f,0xa2,0x9a,0x72,0xa2,0x9e,0x75,2,0x6a,0x34,0x6e,0x3e, +0x72,0x14,0x6d,0x75,0x6b,0x68,0x69,0x43,0x14,0x61,0x72,0x61,0x74,0x69,0x45,0x18, +0x6a,0x61,0x6c,0x61,0x67,0x6f,0x6e,0x64,0x69,0xa5,0x1c,1,0x6e,0xa2,0x46,0x6f, +1,0x6d,0x6e,0x72,0x13,0x67,0x69,0x61,0x6e,0x5a,1,0x65,0x40,0x73,0x11,0x75, +0x70,0xa2,0x87,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0x87,0x11,0x78,0x74, +0xa4,0x1b,0x14,0x65,0x6e,0x64,0x65,0x64,0xa5,0x1b,0x1a,0x65,0x74,0x72,0x69,0x63, +0x73,0x68,0x61,0x70,0x65,0x73,0x8c,0x12,0x65,0x78,0x74,0xa2,0xe3,0x14,0x65,0x6e, +0x64,0x65,0x64,0xa3,0xe3,0x1e,0x65,0x72,0x61,0x6c,0x70,0x75,0x6e,0x63,0x74,0x75, +0x61,0x74,0x69,0x6f,0x6e,0x71,0x17,0x61,0x67,0x6f,0x6c,0x69,0x74,0x69,0x63,0xa2, +0x88,0x12,0x73,0x75,0x70,0xa4,0xa,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa5, +0xa,0x13,0x74,0x68,0x69,0x63,0xa3,0x59,1,0x61,0x5c,0x65,0x11,0x65,0x6b,0x30, +1,0x61,0x38,0x65,0x11,0x78,0x74,0x6e,0x14,0x65,0x6e,0x64,0x65,0x64,0x6f,0x17, +0x6e,0x64,0x63,0x6f,0x70,0x74,0x69,0x63,0x31,0x13,0x6e,0x74,0x68,0x61,0xa3,0xe4, +2,0x61,0xa2,0x48,0x65,0xa2,0xdf,0x69,1,0x67,0x30,0x72,0x14,0x61,0x67,0x61, +0x6e,0x61,0x9d,0x10,0x68,1,0x70,0x3a,0x73,0x18,0x75,0x72,0x72,0x6f,0x67,0x61, +0x74,0x65,0x73,0xa3,0x4b,1,0x72,0x3c,0x75,0x19,0x73,0x75,0x72,0x72,0x6f,0x67, +0x61,0x74,0x65,0x73,0xa3,0x4c,0x11,0x69,0x76,0x1f,0x61,0x74,0x65,0x75,0x73,0x65, +0x73,0x75,0x72,0x72,0x6f,0x67,0x61,0x74,0x65,0x73,0xa3,0x4c,2,0x6c,0x32,0x6e, +0x9a,0x74,0x12,0x72,0x61,0x6e,0xa5,2,0x10,0x66,2,0x61,0x58,0x6d,0x70,0x77, +0x14,0x69,0x64,0x74,0x68,0x61,0x1f,0x6e,0x64,0x66,0x75,0x6c,0x6c,0x77,0x69,0x64, +0x74,0x68,0x66,0x6f,0x72,0x6d,0x73,0xa3,0x57,0x1a,0x6e,0x64,0x66,0x75,0x6c,0x6c, +0x66,0x6f,0x72,0x6d,0x73,0xa3,0x57,0x13,0x61,0x72,0x6b,0x73,0xa3,0x52,2,0x67, +0x34,0x69,0xa2,0x45,0x75,0x12,0x6e,0x6f,0x6f,0xa3,0x63,0x11,0x75,0x6c,0xa2,0x4a, +2,0x63,0x3c,0x6a,0x5e,0x73,0x17,0x79,0x6c,0x6c,0x61,0x62,0x6c,0x65,0x73,0xa3, +0x4a,0x1f,0x6f,0x6d,0x70,0x61,0x74,0x69,0x62,0x69,0x6c,0x69,0x74,0x79,0x6a,0x61, +0x6d,0x6f,0xa3,0x41,0x12,0x61,0x6d,0x6f,0x5c,0x17,0x65,0x78,0x74,0x65,0x6e,0x64, +0x65,0x64,1,0x61,0xa3,0xb4,0x62,0xa3,0xb9,0x19,0x66,0x69,0x72,0x6f,0x68,0x69, +0x6e,0x67,0x79,0x61,0xa5,0x1d,0x13,0x62,0x72,0x65,0x77,0x37,0x61,0xa4,0xc,0x62, +0xa6,0x59,0x63,0xa8,0x2e,0x64,0xac,0xe9,0x65,5,0x6d,0xa9,0x6d,0x94,0x6e,0xa2, +0x41,0x74,0x15,0x68,0x69,0x6f,0x70,0x69,0x63,0x5e,1,0x65,0x40,0x73,0x11,0x75, +0x70,0xa2,0x86,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0x86,0x11,0x78,0x74, +0xa2,0x85,2,0x61,0xa3,0xc8,0x62,0xa5,0x37,0x65,0x13,0x6e,0x64,0x65,0x64,0xa2, +0x85,1,0x61,0xa3,0xc8,0x62,0xa5,0x37,0x16,0x6f,0x74,0x69,0x63,0x6f,0x6e,0x73, +0xa3,0xce,0x15,0x63,0x6c,0x6f,0x73,0x65,0x64,2,0x61,0x5a,0x63,0x9e,0x69,0x1c, +0x64,0x65,0x6f,0x67,0x72,0x61,0x70,0x68,0x69,0x63,0x73,0x75,0x70,0xa2,0xc4,0x16, +0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0xc4,0x16,0x6c,0x70,0x68,0x61,0x6e,0x75, +0x6d,0x86,1,0x65,0x2c,0x73,0x11,0x75,0x70,0xa3,0xc3,0x13,0x72,0x69,0x63,0x73, +0x86,0x18,0x75,0x70,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0xc3,0x11,0x6a,0x6b, +0xa2,0x44,0x1f,0x6c,0x65,0x74,0x74,0x65,0x72,0x73,0x61,0x6e,0x64,0x6d,0x6f,0x6e, +0x74,0x68,0x73,0xa3,0x44,0x61,0x4a,0x67,0x76,0x6c,1,0x62,0x30,0x79,0x13,0x6d, +0x61,0x69,0x63,0xa5,0x25,0x13,0x61,0x73,0x61,0x6e,0xa3,0xe2,0x13,0x72,0x6c,0x79, +0x64,0x1f,0x79,0x6e,0x61,0x73,0x74,0x69,0x63,0x63,0x75,0x6e,0x65,0x69,0x66,0x6f, +0x72,0x6d,0xa5,1,0x1f,0x79,0x70,0x74,0x69,0x61,0x6e,0x68,0x69,0x65,0x72,0x6f, +0x67,0x6c,0x79,0x70,0x68,1,0x66,0x26,0x73,0xa3,0xc2,0x1c,0x6f,0x72,0x6d,0x61, +0x74,0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x73,0xa5,0x24,7,0x6e,0xc0,0xf2,0x6e, +0x3e,0x72,0xa2,0x5d,0x73,0xa2,0xe5,0x76,0x14,0x65,0x73,0x74,0x61,0x6e,0xa3,0xbc, +1,0x61,0x92,0x63,0x13,0x69,0x65,0x6e,0x74,1,0x67,0x34,0x73,0x15,0x79,0x6d, +0x62,0x6f,0x6c,0x73,0xa3,0xa5,0x13,0x72,0x65,0x65,0x6b,1,0x6d,0x34,0x6e,0x15, +0x75,0x6d,0x62,0x65,0x72,0x73,0xa3,0x7f,0x13,0x75,0x73,0x69,0x63,0xa2,0x7e,0x19, +0x61,0x6c,0x6e,0x6f,0x74,0x61,0x74,0x69,0x6f,0x6e,0xa3,0x7e,0x10,0x74,0x1f,0x6f, +0x6c,0x69,0x61,0x6e,0x68,0x69,0x65,0x72,0x6f,0x67,0x6c,0x79,0x70,0x68,0x73,0xa3, +0xfe,2,0x61,0x32,0x6d,0xa2,0x7e,0x72,0x12,0x6f,0x77,0x73,0x7d,0x12,0x62,0x69, +0x63,0x38,3,0x65,0x4a,0x6d,0x80,0x70,0xa2,0x50,0x73,0x11,0x75,0x70,0xa2,0x80, +0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0x80,0x11,0x78,0x74,3,0x61,0xa3, +0xd2,0x62,0xa5,0x35,0x63,0xa5,0x41,0x65,0x13,0x6e,0x64,0x65,0x64,2,0x61,0xa3, +0xd2,0x62,0xa5,0x35,0x63,0xa5,0x41,0x12,0x61,0x74,0x68,0xa2,0xd3,0x18,0x65,0x6d, +0x61,0x74,0x69,0x63,0x61,0x6c,0x61,0x1f,0x6c,0x70,0x68,0x61,0x62,0x65,0x74,0x69, +0x63,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0xd3,1,0x66,0x42,0x72,0x1e,0x65, +0x73,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x66,0x6f,0x72,0x6d,0x73,1,0x61, +0xa3,0x51,0x62,0xa3,0x55,0x14,0x65,0x6e,0x69,0x61,0x6e,0x35,0x12,0x63,0x69,0x69, +0x23,0x64,0x9e,0x65,0xa2,0x42,0x68,0xa2,0x4d,0x6c,1,0x63,0x62,0x70,0x17,0x68, +0x61,0x62,0x65,0x74,0x69,0x63,0x70,1,0x66,0xa3,0x50,0x72,0x1e,0x65,0x73,0x65, +0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x66,0x6f,0x72,0x6d,0x73,0xa3,0x50,0x16,0x68, +0x65,0x6d,0x69,0x63,0x61,0x6c,0xa2,0xd0,0x16,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73, +0xa3,0xd0,0x12,0x6c,0x61,0x6d,0xa5,7,0x1a,0x67,0x65,0x61,0x6e,0x6e,0x75,0x6d, +0x62,0x65,0x72,0x73,0xa3,0x77,0x11,0x6f,0x6d,0xa3,0xfd,7,0x6f,0x71,0x6f,0x64, +0x72,0xa2,0x41,0x75,0xa2,0x58,0x79,0x1b,0x7a,0x61,0x6e,0x74,0x69,0x6e,0x65,0x6d, +0x75,0x73,0x69,0x63,0xa2,0x5b,0x18,0x61,0x6c,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73, +0xa3,0x5b,1,0x70,0x34,0x78,0x16,0x64,0x72,0x61,0x77,0x69,0x6e,0x67,0x89,0x14, +0x6f,0x6d,0x6f,0x66,0x6f,0xa0,0x12,0x65,0x78,0x74,0xa2,0x43,0x14,0x65,0x6e,0x64, +0x65,0x64,0xa3,0x43,0x10,0x61,1,0x68,0x40,0x69,0x12,0x6c,0x6c,0x65,0x92,0x17, +0x70,0x61,0x74,0x74,0x65,0x72,0x6e,0x73,0x93,0x11,0x6d,0x69,0xa3,0xc9,1,0x67, +0x2c,0x68,0x11,0x69,0x64,0xa3,0x64,0x14,0x69,0x6e,0x65,0x73,0x65,0xa3,0x81,0x61, +0x48,0x65,0xa2,0x4e,0x68,0xa2,0x52,0x6c,0x1a,0x6f,0x63,0x6b,0x65,0x6c,0x65,0x6d, +0x65,0x6e,0x74,0x73,0x8b,3,0x6c,0x34,0x6d,0x40,0x73,0x66,0x74,0x11,0x61,0x6b, +0xa3,0xc7,0x14,0x69,0x6e,0x65,0x73,0x65,0xa3,0x93,0x11,0x75,0x6d,0xa2,0xb1,0x12, +0x73,0x75,0x70,0xa2,0xca,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0xca,1, +0x69,0x30,0x73,0x13,0x61,0x76,0x61,0x68,0xa3,0xdd,0x15,0x63,0x6c,0x61,0x74,0x69, +0x6e,0x23,0x14,0x6e,0x67,0x61,0x6c,0x69,0x41,0x16,0x61,0x69,0x6b,0x73,0x75,0x6b, +0x69,0xa5,8,5,0x6f,0xc1,0x60,0x6f,0xa2,0x69,0x75,0xa4,0x24,0x79,1,0x70, +0xa2,0x44,0x72,0x14,0x69,0x6c,0x6c,0x69,0x63,0x32,1,0x65,0x4c,0x73,0x11,0x75, +0x70,0xa2,0x61,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa2,0x61,0x12,0x61,0x72, +0x79,0xa3,0x61,0x11,0x78,0x74,4,0x61,0xa3,0x9e,0x62,0xa3,0xa0,0x63,0xa5,9, +0x64,0xa5,0x43,0x65,0x13,0x6e,0x64,0x65,0x64,3,0x61,0xa3,0x9e,0x62,0xa3,0xa0, +0x63,0xa5,9,0x64,0xa5,0x43,0x10,0x72,1,0x69,0x34,0x6f,0x15,0x6d,0x69,0x6e, +0x6f,0x61,0x6e,0xa5,0x36,0x1a,0x6f,0x74,0x73,0x79,0x6c,0x6c,0x61,0x62,0x61,0x72, +0x79,0xa3,0x7b,3,0x6d,0x5a,0x6e,0xa2,0x95,0x70,0xa2,0xa0,0x75,0x17,0x6e,0x74, +0x69,0x6e,0x67,0x72,0x6f,0x64,0xa2,0x9a,0x17,0x6e,0x75,0x6d,0x65,0x72,0x61,0x6c, +0x73,0xa3,0x9a,2,0x62,0x3a,0x6d,0xa2,0x5f,0x70,0x15,0x61,0x74,0x6a,0x61,0x6d, +0x6f,0xa3,0x41,0x14,0x69,0x6e,0x69,0x6e,0x67,2,0x64,0x46,0x68,0x9e,0x6d,0x1d, +0x61,0x72,0x6b,0x73,0x66,0x6f,0x72,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0x77,0x1e, +0x69,0x61,0x63,0x72,0x69,0x74,0x69,0x63,0x61,0x6c,0x6d,0x61,0x72,0x6b,0x73,0x2e, +2,0x65,0x40,0x66,0xa6,0x52,0x73,0x18,0x75,0x70,0x70,0x6c,0x65,0x6d,0x65,0x6e, +0x74,0xa3,0x83,0x16,0x78,0x74,0x65,0x6e,0x64,0x65,0x64,0xa3,0xe0,0x17,0x61,0x6c, +0x66,0x6d,0x61,0x72,0x6b,0x73,0xa3,0x52,0x11,0x6f,0x6e,0x1f,0x69,0x6e,0x64,0x69, +0x63,0x6e,0x75,0x6d,0x62,0x65,0x72,0x66,0x6f,0x72,0x6d,0x73,0xa3,0xb2,0x1b,0x74, +0x72,0x6f,0x6c,0x70,0x69,0x63,0x74,0x75,0x72,0x65,0x73,0x83,0x12,0x74,0x69,0x63, +0xa2,0x84,0x1b,0x65,0x70,0x61,0x63,0x74,0x6e,0x75,0x6d,0x62,0x65,0x72,0x73,0xa3, +0xdf,1,0x6e,0x3e,0x72,0x1b,0x72,0x65,0x6e,0x63,0x79,0x73,0x79,0x6d,0x62,0x6f, +0x6c,0x73,0x75,0x15,0x65,0x69,0x66,0x6f,0x72,0x6d,0xa2,0x98,0x16,0x6e,0x75,0x6d, +0x62,0x65,0x72,0x73,0xa2,0x99,0x1d,0x61,0x6e,0x64,0x70,0x75,0x6e,0x63,0x74,0x75, +0x61,0x74,0x69,0x6f,0x6e,0xa3,0x99,0x61,0xa2,0xea,0x68,0xa4,0x14,0x6a,0x10,0x6b, +0xa2,0x47,4,0x63,0x92,0x65,0xa2,0x83,0x72,0xa2,0xa1,0x73,0xa2,0xb3,0x75,0x1f, +0x6e,0x69,0x66,0x69,0x65,0x64,0x69,0x64,0x65,0x6f,0x67,0x72,0x61,0x70,0x68,0x73, +0xa2,0x47,0x18,0x65,0x78,0x74,0x65,0x6e,0x73,0x69,0x6f,0x6e,8,0x65,0x71,0x65, +0xa5,0,0x66,0xa5,0x12,0x67,0xa5,0x2e,0x68,0xa5,0x42,0x69,0xa5,0x48,0x14,0x6f, +0x6d,0x70,0x61,0x74,0xa2,0x45,1,0x66,0x96,0x69,1,0x62,0x44,0x64,0x17,0x65, +0x6f,0x67,0x72,0x61,0x70,0x68,0x73,0xa2,0x4f,0x12,0x73,0x75,0x70,0xa3,0x5f,0x14, +0x69,0x6c,0x69,0x74,0x79,0xa2,0x45,1,0x66,0x54,0x69,0x18,0x64,0x65,0x6f,0x67, +0x72,0x61,0x70,0x68,0x73,0xa2,0x4f,0x19,0x73,0x75,0x70,0x70,0x6c,0x65,0x6d,0x65, +0x6e,0x74,0xa3,0x5f,0x13,0x6f,0x72,0x6d,0x73,0xa3,0x53,0x11,0x78,0x74,8,0x65, +0xf,0x65,0xa5,0,0x66,0xa5,0x12,0x67,0xa5,0x2e,0x68,0xa5,0x42,0x69,0xa5,0x48, +0x61,0xa3,0x46,0x62,0xa3,0x5e,0x63,0xa3,0xc5,0x64,0xa3,0xd1,0x19,0x61,0x64,0x69, +0x63,0x61,0x6c,0x73,0x73,0x75,0x70,0x94,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74, +0x95,1,0x74,0x50,0x79,0x14,0x6d,0x62,0x6f,0x6c,0x73,0x9a,0x1d,0x61,0x6e,0x64, +0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x9b,0x14,0x72,0x6f,0x6b, +0x65,0x73,0xa3,0x82,2,0x6e,0x48,0x72,0x64,0x75,0x1d,0x63,0x61,0x73,0x69,0x61, +0x6e,0x61,0x6c,0x62,0x61,0x6e,0x69,0x61,0x6e,0xa3,0xde,0x1d,0x61,0x64,0x69,0x61, +0x6e,0x73,0x79,0x6c,0x6c,0x61,0x62,0x69,0x63,0x73,0x63,0x12,0x69,0x61,0x6e,0xa3, +0xa8,2,0x61,0x3a,0x65,0x4c,0x6f,0x16,0x72,0x61,0x73,0x6d,0x69,0x61,0x6e,0xa5, +0x2d,1,0x6b,0x26,0x6d,0xa3,0xa4,0x11,0x6d,0x61,0xa3,0xd4,1,0x72,0x38,0x73, +0x17,0x73,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa5,0x19,0x13,0x6f,0x6b,0x65,0x65, +0x60,0x12,0x73,0x75,0x70,0xa2,0xff,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3, +0xff,3,0x65,0x3e,0x69,0x8e,0x6f,0xa2,0x71,0x75,0x15,0x70,0x6c,0x6f,0x79,0x61, +0x6e,0xa3,0xe1,1,0x73,0x60,0x76,0x16,0x61,0x6e,0x61,0x67,0x61,0x72,0x69,0x3e, +0x12,0x65,0x78,0x74,0xa2,0xb3,1,0x61,0xa5,0x44,0x65,0x13,0x6e,0x64,0x65,0x64, +0xa2,0xb3,0x10,0x61,0xa5,0x44,0x13,0x65,0x72,0x65,0x74,0xa3,0x5a,2,0x61,0x3a, +0x6e,0x82,0x76,0x16,0x65,0x73,0x61,0x6b,0x75,0x72,0x75,0xa5,0x2f,0x18,0x63,0x72, +0x69,0x74,0x69,0x63,0x61,0x6c,0x73,0x2e,2,0x65,0x30,0x66,0x36,0x73,0x11,0x75, +0x70,0xa3,0x83,0x11,0x78,0x74,0xa3,0xe0,0x18,0x6f,0x72,0x73,0x79,0x6d,0x62,0x6f, +0x6c,0x73,0x77,0x14,0x67,0x62,0x61,0x74,0x73,0x91,1,0x67,0x3e,0x6d,0x12,0x69, +0x6e,0x6f,0xa2,0xab,0x14,0x74,0x69,0x6c,0x65,0x73,0xa3,0xab,0x11,0x72,0x61,0xa5, +0x1a,8,0x6d,0x5f,0x6d,0x3a,0x6e,0x48,0x73,0x7a,0x76,0xa2,0x4b,0x77,0x12,0x69, +0x64,0x65,0x43,0x11,0x65,0x64,0x32,0x12,0x69,0x61,0x6c,0x33,2,0x61,0x40,0x62, +0x37,0x6f,1,0x62,0x28,0x6e,0x10,0x65,0x21,0x13,0x72,0x65,0x61,0x6b,0x37,0x10, +0x72,0x34,0x12,0x72,0x6f,0x77,0x35,2,0x6d,0x38,0x71,0x46,0x75,1,0x62,0x3d, +0x70,0x3e,0x11,0x65,0x72,0x3f,1,0x61,0x24,0x6c,0x39,0x11,0x6c,0x6c,0x39,1, +0x72,0x3b,0x75,0x12,0x61,0x72,0x65,0x3b,0x12,0x65,0x72,0x74,0x40,0x13,0x69,0x63, +0x61,0x6c,0x41,0x63,0x58,0x65,0x92,0x66,0x96,0x69,1,0x6e,0x36,0x73,0x10,0x6f, +0x30,0x14,0x6c,0x61,0x74,0x65,0x64,0x31,0x11,0x69,0x74,0x2e,0x12,0x69,0x61,0x6c, +0x2f,2,0x61,0x36,0x69,0x48,0x6f,0x10,0x6d,0x24,0x12,0x70,0x61,0x74,0x25,0x10, +0x6e,0x22,0x15,0x6f,0x6e,0x69,0x63,0x61,0x6c,0x23,0x13,0x72,0x63,0x6c,0x65,0x27, +0x11,0x6e,0x63,0x27,2,0x69,0x3a,0x6f,0x44,0x72,0x10,0x61,0x2c,0x14,0x63,0x74, +0x69,0x6f,0x6e,0x2d,0x10,0x6e,0x28,0x11,0x61,0x6c,0x29,0x11,0x6e,0x74,0x2b,4, +0x61,0x3a,0x66,0x4c,0x68,0x5e,0x6e,0x70,0x77,0x2a,0x12,0x69,0x64,0x65,0x2b,0x22, +0x17,0x6d,0x62,0x69,0x67,0x75,0x6f,0x75,0x73,0x23,0x26,0x17,0x75,0x6c,0x6c,0x77, +0x69,0x64,0x74,0x68,0x27,0x24,0x17,0x61,0x6c,0x66,0x77,0x69,0x64,0x74,0x68,0x25, +0x20,1,0x61,0x30,0x65,0x14,0x75,0x74,0x72,0x61,0x6c,0x21,0x28,0x13,0x72,0x72, +0x6f,0x77,0x29,0xd,0x6e,0xc0,0xfb,0x73,0x6d,0x73,0x3a,0x74,0x98,0x75,0xa2,0x49, +0x7a,2,0x6c,0x3b,0x70,0x3d,0x73,0x39,5,0x6f,0x28,0x6f,0x57,0x70,0x34,0x75, +0x16,0x72,0x72,0x6f,0x67,0x61,0x74,0x65,0x45,0x11,0x61,0x63,1,0x65,0x32,0x69, +0x15,0x6e,0x67,0x6d,0x61,0x72,0x6b,0x31,0x18,0x73,0x65,0x70,0x61,0x72,0x61,0x74, +0x6f,0x72,0x39,0x63,0x53,0x6b,0x55,0x6d,0x51,0x1d,0x69,0x74,0x6c,0x65,0x63,0x61, +0x73,0x65,0x6c,0x65,0x74,0x74,0x65,0x72,0x27,1,0x6e,0x40,0x70,0x1c,0x70,0x65, +0x72,0x63,0x61,0x73,0x65,0x6c,0x65,0x74,0x74,0x65,0x72,0x23,0x17,0x61,0x73,0x73, +0x69,0x67,0x6e,0x65,0x64,0x21,0x6e,0x8a,0x6f,0xa2,0x47,0x70,8,0x66,0x14,0x66, +0x5b,0x69,0x59,0x6f,0x4f,0x72,0x24,0x73,0x49,0x17,0x69,0x76,0x61,0x74,0x65,0x75, +0x73,0x65,0x43,0x61,0x2c,0x63,0x4d,0x64,0x47,0x65,0x4b,0x1f,0x72,0x61,0x67,0x72, +0x61,0x70,0x68,0x73,0x65,0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0x3d,2,0x64,0x33, +0x6c,0x35,0x6f,0x36,0x1b,0x6e,0x73,0x70,0x61,0x63,0x69,0x6e,0x67,0x6d,0x61,0x72, +0x6b,0x2d,1,0x70,0x7c,0x74,0x12,0x68,0x65,0x72,3,0x6c,0x38,0x6e,0x42,0x70, +0x4c,0x73,0x14,0x79,0x6d,0x62,0x6f,0x6c,0x57,0x14,0x65,0x74,0x74,0x65,0x72,0x2b, +0x14,0x75,0x6d,0x62,0x65,0x72,0x37,0x19,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69, +0x6f,0x6e,0x4f,0x1c,0x65,0x6e,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f, +0x6e,0x49,0x66,0x9e,0x66,0x88,0x69,0xa2,0x4b,0x6c,0xa2,0x5c,0x6d,4,0x61,0x60, +0x63,0x31,0x65,0x2f,0x6e,0x2d,0x6f,0x15,0x64,0x69,0x66,0x69,0x65,0x72,1,0x6c, +0x30,0x73,0x14,0x79,0x6d,0x62,0x6f,0x6c,0x55,0x14,0x65,0x74,0x74,0x65,0x72,0x29, +0x17,0x74,0x68,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x51,1,0x69,0x2e,0x6f,0x13,0x72, +0x6d,0x61,0x74,0x41,0x1d,0x6e,0x61,0x6c,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74, +0x69,0x6f,0x6e,0x5b,0x10,0x6e,0x1f,0x69,0x74,0x69,0x61,0x6c,0x70,0x75,0x6e,0x63, +0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x59,6,0x6d,0x18,0x6d,0x29,0x6f,0x28,0x74, +0x27,0x75,0x23,0x2a,0x1c,0x77,0x65,0x72,0x63,0x61,0x73,0x65,0x6c,0x65,0x74,0x74, +0x65,0x72,0x25,0x65,0x28,0x69,0x3c,0x6c,0x25,0x19,0x74,0x74,0x65,0x72,0x6e,0x75, +0x6d,0x62,0x65,0x72,0x35,0x1a,0x6e,0x65,0x73,0x65,0x70,0x61,0x72,0x61,0x74,0x6f, +0x72,0x3b,0x63,0x44,0x64,0xa2,0x60,0x65,0x1b,0x6e,0x63,0x6c,0x6f,0x73,0x69,0x6e, +0x67,0x6d,0x61,0x72,0x6b,0x2f,6,0x6e,0x39,0x6e,0x46,0x6f,0x4e,0x73,0x45,0x75, +0x1b,0x72,0x72,0x65,0x6e,0x63,0x79,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x53,0x20,0x12, +0x74,0x72,0x6c,0x3f,0x42,0x10,0x6e,1,0x6e,0x2c,0x74,0x12,0x72,0x6f,0x6c,0x3f, +0x1f,0x65,0x63,0x74,0x6f,0x72,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f, +0x6e,0x4d,0x63,0x3f,0x66,0x41,0x6c,0x1d,0x6f,0x73,0x65,0x70,0x75,0x6e,0x63,0x74, +0x75,0x61,0x74,0x69,0x6f,0x6e,0x4b,2,0x61,0x30,0x65,0x4a,0x69,0x12,0x67,0x69, +0x74,0x33,0x1c,0x73,0x68,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e, +0x47,0x1a,0x63,0x69,0x6d,0x61,0x6c,0x6e,0x75,0x6d,0x62,0x65,0x72,0x33,0,0x13, +0x6e,0xc1,0xf,0x74,0x76,0x74,0x4c,0x76,0x9a,0x77,0xa2,0x48,0x79,0xa2,0x49,0x7a, +1,0x61,0x2c,0x68,0x12,0x61,0x69,0x6e,0x8b,0x11,0x69,0x6e,0x85,2,0x61,0x36, +0x65,0x3c,0x68,0x14,0x69,0x6e,0x79,0x65,0x68,0xa3,0x66,1,0x68,0x71,0x77,0x73, +1,0x68,0x28,0x74,0x10,0x68,0x77,0x16,0x6d,0x61,0x72,0x62,0x75,0x74,0x61,0x74, +0x13,0x67,0x6f,0x61,0x6c,0x3d,0x1a,0x65,0x72,0x74,0x69,0x63,0x61,0x6c,0x74,0x61, +0x69,0x6c,0xa3,0x67,0x11,0x61,0x77,0x79,1,0x65,0x32,0x75,0x11,0x64,0x68,0x80, +0x11,0x68,0x65,0x83,0x10,0x68,0x7a,1,0x62,0x34,0x77,0x16,0x69,0x74,0x68,0x74, +0x61,0x69,0x6c,0x7f,0x14,0x61,0x72,0x72,0x65,0x65,0x7d,0x6e,0xa2,0x4c,0x70,0xa2, +0x69,0x71,0xa2,0x69,0x72,0xa2,0x6f,0x73,5,0x74,0x22,0x74,0x38,0x77,0x4c,0x79, +0x16,0x72,0x69,0x61,0x63,0x77,0x61,0x77,0x6f,0x18,0x72,0x61,0x69,0x67,0x68,0x74, +0x77,0x61,0x77,0xa3,0x55,0x15,0x61,0x73,0x68,0x6b,0x61,0x66,0x6d,0x61,0x2e,0x65, +0x38,0x68,0x11,0x69,0x6e,0x6b,0x10,0x64,0x62,0x11,0x68,0x65,0x65,1,0x65,0x2e, +0x6d,0x13,0x6b,0x61,0x74,0x68,0x69,0x10,0x6e,0x67,2,0x6f,0x2c,0x75,0x50,0x79, +0x10,0x61,0x91,1,0x6a,0x28,0x6f,0x10,0x6e,0x55,0x1a,0x6f,0x69,0x6e,0x69,0x6e, +0x67,0x67,0x72,0x6f,0x75,0x70,0x21,0x10,0x6e,0x57,0x10,0x65,0x59,0x10,0x61,1, +0x66,0x5b,0x70,0x10,0x68,0x5d,1,0x65,0x38,0x6f,0x18,0x68,0x69,0x6e,0x67,0x79, +0x61,0x79,0x65,0x68,0x93,1,0x68,0x5f,0x76,0x16,0x65,0x72,0x73,0x65,0x64,0x70, +0x65,0x61,0x67,0xc1,0xc7,0x67,0xa4,0x52,0x68,0xa4,0x59,0x6b,0xa4,0x99,0x6c,0xa4, +0xb2,0x6d,2,0x61,0x2e,0x65,0xa4,0x3e,0x69,0x10,0x6d,0x53,1,0x6c,0xa2,0xe7, +0x6e,0x16,0x69,0x63,0x68,0x61,0x65,0x61,0x6e,0,0x12,0x6e,0x76,0x73,0x51,0x73, +0x3e,0x74,0x5c,0x77,0xa0,0x79,0xa2,0x42,0x7a,0x13,0x61,0x79,0x69,0x6e,0xa3,0x54, +0x10,0x61,1,0x64,0x2e,0x6d,0x12,0x65,0x6b,0x68,0xa3,0x4c,0x11,0x68,0x65,0xa3, +0x4b,3,0x61,0x38,0x65,0x3c,0x68,0x4a,0x77,0x13,0x65,0x6e,0x74,0x79,0xa3,0x51, +0x10,0x77,0xa3,0x4d,1,0x6e,0xa3,0x4e,0x74,0x10,0x68,0xa3,0x4f,0x14,0x61,0x6d, +0x65,0x64,0x68,0xa3,0x50,0x11,0x61,0x77,0xa3,0x52,0x12,0x6f,0x64,0x68,0xa3,0x53, +0x6e,0x3a,0x6f,0x40,0x70,0x46,0x71,0x4a,0x72,0x12,0x65,0x73,0x68,0xa3,0x4a,0x11, +0x75,0x6e,0xa3,0x46,0x11,0x6e,0x65,0xa3,0x47,0x10,0x65,0xa3,0x48,0x12,0x6f,0x70, +0x68,0xa3,0x49,0x67,0x33,0x67,0x38,0x68,0x40,0x6b,0x5e,0x6c,0x66,0x6d,0x11,0x65, +0x6d,0xa3,0x45,0x13,0x69,0x6d,0x65,0x6c,0xa1,1,0x65,0x32,0x75,0x14,0x6e,0x64, +0x72,0x65,0x64,0xa3,0x42,0x11,0x74,0x68,0xa3,0x41,0x12,0x61,0x70,0x68,0xa3,0x43, +0x14,0x61,0x6d,0x65,0x64,0x68,0xa3,0x44,0x61,0x34,0x62,0x4a,0x64,0x50,0x66,0x12, +0x69,0x76,0x65,0x9f,1,0x6c,0x2a,0x79,0x11,0x69,0x6e,0x97,0x12,0x65,0x70,0x68, +0x95,0x12,0x65,0x74,0x68,0x99,1,0x61,0x30,0x68,0x14,0x61,0x6d,0x65,0x64,0x68, +0x9d,0x13,0x6c,0x65,0x74,0x68,0x9b,0x15,0x61,0x79,0x61,0x6c,0x61,0x6d,6,0x6e, +0x2c,0x6e,0x34,0x72,0x5e,0x73,0x62,0x74,0x11,0x74,0x61,0xa3,0x63,2,0x67,0x2e, +0x6e,0x32,0x79,0x10,0x61,0xa3,0x60,0x10,0x61,0xa3,0x5d,1,0x61,0xa3,0x5e,0x6e, +0x10,0x61,0xa3,0x5f,0x10,0x61,0xa3,0x61,0x11,0x73,0x61,0xa3,0x62,0x62,0x3c,0x6a, +0x42,0x6c,0x10,0x6c,1,0x61,0xa3,0x5b,0x6c,0x10,0x61,0xa3,0x5c,0x11,0x68,0x61, +0xa3,0x59,0x10,0x61,0xa3,0x5a,0x11,0x65,0x6d,0x51,0x10,0x61,1,0x66,0x37,0x6d, +0x11,0x61,0x6c,0x39,1,0x61,0x40,0x65,0x3e,1,0x68,0x28,0x74,0x10,0x68,0x45, +0x40,0x13,0x67,0x6f,0x61,0x6c,0x43,2,0x68,0x3b,0x6d,0x5c,0x6e,0x1a,0x69,0x66, +0x69,0x72,0x6f,0x68,0x69,0x6e,0x67,0x79,0x61,1,0x6b,0x2a,0x70,0x10,0x61,0xa3, +0x65,0x15,0x69,0x6e,0x6e,0x61,0x79,0x61,0xa3,0x64,0x1a,0x7a,0x61,0x6f,0x6e,0x68, +0x65,0x68,0x67,0x6f,0x61,0x6c,0x3d,2,0x61,0x3a,0x68,0x44,0x6e,0x17,0x6f,0x74, +0x74,0x65,0x64,0x68,0x65,0x68,0x4b,1,0x66,0x47,0x70,0x10,0x68,0x49,0x12,0x61, +0x70,0x68,0x89,0x11,0x61,0x6d,0x4c,0x12,0x61,0x64,0x68,0x4f,0x61,0x6e,0x62,0xa2, +0x54,0x64,0xa2,0x70,0x65,0x31,0x66,2,0x61,0x3e,0x65,0x4a,0x69,0x19,0x6e,0x61, +0x6c,0x73,0x65,0x6d,0x6b,0x61,0x74,0x68,0x35,0x15,0x72,0x73,0x69,0x79,0x65,0x68, +0x8f,0x86,0x10,0x68,0x33,2,0x66,0x3c,0x69,0x70,0x6c,1,0x61,0x28,0x65,0x10, +0x66,0x27,0x11,0x70,0x68,0x25,0x14,0x72,0x69,0x63,0x61,0x6e,2,0x66,0x30,0x6e, +0x36,0x71,0x11,0x61,0x66,0xa3,0x58,0x11,0x65,0x68,0xa3,0x56,0x12,0x6f,0x6f,0x6e, +0xa3,0x57,0x10,0x6e,0x23,1,0x65,0x4a,0x75,0x10,0x72,0x1f,0x75,0x73,0x68,0x61, +0x73,0x6b,0x69,0x79,0x65,0x68,0x62,0x61,0x72,0x72,0x65,0x65,0x8d,1,0x68,0x29, +0x74,0x10,0x68,0x2b,0x11,0x61,0x6c,0x2c,0x16,0x61,0x74,0x68,0x72,0x69,0x73,0x68, +0x2f,7,0x6e,0x2e,0x6e,0x2c,0x72,0x3e,0x74,0x56,0x75,0x21,0x18,0x6f,0x6e,0x6a, +0x6f,0x69,0x6e,0x69,0x6e,0x67,0x21,0x28,0x1a,0x69,0x67,0x68,0x74,0x6a,0x6f,0x69, +0x6e,0x69,0x6e,0x67,0x29,0x2a,0x19,0x72,0x61,0x6e,0x73,0x70,0x61,0x72,0x65,0x6e, +0x74,0x2b,0x63,0x23,0x64,0x40,0x6a,0x56,0x6c,0x26,0x19,0x65,0x66,0x74,0x6a,0x6f, +0x69,0x6e,0x69,0x6e,0x67,0x27,0x24,0x19,0x75,0x61,0x6c,0x6a,0x6f,0x69,0x6e,0x69, +0x6e,0x67,0x25,0x19,0x6f,0x69,0x6e,0x63,0x61,0x75,0x73,0x69,0x6e,0x67,0x23,0, +0x14,0x6e,0xc0,0xe5,0x73,0x5e,0x77,0x23,0x77,0x40,0x78,0x58,0x7a,0x10,0x77,0x58, +1,0x6a,0x75,0x73,0x13,0x70,0x61,0x63,0x65,0x59,1,0x6a,0x5d,0x6f,0x17,0x72, +0x64,0x6a,0x6f,0x69,0x6e,0x65,0x72,0x5d,0x10,0x78,0x21,0x73,0x4a,0x75,0x7a,0x76, +1,0x66,0x7d,0x69,0x7e,0x13,0x72,0x61,0x6d,0x61,0x7e,0x14,0x66,0x69,0x6e,0x61, +0x6c,0x7d,4,0x61,0x51,0x67,0x53,0x70,0x28,0x75,0x30,0x79,0x57,0x54,0x12,0x61, +0x63,0x65,0x55,0x16,0x72,0x72,0x6f,0x67,0x61,0x74,0x65,0x53,0x15,0x6e,0x6b,0x6e, +0x6f,0x77,0x6e,0x21,0x6e,0x60,0x6f,0xa2,0x41,0x70,0xa2,0x50,0x71,0xa2,0x6e,0x72, +1,0x65,0x24,0x69,0x6f,0x1e,0x67,0x69,0x6f,0x6e,0x61,0x6c,0x69,0x6e,0x64,0x69, +0x63,0x61,0x74,0x6f,0x72,0x6f,4,0x65,0x3e,0x6c,0x5b,0x6f,0x46,0x73,0x45,0x75, +0x46,0x14,0x6d,0x65,0x72,0x69,0x63,0x47,0x15,0x78,0x74,0x6c,0x69,0x6e,0x65,0x5b, +0x17,0x6e,0x73,0x74,0x61,0x72,0x74,0x65,0x72,0x45,0x10,0x70,0x48,0x1c,0x65,0x6e, +0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x49,1,0x6f,0x3e,0x72, +0x4c,0x1a,0x65,0x66,0x69,0x78,0x6e,0x75,0x6d,0x65,0x72,0x69,0x63,0x4d,0x4a,0x1b, +0x73,0x74,0x66,0x69,0x78,0x6e,0x75,0x6d,0x65,0x72,0x69,0x63,0x4b,0x10,0x75,0x4e, +0x16,0x6f,0x74,0x61,0x74,0x69,0x6f,0x6e,0x4f,0x68,0x7b,0x68,0x50,0x69,0x86,0x6a, +0xa2,0x61,0x6c,0xa2,0x65,0x6d,0x1c,0x61,0x6e,0x64,0x61,0x74,0x6f,0x72,0x79,0x62, +0x72,0x65,0x61,0x6b,0x2d,4,0x32,0x5f,0x33,0x61,0x65,0x34,0x6c,0x6d,0x79,0x3a, +0x13,0x70,0x68,0x65,0x6e,0x3b,0x19,0x62,0x72,0x65,0x77,0x6c,0x65,0x74,0x74,0x65, +0x72,0x6d,2,0x64,0x28,0x6e,0x3c,0x73,0x41,0x3c,0x18,0x65,0x6f,0x67,0x72,0x61, +0x70,0x68,0x69,0x63,0x3d,0x3e,1,0x66,0x3e,0x73,0x11,0x65,0x70,1,0x61,0x22, +0x65,0x14,0x72,0x61,0x62,0x6c,0x65,0x3f,0x18,0x69,0x78,0x6e,0x75,0x6d,0x65,0x72, +0x69,0x63,0x41,2,0x6c,0x63,0x74,0x65,0x76,0x67,1,0x66,0x43,0x69,0x15,0x6e, +0x65,0x66,0x65,0x65,0x64,0x43,0x61,0x42,0x62,0xa2,0x49,0x63,0xa2,0x76,0x65,0xa2, +0xfc,0x67,0x10,0x6c,0x38,0x11,0x75,0x65,0x39,5,0x6d,0xf,0x6d,0x28,0x70,0x79, +0x73,0x7b,0x16,0x62,0x69,0x67,0x75,0x6f,0x75,0x73,0x23,0x69,0x23,0x6b,0x38,0x6c, +0x24,0x17,0x70,0x68,0x61,0x62,0x65,0x74,0x69,0x63,0x25,0x76,0x13,0x73,0x61,0x72, +0x61,0x76,1,0x70,0x2e,0x73,0x13,0x74,0x61,0x72,0x74,0x7b,0x15,0x72,0x65,0x62, +0x61,0x73,0x65,0x79,4,0x32,0x27,0x61,0x29,0x62,0x2b,0x6b,0x2d,0x72,0x12,0x65, +0x61,0x6b,2,0x61,0x36,0x62,0x3e,0x73,0x15,0x79,0x6d,0x62,0x6f,0x6c,0x73,0x57, +0x13,0x66,0x74,0x65,0x72,0x29,1,0x65,0x2a,0x6f,0x11,0x74,0x68,0x27,0x13,0x66, +0x6f,0x72,0x65,0x2b,7,0x6d,0x51,0x6d,0x33,0x6f,0x28,0x70,0x69,0x72,0x35,1, +0x6d,0x76,0x6e,1,0x64,0x3c,0x74,0x1a,0x69,0x6e,0x67,0x65,0x6e,0x74,0x62,0x72, +0x65,0x61,0x6b,0x2f,0x15,0x69,0x74,0x69,0x6f,0x6e,0x61,0x1f,0x6c,0x6a,0x61,0x70, +0x61,0x6e,0x65,0x73,0x65,0x73,0x74,0x61,0x72,0x74,0x65,0x72,0x6b,1,0x62,0x3a, +0x70,0x19,0x6c,0x65,0x78,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x51,0x18,0x69,0x6e, +0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0x33,0x61,0x6a,0x62,0x2f,0x6a,0x6b,0x6c,0x30, +0x13,0x6f,0x73,0x65,0x70,1,0x61,0x38,0x75,0x18,0x6e,0x63,0x74,0x75,0x61,0x74, +0x69,0x6f,0x6e,0x31,0x18,0x72,0x65,0x6e,0x74,0x68,0x65,0x73,0x69,0x73,0x69,0x1b, +0x72,0x72,0x69,0x61,0x67,0x65,0x72,0x65,0x74,0x75,0x72,0x6e,0x35,2,0x62,0x3e, +0x6d,0x46,0x78,0x36,0x18,0x63,0x6c,0x61,0x6d,0x61,0x74,0x69,0x6f,0x6e,0x37,0x70, +0x12,0x61,0x73,0x65,0x71,0x72,0x16,0x6f,0x64,0x69,0x66,0x69,0x65,0x72,0x73,1, +0x64,0x42,0x6e,1,0x6f,0x32,0x75,0x26,0x14,0x6d,0x65,0x72,0x69,0x63,0x27,0x11, +0x6e,0x65,0x21,1,0x65,0x2e,0x69,0x24,0x12,0x67,0x69,0x74,0x25,0x22,0x14,0x63, +0x69,0x6d,0x61,0x6c,0x23,0,0x18,0x6e,0xc4,0x6f,0x74,0xc1,0x91,0x77,0x96,0x77, +0xa2,0x4c,0x78,0xa2,0x70,0x79,0xa2,0x7a,0x7a,6,0x73,0x1e,0x73,0x34,0x78,0x42, +0x79,0x48,0x7a,0x11,0x7a,0x7a,0xa3,0x67,0x10,0x79,1,0x65,0xa3,0xae,0x6d,0xa3, +0x81,0x11,0x78,0x78,0xa3,0x66,0x11,0x79,0x79,0x21,0x61,0x30,0x69,0x58,0x6d,0x11, +0x74,0x68,0xa3,0x80,0x10,0x6e,1,0x61,0x26,0x62,0xa3,0xb1,0x1a,0x62,0x61,0x7a, +0x61,0x72,0x73,0x71,0x75,0x61,0x72,0x65,0xa3,0xb1,0x11,0x6e,0x68,0x23,2,0x61, +0x30,0x63,0x5a,0x6f,0x11,0x6c,0x65,0xa3,0x9b,1,0x6e,0x3c,0x72,0x10,0x61,0xa2, +0x92,0x15,0x6e,0x67,0x63,0x69,0x74,0x69,0xa3,0x92,0x12,0x63,0x68,0x6f,0xa3,0xbc, +0x11,0x68,0x6f,0xa3,0xbc,1,0x70,0x2c,0x73,0x11,0x75,0x78,0xa3,0x65,0x11,0x65, +0x6f,0x9b,1,0x65,0x2c,0x69,0x72,0x11,0x69,0x69,0x73,0x11,0x7a,0x69,0xa2,0xc0, +0x11,0x64,0x69,0xa3,0xc0,0x74,0x66,0x75,0xa2,0xde,0x76,1,0x61,0x48,0x69,1, +0x73,0x38,0x74,0x10,0x68,0xa2,0xc5,0x13,0x6b,0x75,0x71,0x69,0xa3,0xc5,0x10,0x70, +0xa3,0x64,0x10,0x69,0xa2,0x63,0x10,0x69,0xa3,0x63,7,0x68,0x3e,0x68,0x34,0x69, +0x48,0x6e,0x86,0x6f,0x11,0x74,0x6f,0xa3,0xc4,0x10,0x61,1,0x61,0x24,0x69,0x6d, +0x6a,0x11,0x6e,0x61,0x6b,2,0x62,0x3a,0x66,0x4a,0x72,0x10,0x68,0xa2,0x9e,0x12, +0x75,0x74,0x61,0xa3,0x9e,1,0x65,0x24,0x74,0x6f,0x12,0x74,0x61,0x6e,0x6f,0x14, +0x69,0x6e,0x61,0x67,0x68,0x99,0x11,0x73,0x61,0xa3,0xc3,0x61,0x36,0x65,0xa2,0x65, +0x66,0xa2,0x71,0x67,0x11,0x6c,0x67,0x75,6,0x6c,0x28,0x6c,0x32,0x6d,0x38,0x6e, +0x44,0x76,0x10,0x74,0xa3,0x7f,1,0x65,0x89,0x75,0x97,1,0x69,0x24,0x6c,0x67, +0x10,0x6c,0x67,0x10,0x67,0xa2,0x9a,1,0x73,0x2a,0x75,0x10,0x74,0xa3,0x9a,0x10, +0x61,0xa3,0xc3,0x67,0x36,0x69,0x52,0x6b,0x10,0x72,0xa2,0x99,0x10,0x69,0xa3,0x99, +1,0x61,0x30,0x62,0x7a,0x13,0x61,0x6e,0x77,0x61,0x7b,0x12,0x6c,0x6f,0x67,0x75, +2,0x6c,0x32,0x74,0x34,0x76,0x12,0x69,0x65,0x74,0xa3,0x7f,0x10,0x65,0x89,0x12, +0x68,0x61,0x6d,0xa3,0x6a,1,0x6c,0x2a,0x6e,0x10,0x67,0xa3,0x62,0x10,0x75,0x68, +0x11,0x67,0x75,0x69,0x11,0x6e,0x67,0x99,1,0x67,0x32,0x6e,0x14,0x6b,0x6e,0x6f, +0x77,0x6e,0xa3,0x67,0x11,0x61,0x72,0x8a,0x13,0x69,0x74,0x69,0x63,0x8b,0x71,0xc1, +0x13,0x71,0xa2,0xde,0x72,0xa2,0xe3,0x73,6,0x69,0x8a,0x69,0x72,0x6f,0xa2,0x4c, +0x75,0xa2,0x75,0x79,1,0x6c,0x46,0x72,4,0x63,0x65,0x65,0xa3,0x5f,0x69,0x2c, +0x6a,0xa3,0x60,0x6e,0xa3,0x61,0x11,0x61,0x63,0x65,0x10,0x6f,0x94,0x16,0x74,0x69, +0x6e,0x61,0x67,0x72,0x69,0x95,2,0x64,0x3c,0x67,0x4c,0x6e,1,0x64,0xa3,0x91, +0x68,0x62,0x12,0x61,0x6c,0x61,0x63,0x10,0x64,0xa2,0xa6,0x12,0x68,0x61,0x6d,0xa3, +0xa6,0x17,0x6e,0x77,0x72,0x69,0x74,0x69,0x6e,0x67,0xa3,0x70,2,0x67,0x3a,0x72, +0x52,0x79,0x10,0x6f,0xa2,0xb0,0x12,0x6d,0x62,0x6f,0xa3,0xb0,1,0x64,0x26,0x6f, +0xa3,0xb8,0xa2,0xb7,0x12,0x69,0x61,0x6e,0xa3,0xb7,0x10,0x61,0xa2,0x98,0x16,0x73, +0x6f,0x6d,0x70,0x65,0x6e,0x67,0xa3,0x98,0x11,0x6e,0x64,0xa2,0x71,0x14,0x61,0x6e, +0x65,0x73,0x65,0xa3,0x71,0x61,0x5c,0x67,0xa2,0x43,0x68,1,0x61,0x2a,0x72,0x10, +0x64,0xa3,0x97,2,0x72,0x28,0x76,0x30,0x77,0x87,0x12,0x61,0x64,0x61,0xa3,0x97, +0x12,0x69,0x61,0x6e,0x87,2,0x6d,0x40,0x72,0x58,0x75,0x10,0x72,0xa2,0x6f,0x15, +0x61,0x73,0x68,0x74,0x72,0x61,0xa3,0x6f,1,0x61,0x26,0x72,0xa3,0x7e,0x14,0x72, +0x69,0x74,0x61,0x6e,0xa3,0x7e,1,0x61,0xa3,0x5e,0x62,0xa3,0x85,0x11,0x6e,0x77, +0xa3,0x70,0x11,0x61,0x61,1,0x63,0x2f,0x69,0x23,3,0x65,0x3e,0x6a,0x48,0x6f, +0x4e,0x75,0x10,0x6e,1,0x69,0x24,0x72,0x61,0x10,0x63,0x61,0x13,0x6a,0x61,0x6e, +0x67,0xa3,0x6e,0x11,0x6e,0x67,0xa3,0x6e,1,0x68,0x2a,0x72,0x10,0x6f,0xa3,0x5d, +0x10,0x67,0xa3,0xb6,0x6e,0xa2,0x83,0x6f,0xa4,1,0x70,5,0x6c,0x1e,0x6c,0x44, +0x72,0x4a,0x73,0x1b,0x61,0x6c,0x74,0x65,0x72,0x70,0x61,0x68,0x6c,0x61,0x76,0x69, +0xa3,0x7b,0x11,0x72,0x64,0xa3,0x5c,0x11,0x74,0x69,0xa3,0x7d,0x61,0x7c,0x65,0xa2, +0x54,0x68,3,0x61,0x3e,0x6c,0x4e,0x6e,0x5e,0x6f,0x16,0x65,0x6e,0x69,0x63,0x69, +0x61,0x6e,0xa3,0x5b,0x10,0x67,0xa2,0x5a,0x12,0x73,0x70,0x61,0xa3,0x5a,2,0x69, +0xa3,0x7a,0x70,0xa3,0x7b,0x76,0xa3,0x7c,0x10,0x78,0xa3,0x5b,2,0x68,0x3e,0x6c, +0x50,0x75,0x10,0x63,0xa2,0xa5,0x14,0x69,0x6e,0x68,0x61,0x75,0xa3,0xa5,0x17,0x61, +0x77,0x68,0x68,0x6d,0x6f,0x6e,0x67,0xa3,0x4b,0x10,0x6d,0xa2,0x90,0x14,0x79,0x72, +0x65,0x6e,0x65,0xa3,0x90,0x11,0x72,0x6d,0xa3,0x59,6,0x6b,0x36,0x6b,0x56,0x73, +0x6e,0x75,0x74,0x79,0x11,0x69,0x61,0x1f,0x6b,0x65,0x6e,0x67,0x70,0x75,0x61,0x63, +0x68,0x75,0x65,0x68,0x6d,0x6f,0x6e,0x67,0xa3,0xba,1,0x67,0x2e,0x6f,0xa2,0x57, +0x10,0x6f,0xa3,0x57,0x10,0x62,0xa3,0x84,0x11,0x68,0x75,0xa3,0x96,0x12,0x73,0x68, +0x75,0xa3,0x96,0x61,0x42,0x62,0x9e,0x65,0x10,0x77,1,0x61,0xa3,0xaa,0x74,0x14, +0x61,0x69,0x6c,0x75,0x65,0x97,3,0x62,0x32,0x67,0x40,0x6e,0x56,0x72,0x10,0x62, +0xa3,0x8e,0x15,0x61,0x74,0x61,0x65,0x61,0x6e,0xa3,0x8f,0x10,0x6d,0xa2,0xc7,0x15, +0x75,0x6e,0x64,0x61,0x72,0x69,0xa3,0xc7,0x10,0x64,0xa2,0xbb,0x16,0x69,0x6e,0x61, +0x67,0x61,0x72,0x69,0xa3,0xbb,0x11,0x61,0x74,0xa3,0x8f,4,0x67,0x3c,0x6c,0x4e, +0x72,0xa2,0x8e,0x73,0xa2,0x9c,0x75,0x11,0x67,0x72,0xa3,0xc2,1,0x61,0x2a,0x68, +0x11,0x61,0x6d,0x5b,0x10,0x6d,0x5b,1,0x63,0xa2,0x6a,0x64,6,0x70,0x41,0x70, +0x3a,0x73,0x58,0x74,0x86,0x75,0x14,0x79,0x67,0x68,0x75,0x72,0xa3,0xc2,0x11,0x65, +0x72,1,0x6d,0x2c,0x73,0x12,0x69,0x61,0x6e,0x9b,0x11,0x69,0x63,0xa3,0x59,0x10, +0x6f,1,0x67,0x3a,0x75,0x18,0x74,0x68,0x61,0x72,0x61,0x62,0x69,0x61,0x6e,0xa3, +0x85,0x13,0x64,0x69,0x61,0x6e,0xa3,0xb8,0x14,0x75,0x72,0x6b,0x69,0x63,0xa3,0x58, +0x68,0x42,0x69,0x54,0x6e,0x1a,0x6f,0x72,0x74,0x68,0x61,0x72,0x61,0x62,0x69,0x61, +0x6e,0xa3,0x8e,0x17,0x75,0x6e,0x67,0x61,0x72,0x69,0x61,0x6e,0xa3,0x4c,0x14,0x74, +0x61,0x6c,0x69,0x63,0x5d,1,0x68,0x26,0x6b,0xa3,0x6d,0x12,0x69,0x6b,0x69,0xa3, +0x6d,2,0x69,0x2c,0x6b,0x30,0x79,0x10,0x61,0x5f,0x11,0x79,0x61,0x5f,0x10,0x68, +0xa3,0x58,2,0x61,0x36,0x67,0x3c,0x6d,0x10,0x61,0x84,0x12,0x6e,0x79,0x61,0x85, +0x11,0x67,0x65,0xa3,0xab,0x10,0x65,0xa3,0xab,0x68,0xc3,0x15,0x6b,0xc2,0x2c,0x6b, +0xa4,0x17,0x6c,0xa4,0xba,0x6d,8,0x6f,0x46,0x6f,0x48,0x72,0x74,0x74,0x80,0x75, +0x86,0x79,1,0x61,0x28,0x6d,0x10,0x72,0x59,0x13,0x6e,0x6d,0x61,0x72,0x59,2, +0x64,0x2e,0x6e,0x32,0x6f,0x10,0x6e,0xa3,0x72,0x10,0x69,0xa3,0xa3,0x10,0x67,0x56, +0x14,0x6f,0x6c,0x69,0x61,0x6e,0x57,0x10,0x6f,0xa2,0x95,0x10,0x6f,0xa3,0x95,0x11, +0x65,0x69,0xa3,0x73,0x11,0x6c,0x74,0xa2,0xa4,0x12,0x61,0x6e,0x69,0xa3,0xa4,0x61, +0x36,0x65,0xa2,0x67,0x69,0xa2,0xbd,0x6c,0x11,0x79,0x6d,0x55,6,0x6e,0x38,0x6e, +0x32,0x72,0x5c,0x73,0x6c,0x79,0x10,0x61,0xa3,0x55,1,0x64,0x38,0x69,0xa2,0x79, +0x15,0x63,0x68,0x61,0x65,0x61,0x6e,0xa3,0x79,0xa2,0x54,0x12,0x61,0x69,0x63,0xa3, +0x54,0x10,0x63,0xa2,0xa9,0x12,0x68,0x65,0x6e,0xa3,0xa9,0x18,0x61,0x72,0x61,0x6d, +0x67,0x6f,0x6e,0x64,0x69,0xa3,0xaf,0x68,0x36,0x6b,0x4c,0x6c,0x15,0x61,0x79,0x61, +0x6c,0x61,0x6d,0x55,1,0x61,0x26,0x6a,0xa3,0xa0,0x13,0x6a,0x61,0x6e,0x69,0xa3, +0xa0,0x10,0x61,0xa2,0xb4,0x12,0x73,0x61,0x72,0xa3,0xb4,3,0x64,0x78,0x65,0x94, +0x6e,0xa2,0x42,0x72,1,0x63,0xa3,0x8d,0x6f,0xa2,0x56,0x13,0x69,0x74,0x69,0x63, +1,0x63,0x3c,0x68,0x19,0x69,0x65,0x72,0x6f,0x67,0x6c,0x79,0x70,0x68,0x73,0xa3, +0x56,0x15,0x75,0x72,0x73,0x69,0x76,0x65,0xa3,0x8d,1,0x65,0x26,0x66,0xa3,0xb5, +0x16,0x66,0x61,0x69,0x64,0x72,0x69,0x6e,0xa3,0xb5,0x17,0x74,0x65,0x69,0x6d,0x61, +0x79,0x65,0x6b,0xa3,0x73,0x10,0x64,0xa2,0x8c,0x17,0x65,0x6b,0x69,0x6b,0x61,0x6b, +0x75,0x69,0xa3,0x8c,0x11,0x61,0x6f,0xa3,0x5c,6,0x6e,0x1a,0x6e,0x34,0x6f,0x38, +0x70,0x3e,0x74,0x11,0x68,0x69,0xa3,0x78,0x11,0x64,0x61,0x4b,0x11,0x72,0x65,0xa3, +0x77,0x11,0x65,0x6c,0xa3,0x8a,0x61,0x32,0x68,0xa2,0x44,0x69,0x11,0x74,0x73,0xa3, +0xbf,5,0x74,0x23,0x74,0x34,0x77,0x56,0x79,0x13,0x61,0x68,0x6c,0x69,0xa3,0x4f, +0x14,0x61,0x6b,0x61,0x6e,0x61,0x4c,0x19,0x6f,0x72,0x68,0x69,0x72,0x61,0x67,0x61, +0x6e,0x61,0x8d,0x10,0x69,0xa3,0xc6,0x69,0x38,0x6c,0x40,0x6e,1,0x61,0x4d,0x6e, +0x12,0x61,0x64,0x61,0x4b,0x12,0x74,0x68,0x69,0xa3,0x78,0x10,0x69,0xa3,0x4f,4, +0x61,0x40,0x69,0x52,0x6d,0x70,0x6f,0x7c,0x75,0x15,0x64,0x61,0x77,0x61,0x64,0x69, +0xa3,0x91,0x10,0x72,0x92,0x15,0x6f,0x73,0x68,0x74,0x68,0x69,0x93,0x1d,0x74,0x61, +0x6e,0x73,0x6d,0x61,0x6c,0x6c,0x73,0x63,0x72,0x69,0x70,0x74,0xa3,0xbf,1,0x65, +0x24,0x72,0x4f,0x10,0x72,0x4f,0x10,0x6a,0xa2,0x9d,0x11,0x6b,0x69,0xa3,0x9d,4, +0x61,0x5c,0x65,0x90,0x69,0xa0,0x6f,0xa2,0x5d,0x79,1,0x63,0x34,0x64,0x10,0x69, +0xa2,0x6c,0x11,0x61,0x6e,0xa3,0x6c,0x10,0x69,0xa2,0x6b,0x11,0x61,0x6e,0xa3,0x6b, +2,0x6e,0x42,0x6f,0x46,0x74,3,0x66,0xa3,0x50,0x67,0xa3,0x51,0x69,0x24,0x6e, +0x53,0x10,0x6e,0x53,0x10,0x61,0xa3,0x6a,0x50,0x10,0x6f,0x51,0x11,0x70,0x63,0xa2, +0x52,0x11,0x68,0x61,0xa3,0x52,2,0x6d,0x2e,0x6e,0x36,0x73,0x10,0x75,0xa3,0x83, +0x10,0x62,0x80,0x10,0x75,0x81,2,0x61,0xa3,0x53,0x62,0x83,0x65,0x11,0x61,0x72, +1,0x61,0xa3,0x53,0x62,0x83,0x11,0x6d,0x61,0xa3,0x8b,0x68,0x6e,0x69,0xa2,0x95, +0x6a,2,0x61,0x30,0x70,0x52,0x75,0x11,0x72,0x63,0xa3,0x94,1,0x6d,0x38,0x76, +0x10,0x61,0xa2,0x4e,0x13,0x6e,0x65,0x73,0x65,0xa3,0x4e,0x10,0x6f,0xa3,0xad,0x11, +0x61,0x6e,0xa3,0x69,6,0x6c,0x1e,0x6c,0x34,0x6d,0x3a,0x72,0x48,0x75,0x11,0x6e, +0x67,0xa3,0x4c,0x11,0x75,0x77,0xa3,0x9c,0x10,0x6e,1,0x67,0xa3,0x4b,0x70,0xa3, +0xba,0x11,0x6b,0x74,0x8d,0x61,0x3c,0x65,0xa2,0x43,0x69,0x11,0x72,0x61,0x48,0x13, +0x67,0x61,0x6e,0x61,0x49,1,0x6e,0x34,0x74,0x10,0x72,0xa2,0xa2,0x11,0x61,0x6e, +0xa3,0xa2,0x42,6,0x6f,0xe,0x6f,0x77,0x73,0xa3,0x49,0x74,0xa3,0x4a,0x75,0x12, +0x6e,0x6f,0x6f,0x77,0x62,0xa3,0xac,0x67,0x3e,0x69,0x42,0x19,0x66,0x69,0x72,0x6f, +0x68,0x69,0x6e,0x67,0x79,0x61,0xa3,0xb6,0x44,0x11,0x75,0x6c,0x45,0x11,0x62,0x72, +0x46,0x11,0x65,0x77,0x47,2,0x6d,0x2e,0x6e,0x4a,0x74,0x11,0x61,0x6c,0x5d,0x1c, +0x70,0x65,0x72,0x69,0x61,0x6c,0x61,0x72,0x61,0x6d,0x61,0x69,0x63,0xa3,0x74,2, +0x64,0x66,0x68,0x6a,0x73,0x1b,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x61,0x6c, +0x70,0x61,1,0x68,0x32,0x72,0x14,0x74,0x68,0x69,0x61,0x6e,0xa3,0x7d,0x13,0x6c, +0x61,0x76,0x69,0xa3,0x7a,0x10,0x73,0xa3,0x4d,0x15,0x65,0x72,0x69,0x74,0x65,0x64, +0x23,0x64,0xc1,0xd,0x64,0xa2,0x7a,0x65,0xa2,0xc1,0x67,4,0x65,0x82,0x6c,0x9a, +0x6f,0xa2,0x46,0x72,0xa2,0x55,0x75,2,0x6a,0x3c,0x6e,0x4e,0x72,1,0x6d,0x24, +0x75,0x41,0x13,0x75,0x6b,0x68,0x69,0x41,1,0x61,0x24,0x72,0x3f,0x13,0x72,0x61, +0x74,0x69,0x3f,0x18,0x6a,0x61,0x6c,0x61,0x67,0x6f,0x6e,0x64,0x69,0xa3,0xb3,0x10, +0x6f,1,0x6b,0xa3,0x48,0x72,0x38,0x13,0x67,0x69,0x61,0x6e,0x39,0x11,0x61,0x67, +0x90,0x15,0x6f,0x6c,0x69,0x74,0x69,0x63,0x91,1,0x6e,0x30,0x74,0x10,0x68,0x3a, +0x11,0x69,0x63,0x3b,1,0x67,0xa3,0xb3,0x6d,0xa3,0xaf,1,0x61,0x32,0x65,1, +0x65,0x24,0x6b,0x3d,0x10,0x6b,0x3d,0x10,0x6e,0xa2,0x89,0x12,0x74,0x68,0x61,0xa3, +0x89,4,0x65,0x46,0x69,0x6c,0x6f,0x8c,0x73,0x9a,0x75,0x11,0x70,0x6c,0xa2,0x87, +0x13,0x6f,0x79,0x61,0x6e,0xa3,0x87,1,0x73,0x38,0x76,0x10,0x61,0x34,0x15,0x6e, +0x61,0x67,0x61,0x72,0x69,0x35,0x13,0x65,0x72,0x65,0x74,0x33,1,0x61,0x36,0x76, +0x16,0x65,0x73,0x61,0x6b,0x75,0x72,0x75,0xa3,0xbe,0x10,0x6b,0xa3,0xbe,0x11,0x67, +0x72,0xa2,0xb2,0x10,0x61,0xa3,0xb2,0x11,0x72,0x74,0x33,2,0x67,0x3a,0x6c,0x72, +0x74,0x11,0x68,0x69,0x36,0x13,0x6f,0x70,0x69,0x63,0x37,0x10,0x79,2,0x64,0xa3, +0x45,0x68,0xa3,0x46,0x70,0xa2,0x47,0x1e,0x74,0x69,0x61,0x6e,0x68,0x69,0x65,0x72, +0x6f,0x67,0x6c,0x79,0x70,0x68,0x73,0xa3,0x47,1,0x62,0x36,0x79,0x10,0x6d,0xa2, +0xb9,0x12,0x61,0x69,0x63,0xa3,0xb9,0x10,0x61,0xa2,0x88,0x12,0x73,0x61,0x6e,0xa3, +0x88,0x61,0xa2,0xc9,0x62,0xa4,0x32,0x63,6,0x6f,0x52,0x6f,0x76,0x70,0x92,0x75, +0xa2,0x41,0x79,1,0x70,0x3e,0x72,2,0x69,0x2a,0x6c,0x31,0x73,0xa3,0x44,0x13, +0x6c,0x6c,0x69,0x63,0x31,0x10,0x72,1,0x69,0x34,0x6f,0x15,0x6d,0x69,0x6e,0x6f, +0x61,0x6e,0xa3,0xc1,0x11,0x6f,0x74,0x7f,1,0x6d,0x30,0x70,0x10,0x74,0x2e,0x11, +0x69,0x63,0x2f,0x12,0x6d,0x6f,0x6e,0x21,1,0x6d,0x28,0x72,0x10,0x74,0x7f,0x10, +0x6e,0xa3,0xc1,0x16,0x6e,0x65,0x69,0x66,0x6f,0x72,0x6d,0xa3,0x65,0x61,0x32,0x68, +0xa2,0x41,0x69,0x11,0x72,0x74,0xa3,0x43,3,0x6b,0x4c,0x6e,0x50,0x72,0x76,0x75, +0x1d,0x63,0x61,0x73,0x69,0x61,0x6e,0x61,0x6c,0x62,0x61,0x6e,0x69,0x61,0x6e,0xa3, +0x9f,0x10,0x6d,0xa3,0x76,1,0x61,0x24,0x73,0x71,0x1d,0x64,0x69,0x61,0x6e,0x61, +0x62,0x6f,0x72,0x69,0x67,0x69,0x6e,0x61,0x6c,0x71,0x10,0x69,0xa2,0x68,0x11,0x61, +0x6e,0xa3,0x68,3,0x61,0x32,0x65,0x44,0x6f,0x52,0x72,0x10,0x73,0xa3,0xbd,1, +0x6b,0x26,0x6d,0xa3,0x42,0x11,0x6d,0x61,0xa3,0x76,0x10,0x72,0x2c,0x13,0x6f,0x6b, +0x65,0x65,0x2d,0x16,0x72,0x61,0x73,0x6d,0x69,0x61,0x6e,0xa3,0xbd,6,0x68,0x4e, +0x68,0x48,0x6e,0x4e,0x72,0x76,0x76,1,0x65,0x2a,0x73,0x10,0x74,0xa3,0x75,0x13, +0x73,0x74,0x61,0x6e,0xa3,0x75,0x11,0x6f,0x6d,0xa3,0xa1,0x11,0x61,0x74,0x1f,0x6f, +0x6c,0x69,0x61,0x6e,0x68,0x69,0x65,0x72,0x6f,0x67,0x6c,0x79,0x70,0x68,0x73,0xa3, +0x9c,1,0x61,0x3e,0x6d,2,0x65,0x2a,0x69,0xa3,0x74,0x6e,0x27,0x13,0x6e,0x69, +0x61,0x6e,0x27,1,0x62,0x26,0x6e,0xa3,0xc8,0x24,0x11,0x69,0x63,0x25,0x64,0x30, +0x66,0x44,0x67,0x11,0x68,0x62,0xa3,0x9f,0x10,0x6c,1,0x61,0x26,0x6d,0xa3,0xa7, +0x10,0x6d,0xa3,0xa7,0x11,0x61,0x6b,0xa3,0x93,6,0x6c,0x3c,0x6c,0x52,0x6f,0x56, +0x72,0x66,0x75,1,0x67,0x30,0x68,1,0x64,0x79,0x69,0x10,0x64,0x79,0x10,0x69, +0x8e,0x13,0x6e,0x65,0x73,0x65,0x8f,0x11,0x69,0x73,0xa1,0x11,0x70,0x6f,0x2a,0x13, +0x6d,0x6f,0x66,0x6f,0x2b,0x10,0x61,1,0x68,0x2e,0x69,0x7c,0x12,0x6c,0x6c,0x65, +0x7d,0xa2,0x41,0x11,0x6d,0x69,0xa3,0x41,0x61,0x48,0x65,0x9c,0x68,1,0x61,0x2a, +0x6b,0x10,0x73,0xa3,0xa8,0x15,0x69,0x6b,0x73,0x75,0x6b,0x69,0xa3,0xa8,3,0x6c, +0x3a,0x6d,0x48,0x73,0x54,0x74,1,0x61,0x24,0x6b,0x9f,0x10,0x6b,0x9f,0x10,0x69, +0x9c,0x13,0x6e,0x65,0x73,0x65,0x9d,0x10,0x75,0xa2,0x82,0x10,0x6d,0xa3,0x82,0x10, +0x73,0xa2,0x86,0x13,0x61,0x76,0x61,0x68,0xa3,0x86,0x11,0x6e,0x67,0x28,0x12,0x61, +0x6c,0x69,0x29,3,0x6c,0x42,0x6e,0x90,0x74,0xa2,0x46,0x76,0x24,0x17,0x6f,0x77, +0x65,0x6c,0x6a,0x61,0x6d,0x6f,0x25,0x22,1,0x65,0x54,0x76,0x28,1,0x73,0x38, +0x74,0x2a,0x17,0x73,0x79,0x6c,0x6c,0x61,0x62,0x6c,0x65,0x2b,0x16,0x79,0x6c,0x6c, +0x61,0x62,0x6c,0x65,0x29,0x18,0x61,0x64,0x69,0x6e,0x67,0x6a,0x61,0x6d,0x6f,0x23, +1,0x61,0x21,0x6f,0x1a,0x74,0x61,0x70,0x70,0x6c,0x69,0x63,0x61,0x62,0x6c,0x65, +0x21,0x26,0x1a,0x72,0x61,0x69,0x6c,0x69,0x6e,0x67,0x6a,0x61,0x6d,0x6f,0x27,1, +0x6e,0x2c,0x79,0x22,0x11,0x65,0x73,0x23,0x20,0x10,0x6f,0x21,1,0x6e,0x2c,0x79, +0x22,0x11,0x65,0x73,0x23,0x20,0x10,0x6f,0x21,2,0x6d,0x30,0x6e,0x3a,0x79,0x22, +0x11,0x65,0x73,0x23,0x24,0x13,0x61,0x79,0x62,0x65,0x25,0x20,0x10,0x6f,0x21,2, +0x6d,0x30,0x6e,0x3a,0x79,0x22,0x11,0x65,0x73,0x23,0x24,0x13,0x61,0x79,0x62,0x65, +0x25,0x20,0x10,0x6f,0x21,0xb,0x72,0x39,0x76,0xc,0x76,0x33,0x78,0x2a,0x7a,0x11, +0x77,0x6a,0x43,0x10,0x78,0x21,0x72,0x28,0x73,0x50,0x74,0x31,1,0x65,0x24,0x69, +0x39,0x1e,0x67,0x69,0x6f,0x6e,0x61,0x6c,0x69,0x6e,0x64,0x69,0x63,0x61,0x74,0x6f, +0x72,0x39,1,0x6d,0x35,0x70,0x18,0x61,0x63,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b, +0x35,0x6c,0x1f,0x6c,0x3c,0x6f,0x4a,0x70,1,0x70,0x37,0x72,0x14,0x65,0x70,0x65, +0x6e,0x64,0x37,0x28,1,0x66,0x2b,0x76,0x2c,0x10,0x74,0x2f,0x13,0x74,0x68,0x65, +0x72,0x21,0x63,0x4c,0x65,0x64,0x67,1,0x61,0x3a,0x6c,0x19,0x75,0x65,0x61,0x66, +0x74,0x65,0x72,0x7a,0x77,0x6a,0x41,0x10,0x7a,0x41,2,0x6e,0x23,0x6f,0x24,0x72, +0x25,0x14,0x6e,0x74,0x72,0x6f,0x6c,0x23,2,0x62,0x34,0x6d,0x4e,0x78,0x26,0x13, +0x74,0x65,0x6e,0x64,0x27,0x3a,1,0x61,0x24,0x67,0x3d,0x11,0x73,0x65,0x3a,0x12, +0x67,0x61,0x7a,0x3d,0x3e,0x16,0x6f,0x64,0x69,0x66,0x69,0x65,0x72,0x3f,9,0x6e, +0x4a,0x6e,0x34,0x6f,0x44,0x73,0x60,0x75,0x94,0x78,0x10,0x78,0x21,0x10,0x75,0x2a, +0x14,0x6d,0x65,0x72,0x69,0x63,0x2b,1,0x6c,0x2c,0x74,0x12,0x68,0x65,0x72,0x21, +0x14,0x65,0x74,0x74,0x65,0x72,0x2d,3,0x63,0x36,0x65,0x46,0x70,0x31,0x74,0x32, +0x12,0x65,0x72,0x6d,0x33,0x3c,0x16,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x65,0x3d,0x2e, +0x10,0x70,0x2f,0x10,0x70,0x34,0x12,0x70,0x65,0x72,0x35,0x61,0x46,0x63,0x52,0x65, +0x64,0x66,0x72,0x6c,2,0x65,0x2d,0x66,0x3b,0x6f,0x28,0x12,0x77,0x65,0x72,0x29, +0x10,0x74,0x22,0x12,0x65,0x72,0x6d,0x23,1,0x6c,0x24,0x72,0x37,0x24,0x12,0x6f, +0x73,0x65,0x25,0x10,0x78,0x38,0x13,0x74,0x65,0x6e,0x64,0x39,0x10,0x6f,0x26,0x13, +0x72,0x6d,0x61,0x74,0x27,0,0x10,0x6c,0x88,0x72,0x40,0x72,0x36,0x73,0x5e,0x77, +0x7a,0x78,0x8a,0x7a,0x11,0x77,0x6a,0x4b,1,0x65,0x24,0x69,0x3b,0x1e,0x67,0x69, +0x6f,0x6e,0x61,0x6c,0x69,0x6e,0x64,0x69,0x63,0x61,0x74,0x6f,0x72,0x3b,1,0x69, +0x24,0x71,0x3f,0x18,0x6e,0x67,0x6c,0x65,0x71,0x75,0x6f,0x74,0x65,0x3f,0x17,0x73, +0x65,0x67,0x73,0x70,0x61,0x63,0x65,0x4d,0x10,0x78,0x21,0x6c,0x36,0x6d,0x3c,0x6e, +0x76,0x6f,0x13,0x74,0x68,0x65,0x72,0x21,1,0x65,0x23,0x66,0x35,3,0x62,0x37, +0x69,0x28,0x6c,0x29,0x6e,0x2b,0x10,0x64,1,0x6c,0x34,0x6e,0x11,0x75,0x6d,0x2a, +0x12,0x6c,0x65,0x74,0x37,0x14,0x65,0x74,0x74,0x65,0x72,0x29,2,0x65,0x36,0x6c, +0x39,0x75,0x2c,0x14,0x6d,0x65,0x72,0x69,0x63,0x2d,0x14,0x77,0x6c,0x69,0x6e,0x65, +0x39,0x66,0x3f,0x66,0x40,0x67,0x4e,0x68,0x70,0x6b,0x10,0x61,0x26,0x15,0x74,0x61, +0x6b,0x61,0x6e,0x61,0x27,0x10,0x6f,0x24,0x13,0x72,0x6d,0x61,0x74,0x25,1,0x61, +0x3a,0x6c,0x19,0x75,0x65,0x61,0x66,0x74,0x65,0x72,0x7a,0x77,0x6a,0x49,0x10,0x7a, +0x49,1,0x65,0x24,0x6c,0x3d,0x19,0x62,0x72,0x65,0x77,0x6c,0x65,0x74,0x74,0x65, +0x72,0x3d,0x61,0x86,0x63,0x92,0x64,0x94,0x65,2,0x62,0x44,0x6d,0x5e,0x78,0x2e, +0x13,0x74,0x65,0x6e,0x64,0x32,0x15,0x6e,0x75,0x6d,0x6c,0x65,0x74,0x2f,0x42,1, +0x61,0x24,0x67,0x45,0x11,0x73,0x65,0x42,0x12,0x67,0x61,0x7a,0x45,0x46,0x16,0x6f, +0x64,0x69,0x66,0x69,0x65,0x72,0x47,0x15,0x6c,0x65,0x74,0x74,0x65,0x72,0x23,0x10, +0x72,0x31,1,0x6f,0x24,0x71,0x41,0x18,0x75,0x62,0x6c,0x65,0x71,0x75,0x6f,0x74, +0x65,0x41,2,0x63,0x32,0x6e,0x3c,0x6f,0x22,0x12,0x70,0x65,0x6e,0x23,0x24,0x13, +0x6c,0x6f,0x73,0x65,0x25,0x20,0x12,0x6f,0x6e,0x65,0x21,6,0x6f,0x65,0x6f,0x4a, +0x72,0x5c,0x74,0x64,0x76,0x1d,0x69,0x73,0x75,0x61,0x6c,0x6f,0x72,0x64,0x65,0x72, +0x6c,0x65,0x66,0x74,0x3d,0x18,0x76,0x65,0x72,0x73,0x74,0x72,0x75,0x63,0x6b,0x2d, +0x13,0x69,0x67,0x68,0x74,0x2f,0x11,0x6f,0x70,0x30,0x12,0x61,0x6e,0x64,2,0x62, +0x32,0x6c,0x62,0x72,0x13,0x69,0x67,0x68,0x74,0x3b,0x14,0x6f,0x74,0x74,0x6f,0x6d, +0x32,0x12,0x61,0x6e,0x64,1,0x6c,0x2e,0x72,0x13,0x69,0x67,0x68,0x74,0x35,0x12, +0x65,0x66,0x74,0x3f,0x12,0x65,0x66,0x74,0x36,0x17,0x61,0x6e,0x64,0x72,0x69,0x67, +0x68,0x74,0x39,0x62,0x2c,0x6c,0x5c,0x6e,0x10,0x61,0x21,0x14,0x6f,0x74,0x74,0x6f, +0x6d,0x22,0x12,0x61,0x6e,0x64,1,0x6c,0x2e,0x72,0x13,0x69,0x67,0x68,0x74,0x27, +0x12,0x65,0x66,0x74,0x25,0x12,0x65,0x66,0x74,0x28,0x17,0x61,0x6e,0x64,0x72,0x69, +0x67,0x68,0x74,0x2b,0xd,0x6e,0xaa,0x72,0x70,0x72,0x92,0x73,0xa2,0x46,0x74,0xa2, +0x54,0x76,1,0x69,0x60,0x6f,0x12,0x77,0x65,0x6c,0x62,1,0x64,0x3a,0x69,0x19, +0x6e,0x64,0x65,0x70,0x65,0x6e,0x64,0x65,0x6e,0x74,0x67,0x17,0x65,0x70,0x65,0x6e, +0x64,0x65,0x6e,0x74,0x65,1,0x72,0x2e,0x73,0x13,0x61,0x72,0x67,0x61,0x61,0x12, +0x61,0x6d,0x61,0x5f,0x1d,0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x73,0x68,0x69,0x66, +0x74,0x65,0x72,0x57,0x1e,0x79,0x6c,0x6c,0x61,0x62,0x6c,0x65,0x6d,0x6f,0x64,0x69, +0x66,0x69,0x65,0x72,0x59,0x12,0x6f,0x6e,0x65,1,0x6c,0x2c,0x6d,0x12,0x61,0x72, +0x6b,0x5d,0x14,0x65,0x74,0x74,0x65,0x72,0x5b,0x6e,0x3c,0x6f,0x7c,0x70,0x18,0x75, +0x72,0x65,0x6b,0x69,0x6c,0x6c,0x65,0x72,0x55,1,0x6f,0x4c,0x75,1,0x6b,0x3c, +0x6d,0x12,0x62,0x65,0x72,0x50,0x15,0x6a,0x6f,0x69,0x6e,0x65,0x72,0x53,0x11,0x74, +0x61,0x4f,0x16,0x6e,0x6a,0x6f,0x69,0x6e,0x65,0x72,0x4d,0x13,0x74,0x68,0x65,0x72, +0x21,0x67,0x3e,0x67,0x4a,0x69,0x64,0x6a,0x82,0x6d,0x1d,0x6f,0x64,0x69,0x66,0x79, +0x69,0x6e,0x67,0x6c,0x65,0x74,0x74,0x65,0x72,0x4b,0x1c,0x65,0x6d,0x69,0x6e,0x61, +0x74,0x69,0x6f,0x6e,0x6d,0x61,0x72,0x6b,0x45,0x1e,0x6e,0x76,0x69,0x73,0x69,0x62, +0x6c,0x65,0x73,0x74,0x61,0x63,0x6b,0x65,0x72,0x47,0x14,0x6f,0x69,0x6e,0x65,0x72, +0x49,0x61,0xa2,0xba,0x62,0xa2,0xc0,0x63,1,0x61,0xa2,0xa2,0x6f,0x16,0x6e,0x73, +0x6f,0x6e,0x61,0x6e,0x74,0x2a,8,0x6b,0x67,0x6b,0x48,0x6d,0x52,0x70,0x5c,0x73, +0xa2,0x42,0x77,0x19,0x69,0x74,0x68,0x73,0x74,0x61,0x63,0x6b,0x65,0x72,0x43,0x14, +0x69,0x6c,0x6c,0x65,0x72,0x35,0x14,0x65,0x64,0x69,0x61,0x6c,0x37,1,0x6c,0x52, +0x72,0x10,0x65,1,0x63,0x2e,0x66,0x13,0x69,0x78,0x65,0x64,0x3d,0x19,0x65,0x64, +0x69,0x6e,0x67,0x72,0x65,0x70,0x68,0x61,0x3b,0x18,0x61,0x63,0x65,0x68,0x6f,0x6c, +0x64,0x65,0x72,0x39,0x10,0x75,1,0x62,0x3e,0x63,0x1b,0x63,0x65,0x65,0x64,0x69, +0x6e,0x67,0x72,0x65,0x70,0x68,0x61,0x41,0x15,0x6a,0x6f,0x69,0x6e,0x65,0x64,0x3f, +0x64,0x4c,0x66,0x52,0x68,0x5a,0x69,0x1e,0x6e,0x69,0x74,0x69,0x61,0x6c,0x70,0x6f, +0x73,0x74,0x66,0x69,0x78,0x65,0x64,0x33,0x12,0x65,0x61,0x64,0x2d,0x13,0x69,0x6e, +0x61,0x6c,0x2f,0x18,0x65,0x61,0x64,0x6c,0x65,0x74,0x74,0x65,0x72,0x31,0x1d,0x6e, +0x74,0x69,0x6c,0x6c,0x61,0x74,0x69,0x6f,0x6e,0x6d,0x61,0x72,0x6b,0x29,0x16,0x76, +0x61,0x67,0x72,0x61,0x68,0x61,0x23,1,0x69,0x4a,0x72,0x10,0x61,0x1f,0x68,0x6d, +0x69,0x6a,0x6f,0x69,0x6e,0x69,0x6e,0x67,0x6e,0x75,0x6d,0x62,0x65,0x72,0x27,0x12, +0x6e,0x64,0x75,0x25,2,0x72,0x38,0x74,0x46,0x75,0x26,0x15,0x70,0x72,0x69,0x67, +0x68,0x74,0x27,0x20,0x15,0x6f,0x74,0x61,0x74,0x65,0x64,0x21,1,0x72,0x24,0x75, +0x25,0x22,0x18,0x61,0x6e,0x73,0x66,0x6f,0x72,0x6d,0x65,0x64,1,0x72,0x32,0x75, +0x15,0x70,0x72,0x69,0x67,0x68,0x74,0x25,0x15,0x6f,0x74,0x61,0x74,0x65,0x64,0x23, +1,0x61,0x38,0x72,0x18,0x65,0x73,0x74,0x72,0x69,0x63,0x74,0x65,0x64,0x21,0x15, +0x6c,0x6c,0x6f,0x77,0x65,0x64,0x23,0xd,0x6e,0xc1,0x86,0x73,0xa8,0x73,0x4c,0x74, +0xa2,0x76,0x75,0xa2,0x83,0x7a,0xd8,0x70,0,2,0x6c,0xd9,0x20,0,0x70,0xd9, +0x40,0,0x73,0xc3,0,0xfe,0xf,0,0,0,7,0x6f,0x3c,0x6f,0xff,8, +0,0,0,0x70,0x3a,0x75,0x6e,0x79,0x13,0x6d,0x62,0x6f,0x6c,0xff,0xf,0, +0,0,0x11,0x61,0x63,1,0x65,0x34,0x69,0x15,0x6e,0x67,0x6d,0x61,0x72,0x6b, +0xa5,0,0x18,0x73,0x65,0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0xc3,0,0x16,0x72, +0x72,0x6f,0x67,0x61,0x74,0x65,0xe1,0,0,0x63,0xff,2,0,0,0,0x65, +0x38,0x6b,0xff,4,0,0,0,0x6d,0xff,1,0,0,0,0x16,0x70,0x61, +0x72,0x61,0x74,0x6f,0x72,0xd9,0x70,0,0x1d,0x69,0x74,0x6c,0x65,0x63,0x61,0x73, +0x65,0x6c,0x65,0x74,0x74,0x65,0x72,0x31,1,0x6e,0x40,0x70,0x1c,0x70,0x65,0x72, +0x63,0x61,0x73,0x65,0x6c,0x65,0x74,0x74,0x65,0x72,0x25,0x17,0x61,0x73,0x73,0x69, +0x67,0x6e,0x65,0x64,0x23,0x6e,0xa2,0x69,0x6f,0xa2,0x89,0x70,0xfe,0x30,0xf8,0, +0,9,0x69,0x33,0x69,0xff,0x10,0,0,0,0x6f,0xfd,0x80,0,0,0x72, +0x54,0x73,0xf9,0,0,0x75,0x12,0x6e,0x63,0x74,0xfe,0x30,0xf8,0,0,0x15, +0x75,0x61,0x74,0x69,0x6f,0x6e,0xff,0x30,0xf8,0,0,0x17,0x69,0x76,0x61,0x74, +0x65,0x75,0x73,0x65,0xdd,0,0,0x61,0x48,0x63,0xfd,0x40,0,0,0x64,0xe9, +0,0,0x65,0xfd,0x20,0,0,0x66,0xff,0x20,0,0,0,0x1f,0x72,0x61, +0x67,0x72,0x61,0x70,0x68,0x73,0x65,0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0xd9,0x40, +0,0xbe,0,3,0x64,0xa7,0,0x6c,0xab,0,0x6f,0x30,0x75,0x13,0x6d,0x62, +0x65,0x72,0xbf,0,0xb2,0,0x1b,0x6e,0x73,0x70,0x61,0x63,0x69,0x6e,0x67,0x6d, +0x61,0x72,0x6b,0xa1,1,0x70,0x92,0x74,0x12,0x68,0x65,0x72,0xe6,0x80,1,3, +0x6c,0x40,0x6e,0x4a,0x70,0x56,0x73,0x14,0x79,0x6d,0x62,0x6f,0x6c,0xff,8,0, +0,0,0x14,0x65,0x74,0x74,0x65,0x72,0x61,0x14,0x75,0x6d,0x62,0x65,0x72,0xb3, +0,0x19,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xfd,0x80,0,0, +0x1c,0x65,0x6e,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xf9,0, +0,0x66,0xc0,0xc4,0x66,0xa2,0x47,0x69,0xa2,0x64,0x6c,0xa2,0x79,0x6d,0xa4,0xc0, +4,0x61,0x6c,0x63,0xa5,0,0x65,0xa3,0x80,0x6e,0xa1,0x6f,0x15,0x64,0x69,0x66, +0x69,0x65,0x72,1,0x6c,0x38,0x73,0x14,0x79,0x6d,0x62,0x6f,0x6c,0xff,4,0, +0,0,0x14,0x65,0x74,0x74,0x65,0x72,0x41,1,0x72,0x3c,0x74,0x16,0x68,0x73, +0x79,0x6d,0x62,0x6f,0x6c,0xff,1,0,0,0,0x10,0x6b,0xa5,0xc0,1,0x69, +0x32,0x6f,0x13,0x72,0x6d,0x61,0x74,0xdb,0,0,0x1d,0x6e,0x61,0x6c,0x70,0x75, +0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xff,0x20,0,0,0,0x10,0x6e, +0x1f,0x69,0x74,0x69,0x61,0x6c,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f, +0x6e,0xff,0x10,0,0,0,0x9c,7,0x6d,0x18,0x6d,0x41,0x6f,0x28,0x74,0x31, +0x75,0x25,0x60,0x1c,0x77,0x65,0x72,0x63,0x61,0x73,0x65,0x6c,0x65,0x74,0x74,0x65, +0x72,0x29,0x63,0x3d,0x65,0x28,0x69,0x42,0x6c,0x29,0x13,0x74,0x74,0x65,0x72,0x9c, +0x15,0x6e,0x75,0x6d,0x62,0x65,0x72,0xab,0,0x1a,0x6e,0x65,0x73,0x65,0x70,0x61, +0x72,0x61,0x74,0x6f,0x72,0xd9,0x20,0,0x63,0x46,0x64,0xa2,0x96,0x65,0x1b,0x6e, +0x63,0x6c,0x6f,0x73,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0xa3,0x80,0xe6,0x80,1, +7,0x6e,0x57,0x6e,0x52,0x6f,0x5e,0x73,0xe1,0,0,0x75,0x1b,0x72,0x72,0x65, +0x6e,0x63,0x79,0x73,0x79,0x6d,0x62,0x6f,0x6c,0xff,2,0,0,0,0x22,0x12, +0x74,0x72,0x6c,0xd9,0x80,0,0xdc,0,0,1,0x6d,0x62,0x6e,1,0x6e,0x30, +0x74,0x12,0x72,0x6f,0x6c,0xd9,0x80,0,0x1f,0x65,0x63,0x74,0x6f,0x72,0x70,0x75, +0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xfd,0x40,0,0,0x19,0x62,0x69, +0x6e,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0xa5,0xc0,0x61,0x58,0x63,0xd9,0x80,0, +0x66,0xdb,0,0,0x6c,0x1d,0x6f,0x73,0x65,0x70,0x75,0x6e,0x63,0x74,0x75,0x61, +0x74,0x69,0x6f,0x6e,0xfd,0x20,0,0,0x18,0x73,0x65,0x64,0x6c,0x65,0x74,0x74, +0x65,0x72,0x3d,2,0x61,0x32,0x65,0x50,0x69,0x12,0x67,0x69,0x74,0xa7,0,0x1c, +0x73,0x68,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xe9,0,0, +0x1a,0x63,0x69,0x6d,0x61,0x6c,0x6e,0x75,0x6d,0x62,0x65,0x72,0xa7,0,8,0x6e, +0x50,0x6e,0x46,0x6f,0x7a,0x72,0x88,0x74,0x9c,0x75,0x19,0x6e,0x63,0x6f,0x6d,0x6d, +0x6f,0x6e,0x75,0x73,0x65,0x31,0x11,0x6f,0x74,2,0x63,0x2e,0x6e,0x3e,0x78,0x11, +0x69,0x64,0x29,0x17,0x68,0x61,0x72,0x61,0x63,0x74,0x65,0x72,0x21,0x12,0x66,0x6b, +0x63,0x27,0x16,0x62,0x73,0x6f,0x6c,0x65,0x74,0x65,0x2d,0x19,0x65,0x63,0x6f,0x6d, +0x6d,0x65,0x6e,0x64,0x65,0x64,0x37,0x17,0x65,0x63,0x68,0x6e,0x69,0x63,0x61,0x6c, +0x2f,0x64,0x40,0x65,0x78,0x69,0x88,0x6c,0x18,0x69,0x6d,0x69,0x74,0x65,0x64,0x75, +0x73,0x65,0x33,0x10,0x65,1,0x66,0x34,0x70,0x16,0x72,0x65,0x63,0x61,0x74,0x65, +0x64,0x23,0x1c,0x61,0x75,0x6c,0x74,0x69,0x67,0x6e,0x6f,0x72,0x61,0x62,0x6c,0x65, +0x25,0x17,0x78,0x63,0x6c,0x75,0x73,0x69,0x6f,0x6e,0x2b,0x17,0x6e,0x63,0x6c,0x75, +0x73,0x69,0x6f,0x6e,0x35 }; -const char PropNameData::nameGroups[23100]={ +const char PropNameData::nameGroups[23743]={ 2,'A','l','p','h','a',0,'A','l','p','h','a','b','e','t','i','c',0, 4,'N',0,'N','o',0,'F',0,'F','a','l','s','e',0,4,'Y',0,'Y','e','s',0,'T',0,'T','r','u','e',0, 2,'N','R',0,'N','o','t','_','R','e','o','r','d','e','r','e','d',0, @@ -1176,6 +1199,10 @@ const char PropNameData::nameGroups[23100]={ 2,'R','G','I','_','E','m','o','j','i','_','Z','W','J','_','S','e','q','u','e','n','c','e',0, 'R','G','I','_','E','m','o','j','i','_','Z','W','J','_','S','e','q','u','e','n','c','e',0, 2,'R','G','I','_','E','m','o','j','i',0,'R','G','I','_','E','m','o','j','i',0, +2,'I','D','S','U',0,'I','D','S','_','U','n','a','r','y','_','O','p','e','r','a','t','o','r',0, +2,'I','D','_','C','o','m','p','a','t','_','M','a','t','h','_','S','t','a','r','t',0,'I','D','_','C','o','m','p','a','t','_', +'M','a','t','h','_','S','t','a','r','t',0,2,'I','D','_','C','o','m','p','a','t','_','M','a','t','h','_','C','o','n','t','i', +'n','u','e',0,'I','D','_','C','o','m','p','a','t','_','M','a','t','h','_','C','o','n','t','i','n','u','e',0, 2,'b','c',0,'B','i','d','i','_','C','l','a','s','s',0,2,'L',0,'L','e','f','t','_','T','o','_','R','i','g','h','t',0, 2,'R',0,'R','i','g','h','t','_','T','o','_','L','e','f','t',0, 2,'E','N',0,'E','u','r','o','p','e','a','n','_','N','u','m','b','e','r',0, @@ -1568,9 +1595,11 @@ const char PropNameData::nameGroups[23100]={ 'e','n','d','e','d','_','A',0,2,'K','a','k','t','o','v','i','k','_','N','u','m','e','r','a','l','s',0, 'K','a','k','t','o','v','i','k','_','N','u','m','e','r','a','l','s',0, 2,'K','a','w','i',0,'K','a','w','i',0,2,'N','a','g','_','M','u','n','d','a','r','i',0, -'N','a','g','_','M','u','n','d','a','r','i',0,2,'c','c','c',0,'C','a','n','o','n','i','c','a','l','_','C','o','m','b','i', -'n','i','n','g','_','C','l','a','s','s',0,2,'d','t',0,'D','e','c','o','m','p','o','s','i','t','i','o','n','_','T','y','p', -'e',0,3,'N','o','n','e',0,'N','o','n','e',0,'n','o','n','e',0, +'N','a','g','_','M','u','n','d','a','r','i',0,2,'C','J','K','_','E','x','t','_','I',0,'C','J','K','_','U','n','i','f','i', +'e','d','_','I','d','e','o','g','r','a','p','h','s','_','E','x','t','e','n','s','i','o','n','_','I',0, +2,'c','c','c',0,'C','a','n','o','n','i','c','a','l','_','C','o','m','b','i','n','i','n','g','_','C','l','a','s','s',0, +2,'d','t',0,'D','e','c','o','m','p','o','s','i','t','i','o','n','_','T','y','p','e',0, +3,'N','o','n','e',0,'N','o','n','e',0,'n','o','n','e',0, 3,'C','a','n',0,'C','a','n','o','n','i','c','a','l',0,'c','a','n',0, 3,'C','o','m',0,'C','o','m','p','a','t',0,'c','o','m',0, 3,'E','n','c',0,'C','i','r','c','l','e',0,'e','n','c',0, @@ -1739,7 +1768,11 @@ const char PropNameData::nameGroups[23100]={ 's','i','s',0,2,'C','J',0,'C','o','n','d','i','t','i','o','n','a','l','_','J','a','p','a','n','e','s','e','_','S','t','a', 'r','t','e','r',0,2,'H','L',0,'H','e','b','r','e','w','_','L','e','t','t','e','r',0, 2,'E','B',0,'E','_','B','a','s','e',0,2,'E','M',0,'E','_','M','o','d','i','f','i','e','r',0, -2,'Z','W','J',0,'Z','W','J',0,2,'n','t',0,'N','u','m','e','r','i','c','_','T','y','p','e',0, +2,'Z','W','J',0,'Z','W','J',0,2,'A','K',0,'A','k','s','a','r','a',0, +2,'A','P',0,'A','k','s','a','r','a','_','P','r','e','b','a','s','e',0, +2,'A','S',0,'A','k','s','a','r','a','_','S','t','a','r','t',0, +2,'V','F',0,'V','i','r','a','m','a','_','F','i','n','a','l',0, +2,'V','I',0,'V','i','r','a','m','a',0,2,'n','t',0,'N','u','m','e','r','i','c','_','T','y','p','e',0, 2,'N','o','n','e',0,'N','o','n','e',0,2,'D','e',0,'D','e','c','i','m','a','l',0, 2,'D','i',0,'D','i','g','i','t',0,2,'N','u',0,'N','u','m','e','r','i','c',0, 2,'s','c',0,'S','c','r','i','p','t',0,2,'Z','y','y','y',0,'C','o','m','m','o','n',0, @@ -1860,8 +1893,8 @@ const char PropNameData::nameGroups[23100]={ 2,'O','u','g','r',0,'O','l','d','_','U','y','g','h','u','r',0, 2,'T','n','s','a',0,'T','a','n','g','s','a',0,2,'V','i','t','h',0,'V','i','t','h','k','u','q','i',0, 2,'N','a','g','m',0,'N','a','g','_','M','u','n','d','a','r','i',0, -2,'h','s','t',0,'H','a','n','g','u','l','_','S','y','l','l','a','b','l','e','_','T','y','p','e',0, -2,'N','A',0,'N','o','t','_','A','p','p','l','i','c','a','b','l','e',0, +2,'A','r','a','n',0,'A','r','a','n',0,2,'h','s','t',0,'H','a','n','g','u','l','_','S','y','l','l','a','b','l','e','_', +'T','y','p','e',0,2,'N','A',0,'N','o','t','_','A','p','p','l','i','c','a','b','l','e',0, 2,'L',0,'L','e','a','d','i','n','g','_','J','a','m','o',0, 2,'V',0,'V','o','w','e','l','_','J','a','m','o',0,2,'T',0,'T','r','a','i','l','i','n','g','_','J','a','m','o',0, 2,'L','V',0,'L','V','_','S','y','l','l','a','b','l','e',0, @@ -1957,8 +1990,12 @@ const char PropNameData::nameGroups[23100]={ 'n','d','e','n','t',0,2,'v','o',0,'V','e','r','t','i','c','a','l','_','O','r','i','e','n','t','a','t','i','o','n',0, 2,'R',0,'R','o','t','a','t','e','d',0,2,'T','r',0,'T','r','a','n','s','f','o','r','m','e','d','_','R','o','t','a','t', 'e','d',0,2,'T','u',0,'T','r','a','n','s','f','o','r','m','e','d','_','U','p','r','i','g','h','t',0, -2,'U',0,'U','p','r','i','g','h','t',0,2,'g','c','m',0,'G','e','n','e','r','a','l','_','C','a','t','e','g','o','r','y', -'_','M','a','s','k',0,2,'C',0,'O','t','h','e','r',0,2,'L',0,'L','e','t','t','e','r',0, +2,'U',0,'U','p','r','i','g','h','t',0,2,'I','d','e','n','t','i','f','i','e','r','_','S','t','a','t','u','s',0, +'I','d','e','n','t','i','f','i','e','r','_','S','t','a','t','u','s',0, +2,'R','e','s','t','r','i','c','t','e','d',0,'R','e','s','t','r','i','c','t','e','d',0, +2,'A','l','l','o','w','e','d',0,'A','l','l','o','w','e','d',0, +2,'g','c','m',0,'G','e','n','e','r','a','l','_','C','a','t','e','g','o','r','y','_','M','a','s','k',0, +2,'C',0,'O','t','h','e','r',0,2,'L',0,'L','e','t','t','e','r',0, 2,'L','C',0,'C','a','s','e','d','_','L','e','t','t','e','r',0, 3,'M',0,'M','a','r','k',0,'C','o','m','b','i','n','i','n','g','_','M','a','r','k',0, 2,'N',0,'N','u','m','b','e','r',0,3,'P',0,'P','u','n','c','t','u','a','t','i','o','n',0, @@ -1976,7 +2013,20 @@ const char PropNameData::nameGroups[23100]={ 2,'n','a','1',0,'U','n','i','c','o','d','e','_','1','_','N','a','m','e',0, 2,'u','c',0,'U','p','p','e','r','c','a','s','e','_','M','a','p','p','i','n','g',0, 2,'b','p','b',0,'B','i','d','i','_','P','a','i','r','e','d','_','B','r','a','c','k','e','t',0, -2,'s','c','x',0,'S','c','r','i','p','t','_','E','x','t','e','n','s','i','o','n','s',0 +2,'s','c','x',0,'S','c','r','i','p','t','_','E','x','t','e','n','s','i','o','n','s',0, +2,'I','d','e','n','t','i','f','i','e','r','_','T','y','p','e',0,'I','d','e','n','t','i','f','i','e','r','_','T','y','p','e', +0,2,'N','o','t','_','C','h','a','r','a','c','t','e','r',0,'N','o','t','_','C','h','a','r','a','c','t','e','r',0, +2,'D','e','p','r','e','c','a','t','e','d',0,'D','e','p','r','e','c','a','t','e','d',0, +2,'D','e','f','a','u','l','t','_','I','g','n','o','r','a','b','l','e',0,'D','e','f','a','u','l','t','_','I','g','n','o','r', +'a','b','l','e',0,2,'N','o','t','_','N','F','K','C',0,'N','o','t','_','N','F','K','C',0, +2,'N','o','t','_','X','I','D',0,'N','o','t','_','X','I','D',0, +2,'E','x','c','l','u','s','i','o','n',0,'E','x','c','l','u','s','i','o','n',0, +2,'O','b','s','o','l','e','t','e',0,'O','b','s','o','l','e','t','e',0, +2,'T','e','c','h','n','i','c','a','l',0,'T','e','c','h','n','i','c','a','l',0, +2,'U','n','c','o','m','m','o','n','_','U','s','e',0,'U','n','c','o','m','m','o','n','_','U','s','e',0, +2,'L','i','m','i','t','e','d','_','U','s','e',0,'L','i','m','i','t','e','d','_','U','s','e',0, +2,'I','n','c','l','u','s','i','o','n',0,'I','n','c','l','u','s','i','o','n',0, +2,'R','e','c','o','m','m','e','n','d','e','d',0,'R','e','c','o','m','m','e','n','d','e','d',0 }; U_NAMESPACE_END diff --git a/contrib/libs/icu/common/putil.cpp b/contrib/libs/icu/common/putil.cpp index ab904af20a..92c7940827 100644 --- a/contrib/libs/icu/common/putil.cpp +++ b/contrib/libs/icu/common/putil.cpp @@ -1175,6 +1175,21 @@ uprv_tzname(int n) if (ret != nullptr && uprv_strcmp(TZDEFAULT, gTimeZoneBuffer) != 0) { int32_t tzZoneInfoTailLen = uprv_strlen(TZZONEINFOTAIL); const char *tzZoneInfoTailPtr = uprv_strstr(gTimeZoneBuffer, TZZONEINFOTAIL); + // MacOS14 has the realpath as something like + // /usr/share/zoneinfo.default/Australia/Melbourne + // which will not have "/zoneinfo/" in the path. + // Therefore if we fail, we fall back to read the link which is + // /var/db/timezone/zoneinfo/Australia/Melbourne + // We also fall back to reading the link if the realpath leads to something like + // /usr/share/zoneinfo/posixrules + if (tzZoneInfoTailPtr == nullptr || + uprv_strcmp(tzZoneInfoTailPtr + tzZoneInfoTailLen, "posixrules") == 0) { + ssize_t size = readlink(TZDEFAULT, gTimeZoneBuffer, sizeof(gTimeZoneBuffer)-1); + if (size > 0) { + gTimeZoneBuffer[size] = 0; + tzZoneInfoTailPtr = uprv_strstr(gTimeZoneBuffer, TZZONEINFOTAIL); + } + } if (tzZoneInfoTailPtr != nullptr) { tzZoneInfoTailPtr += tzZoneInfoTailLen; skipZoneIDPrefix(&tzZoneInfoTailPtr); @@ -1483,7 +1498,6 @@ static void U_CALLCONV dataDirectoryInitFn() { } u_setDataDirectory(path); - return; } U_CAPI const char * U_EXPORT2 @@ -1607,7 +1621,7 @@ static const char *uprv_getPOSIXIDForCategory(int category) * of nullptr, will modify the libc behavior. */ posixID = setlocale(category, nullptr); - if ((posixID == 0) + if ((posixID == nullptr) || (uprv_strcmp("C", posixID) == 0) || (uprv_strcmp("POSIX", posixID) == 0)) { @@ -1621,16 +1635,16 @@ static const char *uprv_getPOSIXIDForCategory(int category) posixID = getenv(category == LC_MESSAGES ? "LC_MESSAGES" : "LC_CTYPE"); if ((posixID == 0) || (posixID[0] == '\0')) { #else - if (posixID == 0) { + if (posixID == nullptr) { posixID = getenv(category == LC_MESSAGES ? "LC_MESSAGES" : "LC_CTYPE"); - if (posixID == 0) { + if (posixID == nullptr) { #endif posixID = getenv("LANG"); } } } } - if ((posixID==0) + if ((posixID == nullptr) || (uprv_strcmp("C", posixID) == 0) || (uprv_strcmp("POSIX", posixID) == 0)) { @@ -1650,7 +1664,7 @@ static const char *uprv_getPOSIXIDForCategory(int category) static const char *uprv_getPOSIXIDForDefaultLocale() { static const char* posixID = nullptr; - if (posixID == 0) { + if (posixID == nullptr) { posixID = uprv_getPOSIXIDForCategory(LC_MESSAGES); } return posixID; diff --git a/contrib/libs/icu/common/rbbi.cpp b/contrib/libs/icu/common/rbbi.cpp index 73716ab406..9c4141022c 100644 --- a/contrib/libs/icu/common/rbbi.cpp +++ b/contrib/libs/icu/common/rbbi.cpp @@ -1125,6 +1125,7 @@ static icu::UStack *gLanguageBreakFactories = nullptr; static const icu::UnicodeString *gEmptyString = nullptr; static icu::UInitOnce gLanguageBreakFactoriesInitOnce {}; static icu::UInitOnce gRBBIInitOnce {}; +static icu::ICULanguageBreakFactory *gICULanguageBreakFactory = nullptr; /** * Release all static memory held by breakiterator. @@ -1153,37 +1154,41 @@ static void U_CALLCONV rbbiInit() { ucln_common_registerCleanup(UCLN_COMMON_RBBI, rbbi_cleanup); } -static void U_CALLCONV initLanguageFactories() { - UErrorCode status = U_ZERO_ERROR; +static void U_CALLCONV initLanguageFactories(UErrorCode& status) { U_ASSERT(gLanguageBreakFactories == nullptr); gLanguageBreakFactories = new UStack(_deleteFactory, nullptr, status); if (gLanguageBreakFactories != nullptr && U_SUCCESS(status)) { - ICULanguageBreakFactory *builtIn = new ICULanguageBreakFactory(status); - gLanguageBreakFactories->push(builtIn, status); + LocalPointer<ICULanguageBreakFactory> factory(new ICULanguageBreakFactory(status), status); + if (U_SUCCESS(status)) { + gICULanguageBreakFactory = factory.orphan(); + gLanguageBreakFactories->push(gICULanguageBreakFactory, status); #ifdef U_LOCAL_SERVICE_HOOK - LanguageBreakFactory *extra = (LanguageBreakFactory *)uprv_svc_hook("languageBreakFactory", &status); - if (extra != nullptr) { - gLanguageBreakFactories->push(extra, status); - } + LanguageBreakFactory *extra = (LanguageBreakFactory *)uprv_svc_hook("languageBreakFactory", &status); + if (extra != nullptr) { + gLanguageBreakFactories->push(extra, status); + } #endif + } } ucln_common_registerCleanup(UCLN_COMMON_RBBI, rbbi_cleanup); } +void ensureLanguageFactories(UErrorCode& status) { + umtx_initOnce(gLanguageBreakFactoriesInitOnce, &initLanguageFactories, status); +} static const LanguageBreakEngine* -getLanguageBreakEngineFromFactory(UChar32 c) +getLanguageBreakEngineFromFactory(UChar32 c, const char* locale) { - umtx_initOnce(gLanguageBreakFactoriesInitOnce, &initLanguageFactories); - if (gLanguageBreakFactories == nullptr) { - return nullptr; - } + UErrorCode status = U_ZERO_ERROR; + ensureLanguageFactories(status); + if (U_FAILURE(status)) return nullptr; int32_t i = gLanguageBreakFactories->size(); const LanguageBreakEngine *lbe = nullptr; while (--i >= 0) { LanguageBreakFactory *factory = (LanguageBreakFactory *)(gLanguageBreakFactories->elementAt(i)); - lbe = factory->getEngineFor(c); + lbe = factory->getEngineFor(c, locale); if (lbe != nullptr) { break; } @@ -1199,7 +1204,7 @@ getLanguageBreakEngineFromFactory(UChar32 c) // //------------------------------------------------------------------------------- const LanguageBreakEngine * -RuleBasedBreakIterator::getLanguageBreakEngine(UChar32 c) { +RuleBasedBreakIterator::getLanguageBreakEngine(UChar32 c, const char* locale) { const LanguageBreakEngine *lbe = nullptr; UErrorCode status = U_ZERO_ERROR; @@ -1207,7 +1212,7 @@ RuleBasedBreakIterator::getLanguageBreakEngine(UChar32 c) { fLanguageBreakEngines = new UStack(status); if (fLanguageBreakEngines == nullptr || U_FAILURE(status)) { delete fLanguageBreakEngines; - fLanguageBreakEngines = 0; + fLanguageBreakEngines = nullptr; return nullptr; } } @@ -1215,14 +1220,14 @@ RuleBasedBreakIterator::getLanguageBreakEngine(UChar32 c) { int32_t i = fLanguageBreakEngines->size(); while (--i >= 0) { lbe = (const LanguageBreakEngine *)(fLanguageBreakEngines->elementAt(i)); - if (lbe->handles(c)) { + if (lbe->handles(c, locale)) { return lbe; } } // No existing dictionary took the character. See if a factory wants to // give us a new LanguageBreakEngine for this character. - lbe = getLanguageBreakEngineFromFactory(c); + lbe = getLanguageBreakEngineFromFactory(c, locale); // If we got one, use it and push it on our stack. if (lbe != nullptr) { @@ -1247,7 +1252,7 @@ RuleBasedBreakIterator::getLanguageBreakEngine(UChar32 c) { U_ASSERT(!fLanguageBreakEngines->hasDeleter()); if (U_FAILURE(status)) { delete fUnhandledBreakEngine; - fUnhandledBreakEngine = 0; + fUnhandledBreakEngine = nullptr; return nullptr; } } @@ -1259,6 +1264,18 @@ RuleBasedBreakIterator::getLanguageBreakEngine(UChar32 c) { return fUnhandledBreakEngine; } +#ifndef U_HIDE_DRAFT_API +void U_EXPORT2 RuleBasedBreakIterator::registerExternalBreakEngine( + ExternalBreakEngine* toAdopt, UErrorCode& status) { + LocalPointer<ExternalBreakEngine> engine(toAdopt, status); + if (U_FAILURE(status)) return; + ensureLanguageFactories(status); + if (U_FAILURE(status)) return; + gICULanguageBreakFactory->addExternalEngine(engine.orphan(), status); +} +#endif /* U_HIDE_DRAFT_API */ + + void RuleBasedBreakIterator::dumpCache() { fBreakCache->dumpCache(); } diff --git a/contrib/libs/icu/common/rbbi_cache.cpp b/contrib/libs/icu/common/rbbi_cache.cpp index 02ca555a89..239345998b 100644 --- a/contrib/libs/icu/common/rbbi_cache.cpp +++ b/contrib/libs/icu/common/rbbi_cache.cpp @@ -158,12 +158,13 @@ void RuleBasedBreakIterator::DictionaryCache::populateDictionary(int32_t startPo // We now have a dictionary character. Get the appropriate language object // to deal with it. - const LanguageBreakEngine *lbe = fBI->getLanguageBreakEngine(c); + const LanguageBreakEngine *lbe = fBI->getLanguageBreakEngine( + c, fBI->getLocaleID(ULOC_REQUESTED_LOCALE, status)); // Ask the language object if there are any breaks. It will add them to the cache and // leave the text pointer on the other side of its range, ready to search for the next one. if (lbe != nullptr) { - foundBreakCount += lbe->findBreaks(text, rangeStart, rangeEnd, fBreaks, fBI->fIsPhraseBreaking, status); + foundBreakCount += lbe->findBreaks(text, current, rangeEnd, fBreaks, fBI->fIsPhraseBreaking, status); } // Reload the loop variables for the next go-round @@ -245,7 +246,6 @@ void RuleBasedBreakIterator::BreakCache::following(int32_t startPos, UErrorCode fBI->fDone = false; next(); } - return; } @@ -264,7 +264,6 @@ void RuleBasedBreakIterator::BreakCache::preceding(int32_t startPos, UErrorCode current(); } } - return; } @@ -276,7 +275,6 @@ void RuleBasedBreakIterator::BreakCache::nextOL() { fBI->fDone = !populateFollowing(); fBI->fPosition = fTextIdx; fBI->fRuleStatusIndex = fStatuses[fBufIdx]; - return; } @@ -296,7 +294,6 @@ void RuleBasedBreakIterator::BreakCache::previous(UErrorCode &status) { fBI->fDone = (fBufIdx == initialBufIdx); fBI->fPosition = fTextIdx; fBI->fRuleStatusIndex = fStatuses[fBufIdx]; - return; } diff --git a/contrib/libs/icu/common/rbbinode.cpp b/contrib/libs/icu/common/rbbinode.cpp index 7aa75d5ffb..71407b9e68 100644 --- a/contrib/libs/icu/common/rbbinode.cpp +++ b/contrib/libs/icu/common/rbbinode.cpp @@ -123,19 +123,66 @@ RBBINode::~RBBINode() { break; default: - delete fLeftChild; + // Avoid using a recursive implementation because of stack overflow problems. + // See bug ICU-22584. + // delete fLeftChild; + NRDeleteNode(fLeftChild); fLeftChild = nullptr; - delete fRightChild; + // delete fRightChild; + NRDeleteNode(fRightChild); fRightChild = nullptr; } - delete fFirstPosSet; delete fLastPosSet; delete fFollowPos; - } +/** + * Non-recursive delete of a node + its children. Used from the node destructor + * instead of the more obvious recursive implementation to avoid problems with + * stack overflow with some perverse test rule data (from fuzzing). + */ +void RBBINode::NRDeleteNode(RBBINode *node) { + if (node == nullptr) { + return; + } + + RBBINode *stopNode = node->fParent; + RBBINode *nextNode = node; + while (nextNode != stopNode && nextNode != nullptr) { + RBBINode *currentNode = nextNode; + + if ((currentNode->fLeftChild == nullptr && currentNode->fRightChild == nullptr) || + currentNode->fType == varRef || // varRef and setRef nodes do not + currentNode->fType == setRef) { // own their children nodes. + // CurrentNode is effectively a leaf node; it's safe to go ahead and delete it. + nextNode = currentNode->fParent; + if (nextNode) { + if (nextNode->fLeftChild == currentNode) { + nextNode->fLeftChild = nullptr; + } else if (nextNode->fRightChild == currentNode) { + nextNode->fRightChild = nullptr; + } + } + delete currentNode; + } else if (currentNode->fLeftChild) { + nextNode = currentNode->fLeftChild; + if (nextNode->fParent == nullptr) { + nextNode->fParent = currentNode; + // fParent isn't always set; do it now if not. + } + U_ASSERT(nextNode->fParent == currentNode); + } else if (currentNode->fRightChild) { + nextNode = currentNode->fRightChild; + if (nextNode->fParent == nullptr) { + nextNode->fParent = currentNode; + // fParent isn't always set; do it now if not. + } + U_ASSERT(nextNode->fParent == currentNode); + } + } +} //------------------------------------------------------------------------- // @@ -192,7 +239,17 @@ RBBINode *RBBINode::cloneTree() { // nested references are handled by cloneTree(), not here. // //------------------------------------------------------------------------- -RBBINode *RBBINode::flattenVariables() { +constexpr int kRecursiveDepthLimit = 3500; +RBBINode *RBBINode::flattenVariables(UErrorCode& status, int depth) { + if (U_FAILURE(status)) { + return this; + } + // If the depth of the stack is too deep, we return U_INPUT_TOO_LONG_ERROR + // to avoid stack overflow crash. + if (depth > kRecursiveDepthLimit) { + status = U_INPUT_TOO_LONG_ERROR; + return this; + } if (fType == varRef) { RBBINode *retNode = fLeftChild->cloneTree(); if (retNode != nullptr) { @@ -204,11 +261,11 @@ RBBINode *RBBINode::flattenVariables() { } if (fLeftChild != nullptr) { - fLeftChild = fLeftChild->flattenVariables(); + fLeftChild = fLeftChild->flattenVariables(status, depth+1); fLeftChild->fParent = this; } if (fRightChild != nullptr) { - fRightChild = fRightChild->flattenVariables(); + fRightChild = fRightChild->flattenVariables(status, depth+1); fRightChild->fParent = this; } return this; diff --git a/contrib/libs/icu/common/rbbinode.h b/contrib/libs/icu/common/rbbinode.h index 4ed84d4e07..497a31b8d0 100644 --- a/contrib/libs/icu/common/rbbinode.h +++ b/contrib/libs/icu/common/rbbinode.h @@ -94,9 +94,10 @@ class RBBINode : public UMemory { RBBINode(NodeType t); RBBINode(const RBBINode &other); ~RBBINode(); + static void NRDeleteNode(RBBINode *node); RBBINode *cloneTree(); - RBBINode *flattenVariables(); + RBBINode *flattenVariables(UErrorCode &status, int depth=0); void flattenSets(); void findNodes(UVector *dest, RBBINode::NodeType kind, UErrorCode &status); diff --git a/contrib/libs/icu/common/rbbirb.cpp b/contrib/libs/icu/common/rbbirb.cpp index 7177254ec4..1b2ee67187 100644 --- a/contrib/libs/icu/common/rbbirb.cpp +++ b/contrib/libs/icu/common/rbbirb.cpp @@ -66,7 +66,6 @@ RBBIRuleBuilder::RBBIRuleBuilder(const UnicodeString &rules, fForwardTable = nullptr; fRuleStatusVals = nullptr; fChainRules = false; - fLBCMNoChain = false; fLookAheadHardBreak = false; fUSetNodes = nullptr; fRuleStatusVals = nullptr; @@ -87,7 +86,8 @@ RBBIRuleBuilder::RBBIRuleBuilder(const UnicodeString &rules, if (U_FAILURE(status)) { return; } - if(fSetBuilder == 0 || fScanner == 0 || fUSetNodes == 0 || fRuleStatusVals == 0) { + if (fSetBuilder == nullptr || fScanner == nullptr || + fUSetNodes == nullptr || fRuleStatusVals == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; } } @@ -157,7 +157,7 @@ RBBIDataHeader *RBBIRuleBuilder::flattenData() { int32_t statusTableSize = align8(fRuleStatusVals->size() * sizeof(int32_t)); int32_t rulesLengthInUTF8 = 0; - u_strToUTF8WithSub(0, 0, &rulesLengthInUTF8, + u_strToUTF8WithSub(nullptr, 0, &rulesLengthInUTF8, fStrippedRules.getBuffer(), fStrippedRules.length(), 0xfffd, nullptr, fStatus); *fStatus = U_ZERO_ERROR; diff --git a/contrib/libs/icu/common/rbbirb.h b/contrib/libs/icu/common/rbbirb.h index d983a184b6..96d3aa643d 100644 --- a/contrib/libs/icu/common/rbbirb.h +++ b/contrib/libs/icu/common/rbbirb.h @@ -159,9 +159,6 @@ public: UBool fChainRules; // True for chained Unicode TR style rules. // False for traditional regexp rules. - UBool fLBCMNoChain; // True: suppress chaining of rules on - // chars with LineBreak property == CM. - UBool fLookAheadHardBreak; // True: Look ahead matches cause an // immediate break, no continuing for the // longest match. diff --git a/contrib/libs/icu/common/rbbiscan.cpp b/contrib/libs/icu/common/rbbiscan.cpp index 455ace78b8..f5fdba076f 100644 --- a/contrib/libs/icu/common/rbbiscan.cpp +++ b/contrib/libs/icu/common/rbbiscan.cpp @@ -289,6 +289,9 @@ UBool RBBIRuleScanner::doParseActions(int32_t action) // Terminate expression, leaves expression parse tree rooted in TOS node. fixOpStack(RBBINode::precStart); + if (U_FAILURE(*fRB->fStatus)) { + break; + } RBBINode *startExprNode = fNodeStack[fNodeStackPtr-2]; RBBINode *varRefNode = fNodeStack[fNodeStackPtr-1]; @@ -312,6 +315,11 @@ UBool RBBIRuleScanner::doParseActions(int32_t action) UErrorCode t = *fRB->fStatus; *fRB->fStatus = U_ZERO_ERROR; error(t); + // When adding $variableRef to the symbol table fail, Delete + // both nodes because deleting varRefNode will not delete + // RHSExprNode internally. + delete RHSExprNode; + delete varRefNode; } // Clean up the stack. @@ -522,7 +530,13 @@ UBool RBBIRuleScanner::doParseActions(int32_t action) n = fNodeStack[fNodeStackPtr]; uint32_t v = u_charDigitValue(fC.fChar); U_ASSERT(v < 10); - n->fVal = n->fVal*10 + v; + int64_t updated = static_cast<int64_t>(n->fVal)*10 + v; + // Avoid overflow n->fVal + if (updated > INT32_MAX) { + error(U_BRK_RULE_SYNTAX); + break; + } + n->fVal = static_cast<int32_t>(updated); break; } @@ -547,8 +561,6 @@ UBool RBBIRuleScanner::doParseActions(int32_t action) UnicodeString opt(fRB->fRules, fOptionStart, fScanIndex-fOptionStart); if (opt == UNICODE_STRING("chain", 5)) { fRB->fChainRules = true; - } else if (opt == UNICODE_STRING("LBCMNoChain", 11)) { - fRB->fLBCMNoChain = true; } else if (opt == UNICODE_STRING("forward", 7)) { fRB->fDefaultTree = &fRB->fForwardTree; } else if (opt == UNICODE_STRING("reverse", 7)) { @@ -764,6 +776,7 @@ void RBBIRuleScanner::findSetFor(const UnicodeString &s, RBBINode *node, Unicode RBBINode *usetNode = new RBBINode(RBBINode::uset); if (usetNode == nullptr) { error(U_MEMORY_ALLOCATION_ERROR); + delete setToAdopt; return; } usetNode->fInputSet = setToAdopt; @@ -798,8 +811,6 @@ void RBBIRuleScanner::findSetFor(const UnicodeString &s, RBBINode *node, Unicode el->key = tkey; el->val = usetNode; uhash_put(fSetTable, el->key, el, fRB->fStatus); - - return; } @@ -928,6 +939,9 @@ void RBBIRuleScanner::nextChar(RBBIRuleChar &c) { } } + if (c.fChar == (UChar32)-1) { + return; + } if (fQuoteMode) { c.fEscaped = true; } @@ -1201,7 +1215,6 @@ RBBINode *RBBIRuleScanner::pushNewNode(RBBINode::NodeType t) { // //------------------------------------------------------------------------------ void RBBIRuleScanner::scanSet() { - UnicodeSet *uset; ParsePosition pos; int startPos; int i; @@ -1213,12 +1226,12 @@ void RBBIRuleScanner::scanSet() { pos.setIndex(fScanIndex); startPos = fScanIndex; UErrorCode localStatus = U_ZERO_ERROR; - uset = new UnicodeSet(); - if (uset == nullptr) { - localStatus = U_MEMORY_ALLOCATION_ERROR; - } else { - uset->applyPatternIgnoreSpace(fRB->fRules, pos, fSymbolTable, localStatus); + LocalPointer<UnicodeSet> uset(new UnicodeSet(), localStatus); + if (U_FAILURE(localStatus)) { + error(localStatus); + return; } + uset->applyPatternIgnoreSpace(fRB->fRules, pos, fSymbolTable, localStatus); if (U_FAILURE(localStatus)) { // TODO: Get more accurate position of the error from UnicodeSet's return info. // UnicodeSet appears to not be reporting correctly at this time. @@ -1226,20 +1239,22 @@ void RBBIRuleScanner::scanSet() { RBBIDebugPrintf("UnicodeSet parse position.ErrorIndex = %d\n", pos.getIndex()); #endif error(localStatus); - delete uset; return; } // Verify that the set contains at least one code point. // - U_ASSERT(uset!=nullptr); - if (uset->isEmpty()) { + U_ASSERT(uset.isValid()); + UnicodeSet tempSet(*uset); + // Use tempSet to handle the case that the UnicodeSet contains + // only string element, such as [{ab}] and treat it as empty set. + tempSet.removeAllStrings(); + if (tempSet.isEmpty()) { // This set is empty. // Make it an error, because it almost certainly is not what the user wanted. // Also, avoids having to think about corner cases in the tree manipulation code // that occurs later on. error(U_BRK_RULE_EMPTY_SET); - delete uset; return; } @@ -1248,7 +1263,7 @@ void RBBIRuleScanner::scanSet() { // Don't just set fScanIndex because the line/char positions maintained // for error reporting would be thrown off. i = pos.getIndex(); - for (;;) { + for (;U_SUCCESS(*fRB->fStatus);) { if (fNextIndex >= i) { break; } @@ -1271,7 +1286,7 @@ void RBBIRuleScanner::scanSet() { // character categories for run time engine. // - Eliminates mulitiple instances of the same set. // - Creates a new uset node if necessary (if this isn't a duplicate.) - findSetFor(n->fText, n, uset); + findSetFor(n->fText, n, uset.orphan()); } } diff --git a/contrib/libs/icu/common/rbbistbl.cpp b/contrib/libs/icu/common/rbbistbl.cpp index 844351bd0d..bfaacf6425 100644 --- a/contrib/libs/icu/common/rbbistbl.cpp +++ b/contrib/libs/icu/common/rbbistbl.cpp @@ -122,7 +122,7 @@ const UnicodeFunctor *RBBISymbolTable::lookupMatcher(UChar32 ch) const RBBISymbolTable *This = (RBBISymbolTable *)this; // cast off const if (ch == 0xffff) { retVal = fCachedSetLookup; - This->fCachedSetLookup = 0; + This->fCachedSetLookup = nullptr; } return retVal; } diff --git a/contrib/libs/icu/common/rbbitblb.cpp b/contrib/libs/icu/common/rbbitblb.cpp index 0c2bcff4e5..96a0b0338d 100644 --- a/contrib/libs/icu/common/rbbitblb.cpp +++ b/contrib/libs/icu/common/rbbitblb.cpp @@ -81,7 +81,10 @@ void RBBITableBuilder::buildForwardTable() { // Walk through the tree, replacing any references to $variables with a copy of the // parse tree for the substitution expression. // - fTree = fTree->flattenVariables(); + fTree = fTree->flattenVariables(*fStatus, 0); + if (U_FAILURE(*fStatus)) { + return; + } #ifdef RBBI_DEBUG if (fRB->fDebugEnv && uprv_strstr(fRB->fDebugEnv, "ftree")) { RBBIDebugPuts("\nParse tree after flattening variable references."); @@ -458,21 +461,6 @@ void RBBITableBuilder::calcChainedFollowPos(RBBINode *tree, RBBINode *endMarkNod // We've got a node that can end a match. - // !!LBCMNoChain implementation: If this node's val correspond to - // the Line Break $CM char class, don't chain from it. - // TODO: Remove this. !!LBCMNoChain is deprecated, and is not used - // by any of the standard ICU rules. - if (fRB->fLBCMNoChain) { - UChar32 c = this->fRB->fSetBuilder->getFirstChar(endNode->fVal); - if (c != -1) { - // c == -1 occurs with sets containing only the {eof} marker string. - ULineBreak cLBProp = (ULineBreak)u_getIntPropertyValue(c, UCHAR_LINE_BREAK); - if (cLBProp == U_LB_COMBINING_MARK) { - continue; - } - } - } - // Now iterate over the nodes that can start a match, looking for ones // with the same char class as our ending node. RBBINode *startNode; diff --git a/contrib/libs/icu/common/resbund.cpp b/contrib/libs/icu/common/resbund.cpp index 54383c981d..41337cdc15 100644 --- a/contrib/libs/icu/common/resbund.cpp +++ b/contrib/libs/icu/common/resbund.cpp @@ -179,7 +179,7 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ResourceBundle) ResourceBundle::ResourceBundle(UErrorCode &err) :UObject(), fLocale(nullptr) { - fResource = ures_open(0, Locale::getDefault().getName(), &err); + fResource = ures_open(nullptr, Locale::getDefault().getName(), &err); } ResourceBundle::ResourceBundle(const ResourceBundle &other) @@ -188,7 +188,7 @@ ResourceBundle::ResourceBundle(const ResourceBundle &other) UErrorCode status = U_ZERO_ERROR; if (other.fResource) { - fResource = ures_copyResb(0, other.fResource, &status); + fResource = ures_copyResb(nullptr, other.fResource, &status); } else { /* Copying a bad resource bundle */ fResource = nullptr; @@ -199,7 +199,7 @@ ResourceBundle::ResourceBundle(UResourceBundle *res, UErrorCode& err) :UObject(), fLocale(nullptr) { if (res) { - fResource = ures_copyResb(0, res, &err); + fResource = ures_copyResb(nullptr, res, &err); } else { /* Copying a bad resource bundle */ fResource = nullptr; @@ -218,7 +218,7 @@ ResourceBundle& ResourceBundle::operator=(const ResourceBundle& other) if(this == &other) { return *this; } - if(fResource != 0) { + if (fResource != nullptr) { ures_close(fResource); fResource = nullptr; } @@ -228,7 +228,7 @@ ResourceBundle& ResourceBundle::operator=(const ResourceBundle& other) } UErrorCode status = U_ZERO_ERROR; if (other.fResource) { - fResource = ures_copyResb(0, other.fResource, &status); + fResource = ures_copyResb(nullptr, other.fResource, &status); } else { /* Copying a bad resource bundle */ fResource = nullptr; @@ -238,12 +238,10 @@ ResourceBundle& ResourceBundle::operator=(const ResourceBundle& other) ResourceBundle::~ResourceBundle() { - if(fResource != 0) { + if (fResource != nullptr) { ures_close(fResource); } - if(fLocale != nullptr) { - delete(fLocale); - } + delete fLocale; } ResourceBundle * @@ -311,7 +309,7 @@ ResourceBundle ResourceBundle::getNext(UErrorCode& status) { UnicodeString ResourceBundle::getNextString(UErrorCode& status) { int32_t len = 0; - const char16_t* r = ures_getNextString(fResource, &len, 0, &status); + const char16_t* r = ures_getNextString(fResource, &len, nullptr, &status); return UnicodeString(true, r, len); } diff --git a/contrib/libs/icu/common/ruleiter.cpp b/contrib/libs/icu/common/ruleiter.cpp index 690635a908..0e665435a7 100644 --- a/contrib/libs/icu/common/ruleiter.cpp +++ b/contrib/libs/icu/common/ruleiter.cpp @@ -27,12 +27,12 @@ RuleCharacterIterator::RuleCharacterIterator(const UnicodeString& theText, const text(theText), pos(thePos), sym(theSym), - buf(0), + buf(nullptr), bufPos(0) {} UBool RuleCharacterIterator::atEnd() const { - return buf == 0 && pos.getIndex() == text.length(); + return buf == nullptr && pos.getIndex() == text.length(); } UChar32 RuleCharacterIterator::next(int32_t options, UBool& isEscaped, UErrorCode& ec) { @@ -45,8 +45,8 @@ UChar32 RuleCharacterIterator::next(int32_t options, UBool& isEscaped, UErrorCod c = _current(); _advance(U16_LENGTH(c)); - if (c == SymbolTable::SYMBOL_REF && buf == 0 && - (options & PARSE_VARIABLES) != 0 && sym != 0) { + if (c == SymbolTable::SYMBOL_REF && buf == nullptr && + (options & PARSE_VARIABLES) != 0 && sym != nullptr) { UnicodeString name = sym->parseReference(text, pos, text.length()); // If name is empty there was an isolated SYMBOL_REF; // return it. Caller must be prepared for this. @@ -55,13 +55,13 @@ UChar32 RuleCharacterIterator::next(int32_t options, UBool& isEscaped, UErrorCod } bufPos = 0; buf = sym->lookup(name); - if (buf == 0) { + if (buf == nullptr) { ec = U_UNDEFINED_VARIABLE; return DONE; } // Handle empty variable value if (buf->length() == 0) { - buf = 0; + buf = nullptr; } continue; } @@ -114,7 +114,7 @@ UnicodeString& RuleCharacterIterator::lookahead(UnicodeString& result, int32_t m if (maxLookAhead < 0) { maxLookAhead = 0x7FFFFFFF; } - if (buf != 0) { + if (buf != nullptr) { buf->extract(bufPos, maxLookAhead, result); } else { text.extract(pos.getIndex(), maxLookAhead, result); @@ -135,7 +135,7 @@ UnicodeString& RuleCharacterIterator::toString(UnicodeString& result) const { */ UChar32 RuleCharacterIterator::_current() const { - if (buf != 0) { + if (buf != nullptr) { return buf->char32At(bufPos); } else { int i = pos.getIndex(); @@ -144,10 +144,10 @@ UChar32 RuleCharacterIterator::_current() const { } void RuleCharacterIterator::_advance(int32_t count) { - if (buf != 0) { + if (buf != nullptr) { bufPos += count; if (bufPos == buf->length()) { - buf = 0; + buf = nullptr; } } else { pos.setIndex(pos.getIndex() + count); diff --git a/contrib/libs/icu/common/ruleiter.h b/contrib/libs/icu/common/ruleiter.h index 41731407da..22dec1e8cc 100644 --- a/contrib/libs/icu/common/ruleiter.h +++ b/contrib/libs/icu/common/ruleiter.h @@ -224,7 +224,7 @@ private: }; inline UBool RuleCharacterIterator::inVariable() const { - return buf != 0; + return buf != nullptr; } U_NAMESPACE_END diff --git a/contrib/libs/icu/common/ubidi_props_data.h b/contrib/libs/icu/common/ubidi_props_data.h index 5dcd1d7c78..f85dc09675 100644 --- a/contrib/libs/icu/common/ubidi_props_data.h +++ b/contrib/libs/icu/common/ubidi_props_data.h @@ -9,11 +9,11 @@ #ifdef INCLUDED_FROM_UBIDI_PROPS_C -static const UVersionInfo ubidi_props_dataVersion={0xf,0,0,0}; +static const UVersionInfo ubidi_props_dataVersion={0xf,1,0,0}; -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 int32_t ubidi_props_indexes[UBIDI_IX_TOP]={0x10,0x6ba0,0x65b0,0x28,0x620,0x8cc,0x10ac0,0x10d24,0,0,0,0,0,0,0,0x6702b6}; -static const uint16_t ubidi_props_trieIndex[13024]={ +static const uint16_t ubidi_props_trieIndex[13008]={ 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, @@ -38,8 +38,8 @@ static const uint16_t ubidi_props_trieIndex[13024]={ 0x7e8,0x7f0,0x7f8,0x7ff,0x806,0x80e,0x812,0x7e0,0x67c,0x67c,0x67c,0x81a,0x820,0x67c,0x67c,0x826, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x82e,0x3a7,0x3a7,0x3a7,0x836,0x3a7,0x3a7,0x3a7,0x3f5, 0x83e,0x846,0x849,0x3a7,0x851,0x67c,0x67c,0x67f,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x858,0x85e, -0x86e,0x866,0x3a7,0x3a7,0x876,0x61f,0x3a7,0x3ce,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x67c,0x835, -0x3dc,0x3a7,0x87e,0x886,0x3a7,0x88e,0x896,0x3a7,0x3a7,0x3a7,0x3a7,0x89a,0x3a7,0x3a7,0x674,0x3cd, +0x86e,0x866,0x3a7,0x3a7,0x876,0x61f,0x3a7,0x3ce,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x67c,0x87e, +0x3dc,0x3a7,0x85e,0x882,0x3a7,0x88a,0x892,0x3a7,0x3a7,0x3a7,0x3a7,0x896,0x3a7,0x3a7,0x674,0x3cd, 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,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, @@ -96,10 +96,10 @@ static const uint16_t ubidi_props_trieIndex[13024]={ 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,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x87e,0x67c,0x595,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x8a1,0x3a7,0x3a7,0x8a6,0x8ae,0x3a7,0x3a7,0x5cb,0x67c,0x673,0x3a7,0x3a7,0x8b6,0x3a7,0x3a7,0x3a7, -0x8be,0x8c5,0x645,0x8cd,0x3a7,0x3a7,0x5a1,0x8d5,0x3a7,0x8dd,0x8e4,0x3a7,0x501,0x8e9,0x3a7,0x51a, -0x3a7,0x8f1,0x8f9,0x51c,0x3a7,0x8fd,0x51b,0x905,0x3a7,0x3a7,0x3a7,0x90b,0x3a7,0x3a7,0x3a7,0x912, +0x3a7,0x3a7,0x3a7,0x3a7,0x85e,0x67c,0x595,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, +0x89d,0x3a7,0x3a7,0x8a2,0x8aa,0x3a7,0x3a7,0x5cb,0x67c,0x673,0x3a7,0x3a7,0x8b2,0x3a7,0x3a7,0x3a7, +0x8ba,0x8c1,0x645,0x8c9,0x3a7,0x3a7,0x5a1,0x8d1,0x3a7,0x8d9,0x8e0,0x3a7,0x501,0x8e5,0x3a7,0x51a, +0x3a7,0x8ed,0x8f5,0x51c,0x3a7,0x8f9,0x51b,0x901,0x3a7,0x3a7,0x3a7,0x907,0x3a7,0x3a7,0x3a7,0x90e, 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,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, @@ -139,9 +139,9 @@ static const uint16_t ubidi_props_trieIndex[13024]={ 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,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x926,0x91a,0x91e,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6, -0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x92e,0x936,0x4a6,0x4a6,0x4a6,0x93b,0x93f, -0x947,0x94f,0x953,0x95b,0x4a6,0x4a6,0x4a6,0x95f,0x967,0x397,0x96f,0x977,0x3a7,0x3a7,0x3a7,0x97f, +0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x922,0x916,0x91a,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6, +0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x92a,0x932,0x4a6,0x4a6,0x4a6,0x937,0x93b, +0x943,0x94b,0x94f,0x957,0x4a6,0x4a6,0x4a6,0x95b,0x963,0x397,0x96b,0x973,0x3a7,0x3a7,0x3a7,0x97b, 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, 0xe9c,0xe9c,0xedc,0xf1c,0xe9c,0xe9c,0xe9c,0xe9c,0xe9c,0xe9c,0xf54,0xf94,0xfd4,0xfe4,0x1024,0x1030, @@ -178,68 +178,68 @@ static const uint16_t ubidi_props_trieIndex[13024]={ 0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xd89, 0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0, 0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xd89, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x987,0x3a7,0x67c,0x67c,0x98f,0x61f,0x3a7,0x514, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x997,0x3a7,0x3a7,0x3a7,0x99e,0x3a7,0x3a7,0x3a7,0x3a7, +0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x983,0x3a7,0x67c,0x67c,0x98b,0x61f,0x3a7,0x514, +0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x993,0x3a7,0x3a7,0x3a7,0x99a,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, -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,0x4a6,0xa00,0x43c,0xa08,0xa0f,0xa15,0xa1d,0xa21,0xa29,0x43c, -0x51b,0xa31,0xa38,0xa3f,0x41e,0xa47,0x569,0x3a7,0x501,0xa4e,0x3a7,0xa54,0x41e,0xa59,0xa61,0x3a7, -0x3a7,0xa66,0x51b,0x3a7,0x3a7,0x3a7,0x836,0xa6e,0x41e,0x5a3,0x57e,0xa75,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0xa31,0xa7d,0x3a7,0x3a7,0xa85,0xa8d,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xa91,0xa99,0x3a7, -0x3a7,0xaa1,0x57e,0xaa9,0x3a7,0xaaf,0x3a7,0x3a7,0x60f,0xab7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0xabc,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xac3,0xacb,0x3a7,0x3a7,0x3a7,0xace,0x57e,0xad6, -0xada,0xae2,0x3a7,0xae9,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0xaf0,0x3a7,0x3a7,0xafe,0xaf8,0x3a7,0x3a7,0x3a7,0xb06,0xb0e,0x3a7,0xb12,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x5a5,0x41e,0x99e,0xb1a,0x3a7,0x3a7,0x3a7,0xb27,0xb22,0x3a7, +0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x9a2,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c, +0x9aa,0x9ae,0x43c,0x43c,0x43c,0x43c,0x9be,0x9b6,0x43c,0x9c6,0x43c,0x43c,0x9ce,0x9d4,0x43c,0x43c, +0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x9e4,0x9dc,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c, +0x43c,0x43c,0x43c,0x9ec,0x43c,0x9f4,0x4a6,0x9fc,0x43c,0xa04,0xa0b,0xa11,0xa19,0xa1d,0xa25,0x43c, +0x51b,0xa2d,0xa34,0xa3b,0x41e,0xa43,0x569,0x3a7,0x501,0xa4a,0x3a7,0xa50,0x41e,0xa55,0xa5d,0x3a7, +0x3a7,0xa62,0x51b,0x3a7,0x3a7,0x3a7,0x836,0xa6a,0x41e,0x5a3,0x57e,0xa71,0x3a7,0x3a7,0x3a7,0x3a7, +0x3a7,0xa2d,0xa79,0x3a7,0x3a7,0xa81,0xa89,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xa8d,0xa95,0x3a7, +0x3a7,0xa9d,0x57e,0xaa5,0x3a7,0xaab,0x3a7,0x3a7,0x60f,0xab3,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, +0xab8,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xabf,0xac7,0x3a7,0x3a7,0x3a7,0xaca,0x57e,0xad2, +0xad6,0xade,0x3a7,0xae5,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, +0xaec,0x3a7,0x3a7,0xafa,0xaf4,0x3a7,0x3a7,0x3a7,0xb02,0xb0a,0x3a7,0xb0e,0x3a7,0x3a7,0x3a7,0x3a7, +0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x5a5,0x41e,0x99a,0xb16,0x3a7,0x3a7,0x3a7,0xb23,0xb1e,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, -0xb2f,0xb37,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,0xb3d, -0x3a7,0xb43,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, +0xb2b,0xb33,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,0xb39, +0x3a7,0xb3f,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,0xa55,0x3a7,0xb49,0x3a7,0x3a7,0xb51,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, +0x3a7,0x3a7,0xa51,0x3a7,0xb45,0x3a7,0x3a7,0xb4d,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,0x535,0xb59,0x3a7,0x3a7, +0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x535,0xb55,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,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3f5,0xb61,0x500,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0xb69,0xb71,0xb77,0x3a7,0xb7d,0x67c,0x67c,0xb85,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x67c,0x67c,0xb8d,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,0xb93, -0x3a7,0xb9a,0x3a7,0xb96,0x3a7,0xb9d,0x3a7,0xba5,0xba9,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3f5,0xbb1,0x3f5,0xbb8,0xbbf,0xbc7,0x3a7, +0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3f5,0xb5d,0x500,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, +0x3a7,0x3a7,0x3a7,0x3a7,0xb65,0xb6d,0xb73,0x3a7,0xb79,0x67c,0x67c,0xb81,0x3a7,0x3a7,0x3a7,0x3a7, +0x3a7,0x67c,0x67c,0xb89,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,0xb8f, +0x3a7,0xb96,0x3a7,0xb92,0x3a7,0xb99,0x3a7,0xba1,0xba5,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, +0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3f5,0xbad,0x3f5,0xbb4,0xbbb,0xbc3,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,0x3a7,0x3a7,0x3a7,0x3a7,0xbcf,0xbd7,0x3a7,0x3a7,0xa55,0x3a7,0x3a7, -0x3a7,0x3a7,0xb43,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xa81,0x3a7, -0xbdc,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,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,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,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xbcb,0xbd3,0x3a7,0x3a7,0xa51,0x3a7,0x3a7, +0x3a7,0x3a7,0xb3f,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xa7d,0x3a7, +0xbd8,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, +0xbe0,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,0xbe8, +0x43c,0xbf0,0xbf0,0xbf7,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c, +0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x91a,0x4a6,0x4a6,0x43c, +0x43c,0x4a6,0x4a6,0xbff,0x43c,0x43c,0x43c,0x43c,0x43c,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6, +0xc07,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x67c,0xc0f,0x67c,0x67c,0x67f,0xc14,0xc18, +0x858,0xc20,0x3c9,0x3a7,0xc26,0x3a7,0xc2b,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,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0xc37, -0x98f,0x67c,0x67c,0x67c,0xc3e,0x67c,0x67c,0xc45,0xc4d,0xc13,0x67c,0xc55,0x67c,0xc5d,0xc62,0x3a7, -0x3a7,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67f,0xc6a,0xc73,0xc77,0xc7f, -0xc6f,0x67c,0x67c,0x67c,0x67c,0xc87,0x67c,0x792,0xc8f,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, +0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0xc33, +0x98b,0x67c,0x67c,0x67c,0xc3a,0x67c,0x67c,0xc41,0xc49,0xc0f,0x67c,0xc51,0x67c,0xc59,0xc5e,0x3a7, +0x3a7,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67f,0xc66,0xc6f,0xc73,0xc7b, +0xc6b,0x67c,0x67c,0x67c,0x67c,0xc83,0x67c,0x792,0xc8b,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,0xc96,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, +0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xc92,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,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,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, +0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xc92,0xca2,0xc9a,0xc9a,0xc9a,0xca3,0xca3,0xca3, +0xca3,0x3f5,0x3f5,0x3f5,0x3f5,0x3f5,0x3f5,0x3f5,0xcab,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3, +0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3, +0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3, +0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3, +0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,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, @@ -551,15 +551,14 @@ static const uint16_t ubidi_props_trieIndex[13024]={ 0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, 0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0,0,0,0,0xa,0,0,0,0,0,0,0, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0, 0,0,0xb1,0xb1,0xb1,0xb1,0,0,0xa,0,0,0,0,0,0xa,0xa, 0,0,0,0,0,0xa,0xa,0xa,9,0xa,0xa,0xa,0xa,0,0,0, 0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0xa,0xa,0x310a,0xf20a,0x310a,0xf20a, 0x310a,0xf20a,0x310a,0xf20a,0xa,0xa,0xa,0xa,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,0xa,0xa,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0,0, +0,0xb1,0xb1,0xa,0xa,0,0,0,0xa,0xa,0xa,0xa,0,0,0,0, +0,0,0,0,0,0,0,0xa,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,0,0,0,0xa,0xa,0xa,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa, @@ -935,13 +934,13 @@ static const UBiDiProps ubidi_props_singleton={ ubidi_props_trieIndex+3612, nullptr, 3612, - 9412, + 9396, 0x1a0, 0xe9c, 0x0, 0x0, 0x110000, - 0x32dc, + 0x32cc, nullptr, 0, false, false, 0, nullptr }, { 2,2,0,0 } diff --git a/contrib/libs/icu/common/ubidiln.cpp b/contrib/libs/icu/common/ubidiln.cpp index 63c4f9190a..65e1212c7b 100644 --- a/contrib/libs/icu/common/ubidiln.cpp +++ b/contrib/libs/icu/common/ubidiln.cpp @@ -244,7 +244,6 @@ ubidi_setLine(const UBiDi *pParaBiDi, } } pLineBiDi->pParaBiDi=pParaBiDi; /* mark successful setLine */ - return; } U_CAPI UBiDiLevel U_EXPORT2 diff --git a/contrib/libs/icu/common/ubrk.cpp b/contrib/libs/icu/common/ubrk.cpp index 46ec0d785a..712ce49716 100644 --- a/contrib/libs/icu/common/ubrk.cpp +++ b/contrib/libs/icu/common/ubrk.cpp @@ -38,9 +38,9 @@ ubrk_open(UBreakIteratorType type, UErrorCode *status) { - if(U_FAILURE(*status)) return 0; + if (U_FAILURE(*status)) return nullptr; - BreakIterator *result = 0; + BreakIterator *result = nullptr; switch(type) { @@ -70,11 +70,11 @@ ubrk_open(UBreakIteratorType type, // check for allocation error if (U_FAILURE(*status)) { - return 0; + return nullptr; } - if(result == 0) { + if (result == nullptr) { *status = U_MEMORY_ALLOCATION_ERROR; - return 0; + return nullptr; } @@ -102,14 +102,14 @@ ubrk_openRules( const char16_t *rules, UErrorCode *status) { if (status == nullptr || U_FAILURE(*status)){ - return 0; + return nullptr; } - BreakIterator *result = 0; + BreakIterator *result = nullptr; UnicodeString ruleString(rules, rulesLength); result = RBBIRuleBuilder::createRuleBasedBreakIterator(ruleString, parseErr, *status); if(U_FAILURE(*status)) { - return 0; + return nullptr; } UBreakIterator *uBI = (UBreakIterator *)result; diff --git a/contrib/libs/icu/common/ucase.cpp b/contrib/libs/icu/common/ucase.cpp index 392e1266ae..4fd23fc935 100644 --- a/contrib/libs/icu/common/ucase.cpp +++ b/contrib/libs/icu/common/ucase.cpp @@ -317,43 +317,6 @@ ucase_addCaseClosure(UChar32 c, const USetAdder *sa) { } } -namespace { - -/** - * Add the simple case closure mapping, - * except if there is not actually an scf relationship between the two characters. - * TODO: Unicode should probably add the corresponding scf mappings. - * See https://crbug.com/v8/13377 and Unicode-internal PAG issue #23. - * If & when those scf mappings are added, we should be able to remove all of these exceptions. - */ -void addOneSimpleCaseClosure(UChar32 c, UChar32 t, const USetAdder *sa) { - switch (c) { - case 0x0390: - if (t == 0x1FD3) { return; } - break; - case 0x03B0: - if (t == 0x1FE3) { return; } - break; - case 0x1FD3: - if (t == 0x0390) { return; } - break; - case 0x1FE3: - if (t == 0x03B0) { return; } - break; - case 0xFB05: - if (t == 0xFB06) { return; } - break; - case 0xFB06: - if (t == 0xFB05) { return; } - break; - default: - break; - } - sa->add(sa->set, t); -} - -} // namespace - U_CFUNC void U_EXPORT2 ucase_addSimpleCaseClosure(UChar32 c, const USetAdder *sa) { uint16_t props=UTRIE2_GET16(&ucase_props_singleton.trie, c); @@ -397,7 +360,7 @@ ucase_addSimpleCaseClosure(UChar32 c, const USetAdder *sa) { pe=pe0; UChar32 mapping; GET_SLOT_VALUE(excWord, idx, pe, mapping); - addOneSimpleCaseClosure(c, mapping, sa); + sa->add(sa->set, mapping); } } if(HAS_SLOT(excWord, UCASE_EXC_DELTA)) { @@ -405,7 +368,7 @@ ucase_addSimpleCaseClosure(UChar32 c, const USetAdder *sa) { int32_t delta; GET_SLOT_VALUE(excWord, UCASE_EXC_DELTA, pe, delta); UChar32 mapping = (excWord&UCASE_EXC_DELTA_IS_NEGATIVE)==0 ? c+delta : c-delta; - addOneSimpleCaseClosure(c, mapping, sa); + sa->add(sa->set, mapping); } /* get the closure string pointer & length */ @@ -448,7 +411,7 @@ ucase_addSimpleCaseClosure(UChar32 c, const USetAdder *sa) { for(int32_t idx=0; idx<closureLength;) { UChar32 mapping; U16_NEXT_UNSAFE(closure, idx, mapping); - addOneSimpleCaseClosure(c, mapping, sa); + sa->add(sa->set, mapping); } } } diff --git a/contrib/libs/icu/common/ucase.h b/contrib/libs/icu/common/ucase.h index e03b311870..af73873608 100644 --- a/contrib/libs/icu/common/ucase.h +++ b/contrib/libs/icu/common/ucase.h @@ -357,7 +357,7 @@ enum { /* definitions for 16-bit case properties word ------------------------------ */ U_CFUNC const UTrie2 * U_EXPORT2 -ucase_getTrie(); +ucase_getTrie(void); /* 2-bit constants for types of cased characters */ #define UCASE_TYPE_MASK 3 diff --git a/contrib/libs/icu/common/ucase_props_data.h b/contrib/libs/icu/common/ucase_props_data.h index 7e6de63fb7..92b59520cc 100644 --- a/contrib/libs/icu/common/ucase_props_data.h +++ b/contrib/libs/icu/common/ucase_props_data.h @@ -9,9 +9,9 @@ #ifdef INCLUDED_FROM_UCASE_CPP -static const UVersionInfo ucase_props_dataVersion={0xf,0,0,0}; +static const UVersionInfo ucase_props_dataVersion={0xf,1,0,0}; -static const int32_t ucase_props_indexes[UCASE_IX_TOP]={0x10,0x76f2,0x66c8,0x683,0x172,0,0,0,0,0,0,0,0,0,0,3}; +static const int32_t ucase_props_indexes[UCASE_IX_TOP]={0x10,0x76ec,0x66c8,0x680,0x172,0,0,0,0,0,0,0,0,0,0,3}; static const uint16_t ucase_props_trieIndex[13148]={ 0x355,0x35d,0x365,0x36d,0x37b,0x383,0x38b,0x393,0x39b,0x3a3,0x3aa,0x3b2,0x3ba,0x3c2,0x3ca,0x3d2, @@ -509,9 +509,9 @@ static const uint16_t ucase_props_trieIndex[13148]={ 0x39b9,0x3a29,0x3a99,0x3b09,0x3b7b,0x3beb,0x3c5b,0x3ccb,0x3d3b,0x3dab,0x3e1b,0x3e8b,0x411,0x411,0x3ef9,0x3f79, 0x3fe9,0,0x4069,0x40e9,0xfc12,0xfc12,0xdb12,0xdb12,0x419b,4,0x4209,4,4,4,0x4259,0x42d9, 0x4349,0,0x43c9,0x4449,0xd512,0xd512,0xd512,0xd512,0x44fb,4,4,4,0x411,0x411,0x4569,0x4619, -0,0,0x46e9,0x4769,0xfc12,0xfc12,0xce12,0xce12,0,4,4,4,0x411,0x411,0x4819,0x48c9, -0x4999,0x391,0x4a19,0x4a99,0xfc12,0xfc12,0xc812,0xc812,0xfc92,4,4,4,0,0,0x4b49,0x4bc9, -0x4c39,0,0x4cb9,0x4d39,0xc012,0xc012,0xc112,0xc112,0x4deb,4,4,0,0,0,0,0, +0,0,0x46d9,0x4759,0xfc12,0xfc12,0xce12,0xce12,0,4,4,4,0x411,0x411,0x4809,0x48b9, +0x4979,0x391,0x49f9,0x4a79,0xfc12,0xfc12,0xc812,0xc812,0xfc92,4,4,4,0,0,0x4b29,0x4ba9, +0x4c19,0,0x4c99,0x4d19,0xc012,0xc012,0xc112,0xc112,0x4dcb,4,4,0,0,0,0,0, 0,0,0,0,0,0,0,4,4,4,4,4,0,0,0,0, 0,0,0,0,4,4,0,0,0,0,0,0,4,0,0,4, 0,0,4,4,4,4,4,0,0,0,0,0,0,0,0,0, @@ -525,8 +525,8 @@ static const uint16_t ucase_props_trieIndex[13148]={ 0x64,0x44,0x64,0x64,0x64,0x64,0x64,0x64,0x44,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,2, 0,0,1,2,2,2,1,1,2,2,2,1,0,2,0,0, -0,2,2,2,2,2,0,0,0,0,0,0,2,0,0x4e5a,0, -2,0,0x4e9a,0x4eda,2,2,0,1,2,2,0xe12,2,1,0,0,0, +0,2,2,2,2,2,0,0,0,0,0,0,2,0,0x4e3a,0, +2,0,0x4e7a,0x4eba,2,2,0,1,2,2,0xe12,2,1,0,0,0, 0,1,0,0,1,1,2,2,0,0,0,0,0,2,1,1, 0x21,0x21,0,0,0,0,0xf211,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0x812,0x812,0x812,0x812,0x812,0x812,0x812,0x812, @@ -541,13 +541,13 @@ static const uint16_t ucase_props_trieIndex[13148]={ 0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812, 0x1812,0x1812,0x1812,0x1812,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811, 0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811, -0xe811,0xe811,0xe811,0xe811,0x92,0xff91,0x4f1a,0x4f3a,0x4f5a,0x4f79,0x4f99,0x92,0xff91,0x92,0xff91,0x92, -0xff91,0x4fba,0x4fda,0x4ffa,0x501a,1,0x92,0xff91,1,0x92,0xff91,1,1,1,1,1, -0x25,5,0x503a,0x503a,0x92,0xff91,0x92,0xff91,1,0,0,0,0,0,0,0x92, +0xe811,0xe811,0xe811,0xe811,0x92,0xff91,0x4efa,0x4f1a,0x4f3a,0x4f59,0x4f79,0x92,0xff91,0x92,0xff91,0x92, +0xff91,0x4f9a,0x4fba,0x4fda,0x4ffa,1,0x92,0xff91,1,0x92,0xff91,1,1,1,1,1, +0x25,5,0x501a,0x501a,0x92,0xff91,0x92,0xff91,1,0,0,0,0,0,0,0x92, 0xff91,0x92,0xff91,0x44,0x44,0x44,0x92,0xff91,0,0,0,0,0,0,0,0, -0,0,0,0,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059, -0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059, -0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0,0x5059,0,0,0,0,0,0x5059,0,0, +0,0,0,0,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039, +0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039, +0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0,0x5039,0,0,0,0,0,0x5039,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0x64,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44, @@ -562,7 +562,7 @@ static const uint16_t ucase_props_trieIndex[13148]={ 0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, -0x92,0xff91,0x507a,0x50b9,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, +0x92,0xff91,0x505a,0x5099,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, 0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0,0x44,4,4,4,0, 0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0,4,0x92,0xff91,0x92,0xff91, 0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, @@ -573,11 +573,11 @@ static const uint16_t ucase_props_trieIndex[13148]={ 4,4,4,4,4,4,4,4,4,4,4,4,4,4,0x92,0xff91, 0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,1,1,0x92,0xff91, 0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, -5,1,1,1,1,1,1,1,1,0x92,0xff91,0x92,0xff91,0x50fa,0x92,0xff91, -0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,4,4,4,0x92,0xff91,0x511a,1,0, +5,1,1,1,1,1,1,1,1,0x92,0xff91,0x92,0xff91,0x50da,0x92,0xff91, +0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,4,4,4,0x92,0xff91,0x50fa,1,0, 0x92,0xff91,0x92,0xff91,0x1811,1,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, -0x92,0xff91,0x513a,0x515a,0x517a,0x519a,0x513a,1,0x51ba,0x51da,0x51fa,0x521a,0x92,0xff91,0x92,0xff91, -0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0xe812,0x523a,0x525a,0x92,0xff91,0x92,0xff91,0, +0x92,0xff91,0x511a,0x513a,0x515a,0x517a,0x511a,1,0x519a,0x51ba,0x51da,0x51fa,0x92,0xff91,0x92,0xff91, +0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0xe812,0x521a,0x523a,0x92,0xff91,0x92,0xff91,0, 0,0,0,0,0x92,0xff91,0,1,0,1,0x92,0xff91,0x92,0xff91,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,5,5,5,0x92,0xff91,0,5,5,1,0,0,0,0,0, @@ -607,17 +607,17 @@ static const uint16_t ucase_props_trieIndex[13148]={ 0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0, 0,0,0,4,4,0,0x64,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,0x5279,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,0x5259,1,1,1,1, 1,1,1,4,5,5,5,5,1,1,1,1,1,1,1,1, -1,5,4,4,0,0,0,0,0x5299,0x52c9,0x52f9,0x5329,0x5359,0x5389,0x53b9,0x53e9, -0x5419,0x5449,0x5479,0x54a9,0x54d9,0x5509,0x5539,0x5569,0x5b99,0x5bc9,0x5bf9,0x5c29,0x5c59,0x5c89,0x5cb9,0x5ce9, -0x5d19,0x5d49,0x5d79,0x5da9,0x5dd9,0x5e09,0x5e39,0x5e69,0x5e99,0x5ec9,0x5ef9,0x5f29,0x5f59,0x5f89,0x5fb9,0x5fe9, -0x6019,0x6049,0x6079,0x60a9,0x60d9,0x6109,0x6139,0x6169,0x5599,0x55c9,0x55f9,0x5629,0x5659,0x5689,0x56b9,0x56e9, -0x5719,0x5749,0x5779,0x57a9,0x57d9,0x5809,0x5839,0x5869,0x5899,0x58c9,0x58f9,0x5929,0x5959,0x5989,0x59b9,0x59e9, -0x5a19,0x5a49,0x5a79,0x5aa9,0x5ad9,0x5b09,0x5b39,0x5b69,0,0,0,0,0,4,0,0, +1,5,4,4,0,0,0,0,0x5279,0x52a9,0x52d9,0x5309,0x5339,0x5369,0x5399,0x53c9, +0x53f9,0x5429,0x5459,0x5489,0x54b9,0x54e9,0x5519,0x5549,0x5b79,0x5ba9,0x5bd9,0x5c09,0x5c39,0x5c69,0x5c99,0x5cc9, +0x5cf9,0x5d29,0x5d59,0x5d89,0x5db9,0x5de9,0x5e19,0x5e49,0x5e79,0x5ea9,0x5ed9,0x5f09,0x5f39,0x5f69,0x5f99,0x5fc9, +0x5ff9,0x6029,0x6059,0x6089,0x60b9,0x60e9,0x6119,0x6149,0x5579,0x55a9,0x55d9,0x5609,0x5639,0x5669,0x5699,0x56c9, +0x56f9,0x5729,0x5759,0x5789,0x57b9,0x57e9,0x5819,0x5849,0x5879,0x58a9,0x58d9,0x5909,0x5939,0x5969,0x5999,0x59c9, +0x59f9,0x5a29,0x5a59,0x5a89,0x5ab9,0x5ae9,0x5b19,0x5b49,0,0,0,0,0,4,0,0, 4,0,0,0,0,0x64,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0x6199,0x6219,0x6299,0x6319,0x63c9,0x6479,0x6519,0, -0,0,0,0,0,0,0,0,0,0,0,0x65b9,0x6639,0x66b9,0x6739,0x67b9, +0,0,0,0,0,0,0,0,0x6179,0x61f9,0x6279,0x62f9,0x63a9,0x6459,0x64e9,0, +0,0,0,0,0,0,0,0,0,0,0,0x6589,0x6609,0x6689,0x6709,0x6789, 0,0,0,0,0,0,0x64,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4, 4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,4, @@ -838,7 +838,7 @@ static const uint16_t ucase_props_trieIndex[13148]={ 0,0,0,0,0,0,0,0,0,0,0,0 }; -static const uint16_t ucase_props_exceptions[1667]={ +static const uint16_t ucase_props_exceptions[1664]={ 0xc850,0x20,2,0x130,0x131,0x4810,0x20,0x841,0x6b,1,0x212a,0x841,0x73,1,0x17f,0x5c50, 0x20,2,0x130,0x131,0x844,0x4b,1,0x212a,0x844,0x53,1,0x17f,0x806,0x3bc,0x39c,0x841, 0xe5,1,0x212b,0x8c0,1,0x2220,0x73,0x73,0x53,0x53,0x53,0x73,0x1e9e,0x844,0xc5,1, @@ -909,41 +909,40 @@ static const uint16_t ucase_props_exceptions[1667]={ 0x3b7,0x3b9,0x397,0x399,0x880,0x2220,0x3ae,0x3b9,0x389,0x399,0x389,0x345,0x880,0x2220,0x3b7,0x342, 0x397,0x342,0x397,0x342,0x880,0x3330,0x3b7,0x342,0x3b9,0x397,0x342,0x399,0x397,0x342,0x345,0xc90, 9,0x220,0x3b7,0x3b9,0x397,0x399,0x880,0x3330,0x3b9,0x308,0x300,0x399,0x308,0x300,0x399,0x308, -0x300,0x8c0,1,0x3330,0x3b9,0x308,0x301,0x399,0x308,0x301,0x399,0x308,0x301,0x390,0x880,0x2220, -0x3b9,0x342,0x399,0x342,0x399,0x342,0x880,0x3330,0x3b9,0x308,0x342,0x399,0x308,0x342,0x399,0x308, -0x342,0x880,0x3330,0x3c5,0x308,0x300,0x3a5,0x308,0x300,0x3a5,0x308,0x300,0x8c0,1,0x3330,0x3c5, -0x308,0x301,0x3a5,0x308,0x301,0x3a5,0x308,0x301,0x3b0,0x880,0x2220,0x3c1,0x313,0x3a1,0x313,0x3a1, -0x313,0x880,0x2220,0x3c5,0x342,0x3a5,0x342,0x3a5,0x342,0x880,0x3330,0x3c5,0x308,0x342,0x3a5,0x308, -0x342,0x3a5,0x308,0x342,0x880,0x2220,0x1f7c,0x3b9,0x1ffa,0x399,0x1ffa,0x345,0x890,9,0x220,0x3c9, -0x3b9,0x3a9,0x399,0x880,0x2220,0x3ce,0x3b9,0x38f,0x399,0x38f,0x345,0x880,0x2220,0x3c9,0x342,0x3a9, -0x342,0x3a9,0x342,0x880,0x3330,0x3c9,0x342,0x3b9,0x3a9,0x342,0x399,0x3a9,0x342,0x345,0xc90,9, -0x220,0x3c9,0x3b9,0x3a9,0x399,0xc50,0x1d5d,1,0x3a9,0xc50,0x20bf,1,0x4b,0xc50,0x2046,1, -0xc5,0xc10,0x29f7,0xc10,0xee6,0xc10,0x29e7,0xc10,0x2a2b,0xc10,0x2a28,0xc10,0x2a1c,0xc10,0x29fd,0xc10, -0x2a1f,0xc10,0x2a1e,0xc10,0x2a3f,0xc10,0x1c60,0x841,0xa64b,1,0x1c88,0x844,0xa64a,1,0x1c88,0xc10, -0x8a04,0xc10,0xa528,0xc10,0xa544,0xc10,0xa54f,0xc10,0xa54b,0xc10,0xa541,0xc10,0xa512,0xc10,0xa52a,0xc10, -0xa515,0x810,0x3a0,0xc10,0xa543,0xc10,0x8a38,0xc10,0x3a0,0x806,0x13a0,0x13a0,0x806,0x13a1,0x13a1,0x806, -0x13a2,0x13a2,0x806,0x13a3,0x13a3,0x806,0x13a4,0x13a4,0x806,0x13a5,0x13a5,0x806,0x13a6,0x13a6,0x806,0x13a7, -0x13a7,0x806,0x13a8,0x13a8,0x806,0x13a9,0x13a9,0x806,0x13aa,0x13aa,0x806,0x13ab,0x13ab,0x806,0x13ac,0x13ac, -0x806,0x13ad,0x13ad,0x806,0x13ae,0x13ae,0x806,0x13af,0x13af,0x806,0x13b0,0x13b0,0x806,0x13b1,0x13b1,0x806, -0x13b2,0x13b2,0x806,0x13b3,0x13b3,0x806,0x13b4,0x13b4,0x806,0x13b5,0x13b5,0x806,0x13b6,0x13b6,0x806,0x13b7, -0x13b7,0x806,0x13b8,0x13b8,0x806,0x13b9,0x13b9,0x806,0x13ba,0x13ba,0x806,0x13bb,0x13bb,0x806,0x13bc,0x13bc, -0x806,0x13bd,0x13bd,0x806,0x13be,0x13be,0x806,0x13bf,0x13bf,0x806,0x13c0,0x13c0,0x806,0x13c1,0x13c1,0x806, -0x13c2,0x13c2,0x806,0x13c3,0x13c3,0x806,0x13c4,0x13c4,0x806,0x13c5,0x13c5,0x806,0x13c6,0x13c6,0x806,0x13c7, -0x13c7,0x806,0x13c8,0x13c8,0x806,0x13c9,0x13c9,0x806,0x13ca,0x13ca,0x806,0x13cb,0x13cb,0x806,0x13cc,0x13cc, -0x806,0x13cd,0x13cd,0x806,0x13ce,0x13ce,0x806,0x13cf,0x13cf,0x806,0x13d0,0x13d0,0x806,0x13d1,0x13d1,0x806, -0x13d2,0x13d2,0x806,0x13d3,0x13d3,0x806,0x13d4,0x13d4,0x806,0x13d5,0x13d5,0x806,0x13d6,0x13d6,0x806,0x13d7, -0x13d7,0x806,0x13d8,0x13d8,0x806,0x13d9,0x13d9,0x806,0x13da,0x13da,0x806,0x13db,0x13db,0x806,0x13dc,0x13dc, -0x806,0x13dd,0x13dd,0x806,0x13de,0x13de,0x806,0x13df,0x13df,0x806,0x13e0,0x13e0,0x806,0x13e1,0x13e1,0x806, -0x13e2,0x13e2,0x806,0x13e3,0x13e3,0x806,0x13e4,0x13e4,0x806,0x13e5,0x13e5,0x806,0x13e6,0x13e6,0x806,0x13e7, -0x13e7,0x806,0x13e8,0x13e8,0x806,0x13e9,0x13e9,0x806,0x13ea,0x13ea,0x806,0x13eb,0x13eb,0x806,0x13ec,0x13ec, -0x806,0x13ed,0x13ed,0x806,0x13ee,0x13ee,0x806,0x13ef,0x13ef,0x880,0x2220,0x66,0x66,0x46,0x46,0x46, -0x66,0x880,0x2220,0x66,0x69,0x46,0x49,0x46,0x69,0x880,0x2220,0x66,0x6c,0x46,0x4c,0x46, -0x6c,0x880,0x3330,0x66,0x66,0x69,0x46,0x46,0x49,0x46,0x66,0x69,0x880,0x3330,0x66,0x66, -0x6c,0x46,0x46,0x4c,0x46,0x66,0x6c,0x8c0,1,0x2220,0x73,0x74,0x53,0x54,0x53,0x74, -0xfb06,0x8c0,1,0x2220,0x73,0x74,0x53,0x54,0x53,0x74,0xfb05,0x880,0x2220,0x574,0x576,0x544, -0x546,0x544,0x576,0x880,0x2220,0x574,0x565,0x544,0x535,0x544,0x565,0x880,0x2220,0x574,0x56b,0x544, -0x53b,0x544,0x56b,0x880,0x2220,0x57e,0x576,0x54e,0x546,0x54e,0x576,0x880,0x2220,0x574,0x56d,0x544, -0x53d,0x544,0x56d +0x300,0x882,0x390,0x3330,0x3b9,0x308,0x301,0x399,0x308,0x301,0x399,0x308,0x301,0x880,0x2220,0x3b9, +0x342,0x399,0x342,0x399,0x342,0x880,0x3330,0x3b9,0x308,0x342,0x399,0x308,0x342,0x399,0x308,0x342, +0x880,0x3330,0x3c5,0x308,0x300,0x3a5,0x308,0x300,0x3a5,0x308,0x300,0x882,0x3b0,0x3330,0x3c5,0x308, +0x301,0x3a5,0x308,0x301,0x3a5,0x308,0x301,0x880,0x2220,0x3c1,0x313,0x3a1,0x313,0x3a1,0x313,0x880, +0x2220,0x3c5,0x342,0x3a5,0x342,0x3a5,0x342,0x880,0x3330,0x3c5,0x308,0x342,0x3a5,0x308,0x342,0x3a5, +0x308,0x342,0x880,0x2220,0x1f7c,0x3b9,0x1ffa,0x399,0x1ffa,0x345,0x890,9,0x220,0x3c9,0x3b9,0x3a9, +0x399,0x880,0x2220,0x3ce,0x3b9,0x38f,0x399,0x38f,0x345,0x880,0x2220,0x3c9,0x342,0x3a9,0x342,0x3a9, +0x342,0x880,0x3330,0x3c9,0x342,0x3b9,0x3a9,0x342,0x399,0x3a9,0x342,0x345,0xc90,9,0x220,0x3c9, +0x3b9,0x3a9,0x399,0xc50,0x1d5d,1,0x3a9,0xc50,0x20bf,1,0x4b,0xc50,0x2046,1,0xc5,0xc10, +0x29f7,0xc10,0xee6,0xc10,0x29e7,0xc10,0x2a2b,0xc10,0x2a28,0xc10,0x2a1c,0xc10,0x29fd,0xc10,0x2a1f,0xc10, +0x2a1e,0xc10,0x2a3f,0xc10,0x1c60,0x841,0xa64b,1,0x1c88,0x844,0xa64a,1,0x1c88,0xc10,0x8a04,0xc10, +0xa528,0xc10,0xa544,0xc10,0xa54f,0xc10,0xa54b,0xc10,0xa541,0xc10,0xa512,0xc10,0xa52a,0xc10,0xa515,0x810, +0x3a0,0xc10,0xa543,0xc10,0x8a38,0xc10,0x3a0,0x806,0x13a0,0x13a0,0x806,0x13a1,0x13a1,0x806,0x13a2,0x13a2, +0x806,0x13a3,0x13a3,0x806,0x13a4,0x13a4,0x806,0x13a5,0x13a5,0x806,0x13a6,0x13a6,0x806,0x13a7,0x13a7,0x806, +0x13a8,0x13a8,0x806,0x13a9,0x13a9,0x806,0x13aa,0x13aa,0x806,0x13ab,0x13ab,0x806,0x13ac,0x13ac,0x806,0x13ad, +0x13ad,0x806,0x13ae,0x13ae,0x806,0x13af,0x13af,0x806,0x13b0,0x13b0,0x806,0x13b1,0x13b1,0x806,0x13b2,0x13b2, +0x806,0x13b3,0x13b3,0x806,0x13b4,0x13b4,0x806,0x13b5,0x13b5,0x806,0x13b6,0x13b6,0x806,0x13b7,0x13b7,0x806, +0x13b8,0x13b8,0x806,0x13b9,0x13b9,0x806,0x13ba,0x13ba,0x806,0x13bb,0x13bb,0x806,0x13bc,0x13bc,0x806,0x13bd, +0x13bd,0x806,0x13be,0x13be,0x806,0x13bf,0x13bf,0x806,0x13c0,0x13c0,0x806,0x13c1,0x13c1,0x806,0x13c2,0x13c2, +0x806,0x13c3,0x13c3,0x806,0x13c4,0x13c4,0x806,0x13c5,0x13c5,0x806,0x13c6,0x13c6,0x806,0x13c7,0x13c7,0x806, +0x13c8,0x13c8,0x806,0x13c9,0x13c9,0x806,0x13ca,0x13ca,0x806,0x13cb,0x13cb,0x806,0x13cc,0x13cc,0x806,0x13cd, +0x13cd,0x806,0x13ce,0x13ce,0x806,0x13cf,0x13cf,0x806,0x13d0,0x13d0,0x806,0x13d1,0x13d1,0x806,0x13d2,0x13d2, +0x806,0x13d3,0x13d3,0x806,0x13d4,0x13d4,0x806,0x13d5,0x13d5,0x806,0x13d6,0x13d6,0x806,0x13d7,0x13d7,0x806, +0x13d8,0x13d8,0x806,0x13d9,0x13d9,0x806,0x13da,0x13da,0x806,0x13db,0x13db,0x806,0x13dc,0x13dc,0x806,0x13dd, +0x13dd,0x806,0x13de,0x13de,0x806,0x13df,0x13df,0x806,0x13e0,0x13e0,0x806,0x13e1,0x13e1,0x806,0x13e2,0x13e2, +0x806,0x13e3,0x13e3,0x806,0x13e4,0x13e4,0x806,0x13e5,0x13e5,0x806,0x13e6,0x13e6,0x806,0x13e7,0x13e7,0x806, +0x13e8,0x13e8,0x806,0x13e9,0x13e9,0x806,0x13ea,0x13ea,0x806,0x13eb,0x13eb,0x806,0x13ec,0x13ec,0x806,0x13ed, +0x13ed,0x806,0x13ee,0x13ee,0x806,0x13ef,0x13ef,0x880,0x2220,0x66,0x66,0x46,0x46,0x46,0x66,0x880, +0x2220,0x66,0x69,0x46,0x49,0x46,0x69,0x880,0x2220,0x66,0x6c,0x46,0x4c,0x46,0x6c,0x880, +0x3330,0x66,0x66,0x69,0x46,0x46,0x49,0x46,0x66,0x69,0x880,0x3330,0x66,0x66,0x6c,0x46, +0x46,0x4c,0x46,0x66,0x6c,0x882,0xfb06,0x2220,0x73,0x74,0x53,0x54,0x53,0x74,0x8c0,1, +0x2220,0x73,0x74,0x53,0x54,0x53,0x74,0xfb05,0x880,0x2220,0x574,0x576,0x544,0x546,0x544,0x576, +0x880,0x2220,0x574,0x565,0x544,0x535,0x544,0x565,0x880,0x2220,0x574,0x56b,0x544,0x53b,0x544,0x56b, +0x880,0x2220,0x57e,0x576,0x54e,0x546,0x54e,0x576,0x880,0x2220,0x574,0x56d,0x544,0x53d,0x544,0x56d }; static const uint16_t ucase_props_unfold[370]={ diff --git a/contrib/libs/icu/common/ucasemap.cpp b/contrib/libs/icu/common/ucasemap.cpp index 1d8a8b6c2f..f419f65c32 100644 --- a/contrib/libs/icu/common/ucasemap.cpp +++ b/contrib/libs/icu/common/ucasemap.cpp @@ -41,7 +41,6 @@ #include "uassert.h" #include "ucase.h" #include "ucasemap_imp.h" -#include "ustr_imp.h" U_NAMESPACE_USE @@ -679,14 +678,18 @@ void toUpper(uint32_t options, // Adding one only to the final vowel in a longer sequence // (which does not occur in normal writing) would require lookahead. // Set the same flag as for preserving an existing dialytika. - if ((data & HAS_VOWEL) != 0 && (state & AFTER_VOWEL_WITH_ACCENT) != 0 && - (upper == 0x399 || upper == 0x3A5)) { - data |= HAS_DIALYTIKA; + if ((data & HAS_VOWEL) != 0 && + (state & (AFTER_VOWEL_WITH_PRECOMPOSED_ACCENT | AFTER_VOWEL_WITH_COMBINING_ACCENT)) != + 0 && + (upper == 0x399 || upper == 0x3A5)) { + data |= (state & AFTER_VOWEL_WITH_PRECOMPOSED_ACCENT) != 0 ? HAS_DIALYTIKA + : HAS_COMBINING_DIALYTIKA; } int32_t numYpogegrammeni = 0; // Map each one to a trailing, spacing, capital iota. if ((data & HAS_YPOGEGRAMMENI) != 0) { numYpogegrammeni = 1; } + const UBool hasPrecomposedAccent = (data & HAS_ACCENT) != 0; // Skip combining diacritics after this Greek letter. int32_t nextNextIndex = nextIndex; while (nextIndex < srcLength) { @@ -704,7 +707,8 @@ void toUpper(uint32_t options, } } if ((data & HAS_VOWEL_AND_ACCENT_AND_DIALYTIKA) == HAS_VOWEL_AND_ACCENT) { - nextState |= AFTER_VOWEL_WITH_ACCENT; + nextState |= hasPrecomposedAccent ? AFTER_VOWEL_WITH_PRECOMPOSED_ACCENT + : AFTER_VOWEL_WITH_COMBINING_ACCENT; } // Map according to Greek rules. UBool addTonos = false; @@ -715,7 +719,7 @@ void toUpper(uint32_t options, !isFollowedByCasedLetter(src, nextIndex, srcLength)) { // Keep disjunctive "or" with (only) a tonos. // We use the same "word boundary" conditions as for the Final_Sigma test. - if (i == nextIndex) { + if (hasPrecomposedAccent) { upper = 0x389; // Preserve the precomposed form. } else { addTonos = true; @@ -912,21 +916,20 @@ ucasemap_mapUTF8(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITERATOR_P return 0; } - CheckedArrayByteSink sink(dest, destCapacity); if (edits != nullptr && (options & U_EDITS_NO_RESET) == 0) { edits->reset(); } - stringCaseMapper(caseLocale, options, UCASEMAP_BREAK_ITERATOR - (const uint8_t *)src, srcLength, sink, edits, errorCode); - sink.Flush(); - if (U_SUCCESS(errorCode)) { - if (sink.Overflowed()) { - errorCode = U_BUFFER_OVERFLOW_ERROR; - } else if (edits != nullptr) { - edits->copyErrorTo(errorCode); - } + int32_t reslen = ByteSinkUtil::viaByteSinkToTerminatedChars( + dest, destCapacity, + [&](ByteSink& sink, UErrorCode& status) { + stringCaseMapper(caseLocale, options, UCASEMAP_BREAK_ITERATOR + (const uint8_t *)src, srcLength, sink, edits, status); + }, + errorCode); + if (U_SUCCESS(errorCode) && edits != nullptr) { + edits->copyErrorTo(errorCode); } - return u_terminateChars(dest, destCapacity, sink.NumberOfBytesAppended(), &errorCode); + return reslen; } /* public API functions */ diff --git a/contrib/libs/icu/common/ucasemap_imp.h b/contrib/libs/icu/common/ucasemap_imp.h index 71d0e9033f..bc83c6bd78 100644 --- a/contrib/libs/icu/common/ucasemap_imp.h +++ b/contrib/libs/icu/common/ucasemap_imp.h @@ -263,7 +263,8 @@ static const uint32_t HAS_EITHER_DIALYTIKA = HAS_DIALYTIKA | HAS_COMBINING_DIALY // State bits. static const uint32_t AFTER_CASED = 1; -static const uint32_t AFTER_VOWEL_WITH_ACCENT = 2; +static const uint32_t AFTER_VOWEL_WITH_COMBINING_ACCENT = 2; +static const uint32_t AFTER_VOWEL_WITH_PRECOMPOSED_ACCENT = 4; uint32_t getLetterData(UChar32 c); diff --git a/contrib/libs/icu/common/uchar_props_data.h b/contrib/libs/icu/common/uchar_props_data.h index f4d3932574..0cacf142af 100644 --- a/contrib/libs/icu/common/uchar_props_data.h +++ b/contrib/libs/icu/common/uchar_props_data.h @@ -9,9 +9,9 @@ #ifdef INCLUDED_FROM_UCHAR_C -static const UVersionInfo dataVersion={0xf,0,0,0}; +static const UVersionInfo dataVersion={0xf,1,0,0}; -static const uint16_t propsTrie_index[23016]={ +static const uint16_t propsTrie_index[23156]={ 0x495,0x49d,0x4a5,0x4ad,0x4c5,0x4cd,0x4d5,0x4dd,0x4e5,0x4ed,0x4f3,0x4fb,0x503,0x50b,0x513,0x51b, 0x521,0x529,0x531,0x539,0x53c,0x544,0x54c,0x554,0x55c,0x564,0x560,0x568,0x570,0x578,0x57d,0x585, 0x58d,0x595,0x599,0x5a1,0x5a9,0x5b1,0x5b9,0x5c1,0x5bd,0x5c5,0x5ca,0x5d2,0x5d8,0x5e0,0x5e8,0x5f0, @@ -51,53 +51,57 @@ static const uint16_t propsTrie_index[23016]={ 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x934,0x934, -0xc2e,0x600,0xc31,0x600,0xc39,0xc3f,0xc47,0xc4f,0xc54,0x600,0x600,0xc58,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xc5f,0x600,0xc66,0xc6c,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xc74,0x600,0x600,0x600,0xc7c,0x600, +0xc2e,0xc35,0xc37,0x600,0xc3f,0xc45,0xc4d,0xc55,0xc5a,0x600,0x600,0xc5e,0x600,0x600,0x600,0xc64, +0xc6b,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xc72,0x600,0xc79,0xc7f,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xc87,0x600,0x600,0x600,0xc8f,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0xc7e,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xc85,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0xc91,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xc98,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0xc8c,0x600,0x600,0x600,0xc93,0xc9b,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0xc9f,0x600,0x600,0x600,0xca6,0xcae,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xca0,0x600,0x600,0xca8,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0xcb3,0xcb8,0x600,0x600,0xcc0,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xcac,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xcc4,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xcc9,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xcc7,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xcaf,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xcd1,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xcb2,0x600,0x600,0x600, +0x600,0x600,0x600,0xcd7,0xcdf,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xce5, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0xcb8,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0xcec,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0xcf1,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0xcc0,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0xcc5,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0xcf6,0x600,0x600,0x600,0xc32,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0xcca,0x600,0x600,0x600,0xccf,0x600,0x600,0x600,0x600,0x600,0x600, +0xcd3,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0xcfc,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0xd04,0xd0b,0xd0f,0x600,0x600,0x600,0xccb,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0xcd7,0xcde,0xce2,0x600,0x600,0x600,0xce9,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0xd1e,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0xd16,0x934,0xd26,0x9ad,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0xd2b,0xd33,0x4e5,0xd43,0xd3b,0x600,0x600,0xd4b,0xd53,0xd63,0x4e5,0xd68,0xd70,0xd76,0xd7d,0xd5b, +0xd85,0xd8d,0x600,0xd95,0xda5,0xda8,0xd9d,0xdb0,0x655,0xdb8,0xdbf,0x8f6,0x6a3,0xdcf,0xdc7,0xdd7, +0x600,0xddf,0xde7,0xdef,0x600,0xdf7,0xdff,0xe07,0xe0f,0xe17,0xe1b,0xe23,0x535,0x535,0x600,0xe2b, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0xcf7,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0xcef,0x934,0xcff,0x9ad,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0xd04,0xd0c,0x4e5,0xd1c,0xd14,0x600,0x600,0xd24,0xd2c,0xd3c,0x4e5,0xd41,0xd49,0xd4f,0xd56,0xd34, -0xd5e,0xd66,0x600,0xd6e,0xd7e,0xd81,0xd76,0xd89,0x655,0xd91,0xd98,0x8f6,0x6a3,0xda8,0xda0,0xdb0, -0x600,0xdb8,0xdc0,0xdc8,0x600,0xdd0,0xdd8,0xde0,0xde8,0xdf0,0xdf4,0xdfc,0x535,0x535,0x600,0xe04, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, @@ -115,33 +119,29 @@ static const uint16_t propsTrie_index[23016]={ 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xe0c,0xe18,0xe10, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xe33,0xe3f,0xe37, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20, -0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0x600,0x600,0x600,0xe30,0x600,0xcea,0xe37,0xe3c, -0x600,0x600,0x600,0xe44,0x600,0x600,0x901,0x4b5,0xe5a,0xe4a,0xe52,0x600,0x600,0xe62,0xe6a,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xe6f,0x938,0x600,0xe77,0x600,0xe7d,0xe81, -0xe89,0xe91,0xe98,0xea0,0x600,0x600,0x600,0xea6,0xebe,0x4a5,0xec6,0xece,0xed3,0x916,0xeae,0xeb6, -0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20, -0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20, +0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47, +0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0x600,0x600,0x600,0xe57,0x600,0xccc,0xe5e,0xe63, +0x600,0x600,0x600,0xe6b,0x600,0x600,0x901,0x4b5,0xe81,0xe71,0xe79,0x600,0x600,0xe89,0xe91,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xe96,0x938,0x600,0xe9e,0x600,0xea4,0xea8, +0xeb0,0xeb8,0xebf,0xec7,0x600,0x600,0x600,0xecd,0xee5,0x4a5,0xeed,0xef5,0xefa,0x916,0xed5,0xedd, +0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47, +0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47, 0x12d4,0x12d4,0x1314,0x1354,0x1394,0x13cc,0x140c,0x144c,0x1484,0x14c4,0x14f0,0x1530,0x1570,0x1580,0x15c0,0x15f4, 0x1634,0x1664,0x16a4,0x16e4,0x16f4,0x1728,0x1760,0x17a0,0x17e0,0x1820,0x1854,0x1880,0x18c0,0x18f8,0x1914,0x1954, 0xa80,0xac0,0xb00,0xb40,0xb80,0xbab,0xbeb,0xa40,0xc0e,0xa40,0xa40,0xa40,0xa40,0xc4e,0x1db,0x1db, @@ -180,132 +180,132 @@ static const uint16_t propsTrie_index[23016]={ 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0xedb,0xee2,0xeea,0x4b5,0x600,0x600,0x600,0xef2,0xf02,0xefa,0xf19,0xf0a,0xf11,0xf21,0xf25,0xf29, -0x4b5,0x4b5,0x4b5,0x4b5,0x8f6,0x600,0xf31,0xf39,0x600,0xf41,0xf49,0xf4d,0xf55,0x600,0xf5d,0x4b5, -0x58d,0x597,0xf65,0x600,0xf69,0xf71,0xf81,0xf79,0x600,0xf89,0x600,0xf90,0xfa0,0xf98,0x4b5,0x4b5, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xb88,0x902,0xfa8,0xfb8,0xfb0,0x4b5,0x4b5, -0xfc8,0xfc0,0xfcb,0xfd3,0x916,0xfdb,0x4b5,0xfe3,0xfeb,0xff3,0x4b5,0x4b5,0x600,0x1003,0x100b,0xffb, -0x101b,0x1022,0x1013,0x102a,0x1032,0x4b5,0x1042,0x103a,0x600,0x1045,0x104d,0x1055,0x105d,0x1065,0x4b5,0x4b5, -0x600,0x600,0x106d,0x4b5,0x58d,0x1075,0x535,0x107d,0x600,0x1085,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x108d,0x600,0x1095,0x4b5,0x109a,0x10a2,0x10aa,0x10b1,0xfdf,0x10b9,0xfdf,0x10c1,0xb88, -0x10d1,0x636,0x10d9,0x10c9,0x98f,0x10e1,0x10e9,0x10ef,0x1107,0x10f7,0x10ff,0x110b,0x98f,0x111b,0x1113,0x1123, -0x113b,0x112b,0x1133,0x4b5,0x1142,0x114a,0x658,0x1152,0x1162,0x1168,0x1170,0x115a,0x4b5,0x4b5,0x4b5,0x4b5, -0x600,0x1178,0x1180,0x1099,0x600,0x1188,0x1190,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x1198,0x11a0,0x4b5, -0x600,0x11a8,0x11b0,0x11b8,0x600,0x11c8,0x11c0,0x4b5,0x870,0x11d0,0x11d8,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x600,0x11e0,0x4b5,0x4b5,0x4b5,0x58d,0x535,0x11e8,0x11f8,0x11fe,0x11f0,0x4b5,0x4b5,0x120e,0x1212,0x1206, -0x122a,0x121a,0x1222,0x600,0x1238,0x1232,0x600,0x8f7,0x1248,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x1256,0x125b,0x1240,0x1250,0x126b,0x1263,0x4b5,0x4b5,0x127a,0x127e,0x1272,0x128e,0x1286,0x11c0,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x1292,0x12a2,0x12a7,0x129a,0x4b5,0x4b5,0x12af,0x12bf,0x12b7, +0xf02,0xf09,0xf11,0x4b5,0x600,0x600,0x600,0xf19,0xf29,0xf21,0xf40,0xf31,0xf38,0xf48,0xbbd,0xf50, +0x4b5,0x4b5,0x4b5,0x4b5,0x8f6,0x600,0xf58,0xf60,0x600,0xf68,0xf70,0xf74,0xf7c,0x600,0xf84,0x4b5, +0x58d,0x597,0xf8c,0x600,0xf90,0xf98,0xfa8,0xfa0,0x600,0xfb0,0x600,0xfb7,0xfc7,0xfbf,0x4b5,0x4b5, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xb88,0x902,0xfcf,0xfdf,0xfd7,0x4b5,0x4b5, +0xfef,0xfe7,0xff2,0xffa,0x916,0x1002,0x4b5,0x100a,0x1012,0x101a,0x4b5,0x4b5,0x600,0x102a,0x1032,0x1022, +0x1042,0x1049,0x103a,0x1051,0x1059,0x4b5,0x1069,0x1061,0x600,0x106c,0x1074,0x107c,0x1084,0x108c,0x4b5,0x4b5, +0x600,0x600,0x1094,0x4b5,0x58d,0x109c,0x535,0x10a4,0x600,0x10ac,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, +0x4b5,0x4b5,0x4b5,0x10b4,0x600,0x10bc,0x4b5,0x10c1,0x10c9,0x10d1,0x10d8,0x1006,0x10e0,0x1006,0x10e8,0xb88, +0x10f8,0x636,0x1100,0x10f0,0x98f,0x1108,0x1110,0x1116,0x112e,0x111e,0x1126,0x1132,0x98f,0x1142,0x113a,0x114a, +0x1162,0x1152,0x115a,0x4b5,0x1169,0x1171,0x658,0x1179,0x1189,0x118f,0x1197,0x1181,0x4b5,0x4b5,0x4b5,0x4b5, +0x600,0x119f,0x11a7,0x10c0,0x600,0x11af,0x11b7,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x11bf,0x11c7,0x4b5, +0x600,0x11cf,0x11d7,0x11df,0x600,0x11ef,0x11e7,0x4b5,0x870,0x11f7,0x11ff,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, +0x600,0x1207,0x4b5,0x4b5,0x4b5,0x58d,0x535,0x120f,0x121f,0x1225,0x1217,0x4b5,0x4b5,0x1235,0x1239,0x122d, +0x1251,0x1241,0x1249,0x600,0x125f,0x1259,0x600,0x8f7,0x126f,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, +0x127d,0x1282,0x1267,0x1277,0x1292,0x128a,0x4b5,0x4b5,0x12a1,0x12a5,0x1299,0x12b5,0x12ad,0x11e7,0x4b5,0x4b5, +0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x12b9,0x12c9,0x12ce,0x12c1,0x4b5,0x4b5,0x12d6,0x12e6,0x12de, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x901,0x4b5,0x4b5,0x4b5, -0x12cf,0x12d7,0x12df,0x12c7,0x600,0x600,0x600,0x600,0x600,0x600,0x12e7,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, +0x12f6,0x12fe,0x1306,0x12ee,0x600,0x600,0x600,0x600,0x600,0x600,0x130e,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0xfdf,0x600,0x600,0x12ef,0x600,0x600,0x600,0x600,0x600, +0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x1006,0x600,0x600,0x1316,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x12f7,0x12ff,0x4b5,0x4b5, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x131e,0x1326,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x11d8,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x600, +0x11ff,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x8f7, -0x916,0xda4,0x600,0x916,0x1307,0x130c,0x600,0x131c,0x1324,0x132c,0x1314,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, +0x916,0xdcb,0x600,0x916,0x132e,0x1333,0x600,0x1343,0x134b,0x1353,0x133b,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x58d,0x535,0x1334,0x4b5,0x4b5,0x4b5,0x600,0x600,0x133c,0x1341,0x1347,0x4b5,0x4b5,0x134f,0x600,0x600, +0x58d,0x535,0x135b,0x4b5,0x4b5,0x4b5,0x600,0x600,0x1363,0x1368,0x136e,0x4b5,0x4b5,0x1376,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1357,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x137e,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x902,0x4b5,0x106d,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, +0x600,0x600,0x600,0x600,0x902,0x4b5,0x1094,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x135d,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x1365,0x136a,0x1371,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xe10,0x4b5, +0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x1384,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x138c,0x1391,0x1398,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xe37,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x600,0x600,0x1377,0x137c,0x1384,0x4b5,0x4b5,0x4b5, +0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x600,0x600,0x139e,0x13a3,0x13ab,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x55c,0x1394,0x139b,0x934,0x934,0x934,0x138c,0x4b5,0x934,0x934,0x934, -0x934,0x934,0x934,0x934,0xbb7,0x934,0x13a2,0x934,0x13a9,0x13b1,0x13b7,0x934,0xade,0x934,0x934,0x13bf, -0x4b5,0x4b5,0x4b5,0x13c7,0x13c7,0x934,0x934,0xadb,0x13cf,0x4b5,0x4b5,0x4b5,0x4b5,0x13df,0x13e6,0x13eb, -0x13f1,0x13f9,0x1401,0x1409,0x13e3,0x1411,0x1419,0x1421,0x1426,0x13f8,0x13df,0x13e6,0x13e2,0x13f1,0x142e,0x13e0, -0x1431,0x13e3,0x1439,0x1441,0x1449,0x1450,0x143c,0x1444,0x144c,0x1453,0x143f,0x145b,0x13d7,0x934,0x934,0x934, -0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x55c,0x146b,0x55c, -0x1472,0x1479,0x1463,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, +0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x55c,0x13bb,0x13c2,0x934,0x934,0x934,0x13b3,0x4b5,0x934,0x934,0x934, +0x934,0x934,0x934,0x934,0xbb7,0x934,0x13c9,0x934,0x13d0,0x13d8,0x13de,0x934,0xade,0x934,0x934,0x13e6, +0x4b5,0x4b5,0x4b5,0x13ee,0x13ee,0x934,0x934,0xadb,0x13f6,0x4b5,0x4b5,0x4b5,0x4b5,0x1406,0x140d,0x1412, +0x1418,0x1420,0x1428,0x1430,0x140a,0x1438,0x1440,0x1448,0x144d,0x141f,0x1406,0x140d,0x1409,0x1418,0x1455,0x1407, +0x1458,0x140a,0x1460,0x1468,0x1470,0x1477,0x1463,0x146b,0x1473,0x147a,0x1466,0x1482,0x13fe,0x934,0x934,0x934, +0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x55c,0x1492,0x55c, +0x1499,0x14a0,0x148a,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x1488,0x1490,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x1480,0x1498,0x9d4, -0x14a8,0x14a0,0x4b5,0x4b5,0x4b5,0x600,0x14b8,0x14b0,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0xfdf,0x14c0,0x600,0x14c8,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0xfdf,0x14d0,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x14d8,0x600,0x600,0x600, -0x600,0x600,0x600,0x14e0,0x4b5,0x58d,0x14f0,0x14e8,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, +0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x14af,0x14b7,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x14a7,0x14bf,0x9d4, +0x14cf,0x14c7,0x4b5,0x4b5,0x4b5,0x600,0x14df,0x14d7,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, +0x4b5,0x1006,0x14e7,0x600,0x14ef,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, +0x4b5,0x4b5,0x4b5,0x1006,0x14f7,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, +0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x14ff,0x600,0x600,0x600, +0x600,0x600,0x600,0x1507,0x4b5,0x58d,0x1517,0x150f,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x14f8,0x1508,0x1500,0x4b5,0x4b5,0x1518,0x1510,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x1528,0x1530,0x1538, -0x1540,0x1548,0x1550,0x4b5,0x1520,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x934,0x1558,0x934, -0x934,0xbaf,0x13a0,0x1560,0xbb7,0x1568,0x934,0x934,0x934,0x934,0xbb9,0x4b5,0x1570,0x1578,0x157c,0x1584, -0x158c,0x4b5,0x4b5,0x4b5,0x4b5,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x1594,0x934,0x934,0x934, +0x151f,0x152f,0x1527,0x4b5,0x4b5,0x153f,0x1537,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x154f,0x1557,0x155f, +0x1567,0x156f,0x1577,0x4b5,0x1547,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x934,0x157f,0x934, +0x934,0xbaf,0x13c7,0x1587,0xbb7,0x158f,0x934,0x934,0x934,0x934,0xbb9,0x4b5,0x1597,0x159f,0x15a3,0x15ab, +0x15b3,0x4b5,0x4b5,0x4b5,0x4b5,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x15bb,0x934,0x934,0x934, 0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934, -0x934,0x934,0x934,0x157d,0x159c,0x934,0x934,0x934,0x15a4,0x934,0x934,0x15ab,0x15b3,0x1558,0x934,0x15bb, -0x934,0x15c3,0x15c8,0x4b5,0x4b5,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0xbaf, -0x15d0,0x15d9,0x15dd,0x15e5,0x15d5,0x934,0x934,0x934,0x934,0x15ed,0x934,0xade,0x11bc,0x4b5,0x4b5,0x4b5, +0x934,0x934,0x934,0x15a4,0x15c3,0x934,0x934,0x934,0x15cb,0x934,0x934,0x15d2,0x15da,0x157f,0x934,0x15e2, +0x934,0x15ea,0x15ef,0x4b5,0x4b5,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0xbaf, +0x15f7,0x1600,0x1604,0x160c,0x15fc,0x934,0x934,0x934,0x934,0x1614,0x934,0xade,0x11e3,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x15f5,0x600,0x600, -0x15fc,0x600,0x600,0x600,0x1604,0x600,0x160c,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x161c,0x600,0x600, +0x1623,0x600,0x600,0x600,0x162b,0x600,0x1633,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xc90,0x600,0x600, -0x1614,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x161c,0x1624,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xca3,0x600,0x600, +0x163b,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1643,0x164b,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0xccf,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0xc32,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x162b,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1652,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1632,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1659,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x1639,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x1660,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x4b5,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x901,0x600,0x600,0x600,0x600,0x600,0x600,0xf69,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x901,0x600,0x600,0x600,0x600,0x600,0x600,0xf90,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1641,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1668,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1649,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x600, -0x600,0x600,0x1651,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xf69,0x4b5, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1670,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0xf90,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x600, +0x600,0x600,0x1674,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xf90,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x67d,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1314,0x4b5, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x133b,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x1661,0x1659,0x1659,0x1659,0x4b5,0x4b5,0x4b5,0x4b5,0x55c,0x55c,0x55c,0x55c,0x55c,0x55c,0x55c, -0x1669,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, +0x4b5,0x1684,0x167c,0x167c,0x167c,0x4b5,0x4b5,0x4b5,0x4b5,0x55c,0x55c,0x55c,0x55c,0x55c,0x55c,0x55c, +0x168c,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0x1671,0x494,0x494,0x494,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf, +0x4b5,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0x1694,0x494,0x494,0x494,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf, 0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf, 0xf,0xf,0xf,0xf,0xc,0x17,0x17,0x17,0x19,0x17,0x17,0x17,0x14,0x15,0x17,0x18, 0x17,0x13,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17, @@ -765,7 +765,7 @@ static const uint16_t propsTrie_index[23016]={ 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0,0,0,0,0x1b,0x58a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,6,6, +0x1b,0x1b,0x1b,0x1b,0x1b,0x58a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,6,6, 6,6,8,8,0x13,4,4,4,4,4,0x1b,0x1b,0x7ca,0xa4a,0xcca,4, 5,0x17,0x1b,0x1b,0xc,0x17,0x17,0x17,0x1b,4,5,0x54a,0x14,0x15,0x14,0x15, 0x14,0x15,0x14,0x15,0x14,0x15,0x1b,0x1b,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15, @@ -778,7 +778,7 @@ static const uint16_t propsTrie_index[23016]={ 5,5,5,5,0,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,0,0x1b,0x1b,0x58b,0x5cb,0x60b,0x64b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0, -0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, +0,0,0,0x1b,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1b,0xa8b,0xacb,0xb0b, @@ -793,664 +793,673 @@ static const uint16_t propsTrie_index[23016]={ 5,5,5,5,5,0x705,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,0x585,5,5,0x705,5,5,5,0x7885, 5,0x605,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,0x5c5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,0x785,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -0x5c5,5,5,5,5,5,5,5,0x685,5,0x645,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,0x785,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,0x5c5,5,5,5,5,5,5,5, +0x685,5,0x645,5,5,5,5,5,5,5,5,5,5,5,5,5, +0x7b85,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,0x7985,0x7c5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,0x7985,0x7c5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,0x7845,5,5,5,5, -5,5,5,5,0x605,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,0x685,5,5, +5,5,5,0x7845,5,5,5,5,5,5,5,5,0x605,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -0x1e45,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -0x7985,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x7a85,5, +5,5,5,5,5,0x685,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,0x1e45,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,0x5c5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,0x5c5,5,0x745,5,0x6c5,5,5, +5,5,0x5c5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,0x7985,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,0x7c5,5,0x7845,0xa45,0xcc5,5,5,5,5,5,5,0xf45,5,5,5, +5,5,5,5,5,5,5,5,5,5,0x7905,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,0x605,0x605,0x605,0x605,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,0x5c5,5,0x745,5,0x6c5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,0x7c5,5,0x7845, +0xa45,0xcc5,5,5,5,5,5,5,0xf45,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,0x605,0x605,0x605, +0x605,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x645, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,0x645,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,0x585,5,5,5,5,5,5,5,0x585,5,5, +5,0x585,5,5,5,5,5,5,5,0x585,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,0x585,5,5,5,5,5, +5,5,5,5,5,5,0x585,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,0x785,0xa45,5,5,5,5, -5,5,5,5,5,5,5,5,0x585,0x5c5,0x605,5,0x5c5,5,5,5, +5,5,5,5,5,5,0x785,0xa45,5,5,5,5,5,5,5,5, +5,5,5,5,0x585,0x5c5,0x605,5,0x5c5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,0x705,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x7c5,5, 5,5,5,5,5,5,5,5,5,5,5,5,0x745,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,0x705,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x785,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x1e45,5, +5,5,0x545,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,0x785,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,0x1e45,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,0x8005,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,0x79c5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,0x645,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 0x7885,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,0x5c5,5,5,5,5,0x5c5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,0x5c5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,0x7845,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x6c5,5, -5,5,5,5,0x1e45,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,0x785,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -0x6c5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,0x545,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,0,0,0,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,5,5,5,5, +5,0x7845,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,4,5,5,5,5,5,5,5,5,5,5,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0,0,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,4,0x17,0x17,0x17, +5,5,0x6c5,5,5,5,5,5,0x1e45,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,5,5,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +5,5,5,5,0x6c5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,4,5,5, +5,5,5,5,5,5,5,5,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0, +0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,4,0x17,0x17,0x17,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,5,5,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,1,2,1,2, 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, -1,2,1,2,1,2,1,2,1,2,1,2,4,4,6,6, -1,2,1,2,1,2,1,2,1,2,1,2,1,2,5,6, -7,7,7,0x17,6,6,6,6,6,6,6,6,6,6,0x17,4, -5,5,5,5,5,5,0x58a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x54a, -6,6,0x17,0x17,0x17,0x17,0x17,0x17,0,0,0,0,0,0,0,0, +1,2,1,2,1,2,1,2,4,4,6,6,1,2,1,2, +1,2,1,2,1,2,1,2,1,2,5,6,7,7,7,0x17, +6,6,6,6,6,6,6,6,6,6,0x17,4,5,5,5,5, +5,5,0x58a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x54a,6,6,0x17,0x17, +0x17,0x17,0x17,0x17,0,0,0,0,0,0,0,0,0x1a,0x1a,0x1a,0x1a, 0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a, -0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,4,4,4,4,4,4,4,4,4, +0x1a,0x1a,0x1a,4,4,4,4,4,4,4,4,4,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4, +4,1,2,5,4,4,2,5,5,5,5,5,0x1a,0x1a,1,2, +1,2,1,2,1,2,1,2,1,2,1,2,2,2,1,2, +1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, +4,2,2,2,2,2,2,2,2,1,2,1,2,1,1,2, +1,2,1,2,1,2,1,2,4,0x1a,0x1a,1,2,1,2,5, +1,2,1,2,2,2,1,2,1,2,1,2,1,2,1,2, +1,2,1,1,1,1,1,2,1,1,1,1,1,2,1,2, +1,2,1,2,1,2,1,2,1,1,1,1,2,1,2,0, +0,0,0,0,1,2,0,2,0,2,1,2,1,2,0,0, +0,0,0,0,5,5,6,5,5,5,6,5,5,5,5,6, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,8,8,6,6,8,0x1b,0x1b,0x1b,0x1b, +6,0,0,0,0x34cb,0x344b,0x3ccb,0x37cb,0x35cb,0x3fcb,0x1b,0x1b,0x19,0x1b,0,0, +0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,0x17,0x17,0x17,0x17,0,0,0,0, +0,0,0,0,8,8,8,8,6,6,0,0,0,0,0,0, +0,0,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0, +0,0,0,0,8,8,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,8,8,8,8,8,8,8,8,8,8,8,8, +6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, +6,6,5,5,5,5,5,5,0x17,0x17,0x17,5,0x17,5,5,6, +5,5,5,5,5,5,6,6,6,6,6,6,6,6,0x17,0x17, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,6,6,6,6,6,6,6,6,6,6,6,8,8, +0,0,0,0,0,0,0,0,0,0,0,0x17,8,0x17,0x17,0x17, +0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,4,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0x17,0x17,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6, +8,8,6,6,6,6,8,8,6,6,8,8,5,5,5,5, +5,6,4,5,5,5,5,5,5,5,5,5,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,5,5,5,5,5,0,5,5,5,5, +5,5,5,5,5,6,6,6,6,6,6,8,8,6,6,8, +8,6,6,0,0,0,0,0,0,0,0,0,5,5,5,6, +5,5,5,5,5,5,5,5,6,8,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0x17,0x17,0x17,0x17,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,4,5,5,5, +5,5,5,0x1b,0x1b,0x1b,5,8,6,8,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,6,5,6,6, +6,5,5,6,6,5,5,5,5,5,6,6,5,6,5,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,4,4,4,1,2,5,4,4,2,5,5,5,5,5, -0x1a,0x1a,1,2,1,2,1,2,1,2,1,2,1,2,1,2, -2,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, -1,2,1,2,4,2,2,2,2,2,2,2,2,1,2,1, -2,1,1,2,1,2,1,2,1,2,1,2,4,0x1a,0x1a,1, -2,1,2,5,1,2,1,2,2,2,1,2,1,2,1,2, -1,2,1,2,1,2,1,1,1,1,1,2,1,1,1,1, -1,2,1,2,1,2,1,2,1,2,1,2,1,1,1,1, -2,1,2,0,0,0,0,0,1,2,0,2,0,2,1,2, -1,2,0,0,0,0,0,0,5,5,6,5,5,5,6,5, -5,5,5,6,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,8,8,6,6,8, -0x1b,0x1b,0x1b,0x1b,6,0,0,0,0x34cb,0x344b,0x3ccb,0x37cb,0x35cb,0x3fcb,0x1b,0x1b, -0x19,0x1b,0,0,0,0,0,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,0x17,0x17,0x17,0x17, -0,0,0,0,0,0,0,0,8,8,8,8,6,6,0,0, -0,0,0,0,0,0,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, -0x249,0x289,0,0,0,0,0,0,8,8,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,8,8,8,8,8,8,8,8, -8,8,8,8,6,6,6,6,6,6,6,6,6,6,6,6, -6,6,6,6,6,6,5,5,5,5,5,5,0x17,0x17,0x17,5, -0x17,5,5,6,5,5,5,5,5,5,6,6,6,6,6,6, -6,6,0x17,0x17,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6, -6,6,8,8,0,0,0,0,0,0,0,0,0,0,0,0x17, -8,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,4, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0x17,0x17, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,6,8,8,6,6,6,6,8,8,6,6,8,8, -5,5,5,5,5,6,4,5,5,5,5,5,5,5,5,5, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,5,5,5,5,5,0, -5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,8, -8,6,6,8,8,6,6,0,0,0,0,0,0,0,0,0, -5,5,5,6,5,5,5,5,5,5,5,5,6,8,0,0, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0x17,0x17,0x17,0x17, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -4,5,5,5,5,5,5,0x1b,0x1b,0x1b,5,8,6,8,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -6,5,6,6,6,5,5,6,6,5,5,5,5,5,6,6, -5,6,5,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,5,5,4,0x17,0x17, -5,5,5,5,5,5,5,5,5,5,5,8,6,6,8,8, -0x17,0x17,5,4,4,8,6,0,0,0,0,0,0,0,0,0, -0,5,5,5,5,5,5,0,0,5,5,5,5,5,5,0, -0,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0, -5,5,5,5,5,5,5,0,5,5,5,5,5,5,5,0, +0,0,0,0,0,0,0,5,5,4,0x17,0x17,5,5,5,5, +5,5,5,5,5,5,5,8,6,6,8,8,0x17,0x17,5,4, +4,8,6,0,0,0,0,0,0,0,0,0,0,5,5,5, +5,5,5,0,0,5,5,5,5,5,5,0,0,5,5,5, +5,5,5,0,0,0,0,0,0,0,0,0,5,5,5,5, +5,5,5,0,5,5,5,5,5,5,5,0,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,0x1a,4,4,4,4, -2,2,2,2,2,2,2,2,2,4,0x1a,0x1a,0,0,0,0, -2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -5,5,5,8,8,6,8,8,6,8,8,0x17,8,6,0,0, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0, -5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0, -5,5,5,5,5,5,5,0,0,0,0,5,5,5,5,5, +2,2,2,2,2,2,2,0x1a,4,4,4,4,2,2,2,2, +2,2,2,2,2,4,0x1a,0x1a,0,0,0,0,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,5,5,5,8, +8,6,8,8,6,8,8,0x17,8,6,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,5,5,5,5, +0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,0,0,0,0,5,5,5,5, +5,5,5,0,0,0,0,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,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,0x12,0x12,0x12,0x12,0x12,0x12, -0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11, +0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x11,0x11,0x11,0x11, 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11, -5,5,5,5,5,5,5,5,5,5,5,0x605,5,5,5,5, -5,5,5,0x7c5,5,5,5,5,0x5c5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,0x6c5,5,0x6c5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,0x7c5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,0x18,5,5,5,5,5,5,5,5,5,5,5,5,5,0, -5,5,5,5,5,0,5,0,5,5,0,5,5,0,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,2,2,2,2,2,2,2,0, -0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2, -0,0,0,0,0,5,6,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a, -0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,0x15,0x14,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,0,0,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0, -0,0,0,0x1b,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, -0x19,0x1b,0x1b,0x1b,6,6,6,6,6,6,6,6,6,6,6,6, -6,6,6,6,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x14,0x15,0x17,0,0, -0,0,0,0,6,6,6,6,6,6,6,6,6,6,6,6, -6,6,6,6,0x17,0x13,0x13,0x16,0x16,0x14,0x15,0x14,0x15,0x14,0x15,0x14, -0x15,0x14,0x15,0x14,0x15,0x17,0x17,0x14,0x15,0x17,0x17,0x17,0x17,0x16,0x16,0x16, -0x17,0x17,0x17,0,0x17,0x17,0x17,0x17,0x13,0x14,0x15,0x14,0x15,0x14,0x15,0x17, -0x17,0x17,0x18,0x13,0x18,0x18,0x18,0,0x17,0x19,0x17,0x17,0,0,0,0, -5,5,5,5,5,0,5,5,5,5,5,5,5,5,5,5, +0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,5,5,5,5, +5,5,5,5,5,5,5,0x605,5,5,5,5,5,5,5,0x7c5, +5,5,5,5,0x5c5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,0x6c5,5,0x6c5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,0x7c5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,0,0,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,0x18,5,5, +5,5,5,5,5,5,5,5,5,5,5,0,5,5,5,5, +5,0,5,0,5,5,0,5,5,0,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,2,2,2,2,2,2,2,0,0,0,0,0, +0,0,0,0,0,0,0,2,2,2,2,2,0,0,0,0, +0,5,6,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a, +0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,0x15,0x14,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,0,0,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0x1b, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +5,5,5,5,5,5,5,5,5,5,5,5,0x19,0x1b,0x1b,0x1b, +6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, +0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x14,0x15,0x17,0,0,0,0,0,0, +6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, +0x17,0x13,0x13,0x16,0x16,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14, +0x15,0x17,0x17,0x14,0x15,0x17,0x17,0x17,0x17,0x16,0x16,0x16,0x17,0x17,0x17,0, +0x17,0x17,0x17,0x17,0x13,0x14,0x15,0x14,0x15,0x14,0x15,0x17,0x17,0x17,0x18,0x13, +0x18,0x18,0x18,0,0x17,0x19,0x17,0x17,0,0,0,0,5,5,5,5, +5,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,0,0,0x10,0,0,5,5,5,5,5,5, -0,0,5,5,5,5,5,5,0,0,5,5,5,5,5,5, -0,0,5,5,5,0,0,0,0x19,0x19,0x18,0x1a,0x1b,0x19,0x19,0, -0x1b,0x18,0x18,0x18,0x18,0x1b,0x1b,0,0,0,0,0,0,0,0,0, -0,0x10,0x10,0x10,0x1b,0x1b,0,0,0,0x17,0x17,0x17,0x19,0x17,0x17,0x17, -0x14,0x15,0x17,0x18,0x17,0x13,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, -0x249,0x289,0x17,0x17,0x18,0x18,0x18,0x17,0x1a,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,0x14,0x18,0x15,0x18,0x14,0x15,0x17,0x14,0x15,0x17,0x17,5,5, -5,5,5,5,5,5,5,5,4,5,5,5,5,5,5,5, +5,0,0,0x10,0,0,5,5,5,5,5,5,0,0,5,5, +5,5,5,5,0,0,5,5,5,5,5,5,0,0,5,5, +5,0,0,0,0x19,0x19,0x18,0x1a,0x1b,0x19,0x19,0,0x1b,0x18,0x18,0x18, +0x18,0x1b,0x1b,0,0,0,0,0,0,0,0,0,0,0x10,0x10,0x10, +0x1b,0x1b,0,0,0,0x17,0x17,0x17,0x19,0x17,0x17,0x17,0x14,0x15,0x17,0x18, +0x17,0x13,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17, +0x18,0x18,0x18,0x17,0x1a,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0x14, +0x18,0x15,0x18,0x14,0x15,0x17,0x14,0x15,0x17,0x17,5,5,5,5,5,5, +5,5,5,5,4,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,4,4,5,5,5,5, -5,5,5,5,5,5,5,5,0,5,5,5,5,5,5,5, +5,5,5,5,5,5,4,4,5,5,5,5,5,5,5,5, +5,5,5,5,0,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,0,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,0,5,5,0,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,0,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,0,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,0,0,0,0,0,0xb00b,0xb80b,0x784b,0x804b,0x884b,0x904b,0x984b,0xa04b, -0xa84b,0xb04b,0xb84b,0x788b,0x808b,0x888b,0x908b,0x988b,0xa08b,0xa88b,0xb08b,0xb88b,0,0,0,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x17,0x17,0x17,0,0,0,0,0x58b, -0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b, -0x1bcb,0x1e4b,0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0xcca,0x11ca,0x11ca, -0x11ca,0x11ca,0x1e4a,0x880a,0x980a,0x980a,0x980a,0x980a,0x980a,0x784a,0x984a,0x68a,0x11ca,0x344b,0x344b,0x388b, -0x3ccb,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x54b,0x34cb, -0x1b,0x1b,0x1b,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0,0,0,0x34ca,0x344a,0x58a,0x68a,0x11ca,0x980a,0x984a,0x988a,0x68a,0x7ca,0x11ca,0x1e4a, -0x980a,0x784a,0x984a,0x68a,0x7ca,0x11ca,0x1e4a,0x980a,0x784a,0x788a,0x988a,0x7ca,0x58a,0x58a,0x58a,0x5ca, -0x5ca,0x5ca,0x5ca,0x68a,0x1b,0,0,0,0,0,0,0,0,0,0,0, +5,5,0,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,0,0,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,0,0,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0, +0,0,0,0,0xb00b,0xb80b,0x784b,0x804b,0x884b,0x904b,0x984b,0xa04b,0xa84b,0xb04b,0xb84b,0x788b, +0x808b,0x888b,0x908b,0x988b,0xa08b,0xa88b,0xb08b,0xb88b,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x17,0x17,0x17,0,0,0,0,0x58b,0x5cb,0x60b,0x64b,0x68b, +0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0x800b,0x880b, +0x900b,0x980b,0xa00b,0xa80b,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0xcca,0x11ca,0x11ca,0x11ca,0x11ca,0x1e4a,0x880a, +0x980a,0x980a,0x980a,0x980a,0x980a,0x784a,0x984a,0x68a,0x11ca,0x344b,0x344b,0x388b,0x3ccb,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x54b,0x34cb,0x1b,0x1b,0x1b,0, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0, +0x34ca,0x344a,0x58a,0x68a,0x11ca,0x980a,0x984a,0x988a,0x68a,0x7ca,0x11ca,0x1e4a,0x980a,0x784a,0x984a,0x68a, +0x7ca,0x11ca,0x1e4a,0x980a,0x784a,0x788a,0x988a,0x7ca,0x58a,0x58a,0x58a,0x5ca,0x5ca,0x5ca,0x5ca,0x68a, +0x1b,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,0,0,0,0,0,0, -0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,6,0,0,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,6,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b, -0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b, -0,0,0,0,0x58b,0x68b,0x7cb,0x11cb,0,0,0,0,0,0,0,0, -0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,0x1bca,5,5,5,5,5,5,5,5,0xb80a,0, -0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,0, -0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,0,0, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,0,0x17,5,5,5,5,0,0,0,0,5,5,5,5, -5,5,5,5,0x17,0x58a,0x5ca,0x7ca,0xa4a,0x1e4a,0,0,0,0,0,0, -0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,5,5,5,5,5,5,5,5,5,5,5,5, +5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +6,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b, +0x16cb,0x194b,0x1bcb,0x1e4b,0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b,0,0,0,0, +0x58b,0x68b,0x7cb,0x11cb,0,0,0,0,0,0,0,0,0,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0, -0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,0,0,0,0,2,2,2,2, -2,2,2,2,5,5,5,5,5,5,5,5,0,0,0,0, -0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0x17, -1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1, -2,2,0,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,0,2,2,2,2,2,2,2,0,2,2,0,0,0, -1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1, -1,1,1,0,1,1,0,2,2,2,2,2,2,2,2,2, -5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, -4,0,4,4,4,4,4,4,4,4,4,0,0,0,0,0, -4,4,4,4,4,4,0,4,4,4,4,4,4,4,4,4, -4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, +5,0x1bca,5,5,5,5,5,5,5,5,0xb80a,0,0,0,0,0, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,0,5,5,0,0,0,5,0,0,5, -5,5,5,5,5,5,0,0,5,0,5,5,5,5,5,5, +5,5,5,5,5,5,6,6,6,6,6,0,0,0,0,0, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,0,0x17,0x58b,0x5cb,0x60b,0x7cb,0xa4b,0x1e4b,0x784b,0x788b,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0x17, +5,5,5,5,0,0,0,0,5,5,5,5,5,5,5,5, +0x17,0x58a,0x5ca,0x7ca,0xa4a,0x1e4a,0,0,0,0,0,0,0,0,0,0, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,0x1b,0x1b,0x58b,0x5cb,0x60b,0x64b,0x68b,0x7cb,0xa4b,0,0,0,0, -0,0,0,0x58b,0x5cb,0x60b,0x64b,0x64b,0x68b,0x7cb,0xa4b,0x1e4b,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0, -5,5,0,0,0,0,0,0x58b,0x68b,0x7cb,0xa4b,0x1e4b,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0, +0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,0,0,0,0,2,2,2,2,2,2,2,2, +5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,0x58b,0x7cb,0xa4b,0x1e4b,0x5cb,0x60b,0,0,0,0x17,5,5,5,5, +0,0,0,0,0,0,0,0,0,0,0,0x17,1,1,1,1, +1,1,1,1,1,1,1,0,1,1,1,1,2,2,0,2, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,2, +2,2,2,2,2,2,0,2,2,0,0,0,1,1,1,1, +1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0, +1,1,0,2,2,2,2,2,2,2,2,2,5,5,5,5, +5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4, +4,4,4,4,4,4,4,4,4,4,4,4,4,0,4,4, +4,4,4,4,4,4,4,0,0,0,0,0,4,4,4,4, +4,4,0,4,4,4,4,4,4,4,4,4,4,4,4,4, +4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,0,5,5,0,0,0,5,0,0,5,5,5,5,5, +5,5,0,0,5,0,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0x17, +0x58b,0x5cb,0x60b,0x7cb,0xa4b,0x1e4b,0x784b,0x788b,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x1b, +0x1b,0x58b,0x5cb,0x60b,0x64b,0x68b,0x7cb,0xa4b,0,0,0,0,0,0,0,0x58b, +0x5cb,0x60b,0x64b,0x64b,0x68b,0x7cb,0xa4b,0x1e4b,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,0,5,5,0,0, +0,0,0,0x58b,0x68b,0x7cb,0xa4b,0x1e4b,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x58b,0x7cb, +0xa4b,0x1e4b,0x5cb,0x60b,0,0,0,0x17,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,0,0,0,0,0,0x17,0xa04b,0xa84b,0xb04b,0xb84b,0x788b,0x808b,0x888b,0x908b, +0x988b,0xa08b,0xa88b,0xb08b,0xb88b,0x78cb,0x80cb,0x88cb,0x90cb,0x98cb,0xa0cb,0xa8cb,0xb0cb,0xb8cb,0x36cb,0x354b, +0x34cb,0x348b,0x46cb,0x344b,0x4ecb,0x388b,0x3ccb,0x454b,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +0,0,0,0,0x5ecb,0x344b,5,5,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b, +0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0,0,0x1e4b,0x800b,0x880b,0x900b,0x980b,0xa00b, +0xa80b,0xb00b,0xb80b,0x784b,0x804b,0x884b,0x904b,0x984b,0x30b,0x34b,0x38b,0x3cb,0x7cb,0xa4b,0x1e4b,0x784b, +0x344b,0,0,0,0,0,0,0,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, +0x17,0,0,0,0,0,0,0,5,6,6,6,0,6,6,0, +0,0,0,0,6,6,6,6,5,5,5,5,0,5,5,5, +0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,0,0,6,6,6,0, +0,0,0,6,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,0,0,0,0,0,0x17,0xa04b,0xa84b,0xb04b,0xb84b, -0x788b,0x808b,0x888b,0x908b,0x988b,0xa08b,0xa88b,0xb08b,0xb88b,0x78cb,0x80cb,0x88cb,0x90cb,0x98cb,0xa0cb,0xa8cb, -0xb0cb,0xb8cb,0x36cb,0x354b,0x34cb,0x348b,0x46cb,0x344b,0x4ecb,0x388b,0x3ccb,0x454b,5,5,5,5, +5,0x58b,0x11cb,0x17,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,0,0,0,0,0x5ecb,0x344b,5,5,0x58b,0x5cb,0x60b,0x64b, -0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0,0,0x1e4b,0x800b, -0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b,0x784b,0x804b,0x884b,0x904b,0x984b,0x30b,0x34b,0x38b,0x3cb, -0x7cb,0xa4b,0x1e4b,0x784b,0x344b,0,0,0,0,0,0,0,0x17,0x17,0x17,0x17, -0x17,0x17,0x17,0x17,0x17,0,0,0,0,0,0,0,5,6,6,6, -0,6,6,0,0,0,0,0,6,6,6,6,5,5,5,5, -0,5,5,5,0,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0, -6,6,6,0,0,0,0,6,5,5,5,5,5,5,5,5, +5,0x58b,0x7cb,0xa4b,5,5,5,5,5,6,6,0,0,0,0,0x58b, +0x68b,0x7cb,0xa4b,0x1e4b,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,0,0,0,0, +0,0,0,0,5,5,5,5,5,5,5,5,0x1b,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,0x58b,0x11cb,0x17,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,0,0,0,0x17,0x17,0x17,0x17,0x17,0x17,0x17, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,0x58b,0x7cb,0xa4b,5,5,5,5,5,6,6,0, -0,0,0,0x58b,0x68b,0x7cb,0xa4b,0x1e4b,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0, -0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, -0x1b,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,0,0,0,0x17,0x17,0x17, -0x17,0x17,0x17,0x17,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,0,0,0x58b,0x5cb,0x60b,0x64b, -0x7cb,0xa4b,0x1e4b,0x784b,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,0,0,0,0,0,0x58b,0x5cb,0x60b,0x64b, -0x7cb,0xa4b,0x1e4b,0x784b,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,0,0,0,0,0,0,0,0x17,0x17,0x17, -0x17,0,0,0,0,0,0,0,0,0,0,0,0,0x58b,0x5cb,0x60b, -0x64b,0x7cb,0xa4b,0x1e4b,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,5,5,5,5,5,5,5,5,5,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0, -0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,0,0,0,0,0,0,0,0x58b,0x68b, -0x7cb,0x11cb,0x1e4b,0x784b,5,5,5,5,6,6,6,6,0,0,0,0, -0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0, -0,0,0,0,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0xa4b,0xccb, -0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b,0x344b, -0x34cb,0x348b,0x388b,0,5,5,5,5,5,5,5,5,5,5,0,6, -6,0x13,0,0,5,5,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,0, -0,0,0,0,0,6,6,6,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,0,0,0x58b,0x5cb,0x60b,0x64b,0x7cb,0xa4b,0x1e4b,0x784b, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,0x58b,0x5cb,0x60b,0x64b,0x68b,0x7cb,0xa4b,0xccb,0x1e4b,0x344b,5, -0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6, -6,6,6,6,6,0x58b,0x7cb,0xa4b,0x1e4b,0x17,0x17,0x17,0x17,0x17,0,0, -0,0,0,0,5,5,6,6,6,6,0x17,0x17,0x17,0x17,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,5,5,5,5,5,0x58b,0x5cb,0x60b,0x64b,0x7cb,0xa4b,0x1e4b, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0x784b,0x49,0x89,0xc9,0x109,0x149,0x189, -0x1c9,0x209,0x249,0x289,6,5,5,6,6,5,0,0,0,0,0,0, -0,0,0,6,8,6,8,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,6,6,6,6,6,6,6,0x17,0x17,0x17,0x17,0x17, -0x17,0x17,0,0,0,0,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb, -0xa4b,0xccb,0xf4b,0x11cb,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,8,8,8,6,6,6,6,8,8,6,6,0x17, -0x17,0x10,0x17,0x17,0x17,0x17,6,0,0,0,0,0,0,0,0,0, -0,0x10,0,0,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, -0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,5,5,5,5, -5,5,5,6,6,6,6,6,8,6,6,6,6,6,6,6, -6,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,0x17,0x17, -5,8,8,5,0,0,0,0,0,0,0,0,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,5, +5,5,5,0,0,0,0,0,0x58b,0x5cb,0x60b,0x64b,0x7cb,0xa4b,0x1e4b,0x784b, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6, -0x17,0x17,5,0,0,0,0,0,0,0,0,0,8,5,5,5, -5,0x17,0x17,0x17,0x17,6,6,6,6,0x17,8,6,0x49,0x89,0xc9,0x109, -0x149,0x189,0x1c9,0x209,0x249,0x289,5,0x17,5,0x17,0x17,0x17,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,8, -8,8,6,6,6,6,6,6,6,6,6,8,0,0x58b,0x5cb,0x60b, -0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b, -0x784b,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, -5,5,5,5,5,5,5,5,8,8,8,6,6,6,8,8, -6,8,6,6,0x17,0x17,0x17,0x17,0x17,0x17,6,5,5,6,0,0, +5,5,0,0,0,0,0,0,0,0x17,0x17,0x17,0x17,0,0,0, +0,0,0,0,0,0,0,0,0,0x58b,0x5cb,0x60b,0x64b,0x7cb,0xa4b,0x1e4b, 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,0,0,0,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0, -5,0,5,5,5,5,0,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,0,5,5,5,5,5,5,5,5,5, -5,0x17,0,0,0,0,0,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,8,8,8,6,6,6,6,6, -6,6,6,0,0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, -0x249,0x289,0,0,0,0,0,0,5,5,8,8,0,0,6,6, -6,6,6,6,6,0,0,0,6,6,6,6,6,0,0,0, -0,0,0,0,0,0,0,0,6,6,8,8,0,5,5,5, -5,5,5,5,5,0,0,5,5,0,0,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,0,5,5,5,5,5,5, -5,0,5,5,0,5,5,5,5,5,0,6,6,5,8,8, -6,8,8,8,8,0,0,8,8,0,0,8,8,8,0,0, -5,0,0,0,0,0,0,8,0,0,0,0,0,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,8,8,8,6,6,6,6,6,6,6,6, -8,8,6,6,6,8,6,5,5,5,5,0x17,0x17,0x17,0x17,0x17, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,0,0x17,6,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -8,8,8,6,6,6,6,6,6,8,6,8,8,8,8,6, -6,8,6,6,5,5,0x17,5,0,0,0,0,0,0,0,0, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,8, -8,8,6,6,6,6,0,0,8,8,8,8,6,6,8,6, -6,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, -0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,5,5,5,5,6,6,0,0, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -8,8,8,6,6,6,6,6,6,6,6,8,8,6,8,6, -6,0x17,0x17,0x17,5,0,0,0,0,0,0,0,0,0,0,0, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0, -0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,0,0, +5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,0,0,0,0,0,0,0,0x58b,0x68b,0x7cb,0x11cb,0x1e4b,0x784b, +5,5,5,5,6,6,6,6,0,0,0,0,0,0,0,0, 0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0, +0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb, +0x194b,0x1bcb,0x1e4b,0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b,0x344b,0x34cb,0x348b,0x388b,0, +5,5,5,5,5,5,5,5,5,5,0,6,6,0x13,0,0, +5,5,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,0,0,0,0,0, -5,5,5,5,5,5,5,5,5,5,5,6,8,6,8,8, -6,6,6,6,6,6,8,6,5,0x17,0,0,0,0,0,0, -8,8,6,6,6,6,8,6,6,6,6,6,0,0,0,0, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x7cb,0xa4b,0x17,0x17,0x17,0x1b, -5,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0, +0,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,0x58b,0x5cb,0x60b,0x64b,0x68b,0x7cb,0xa4b,0xccb,0x1e4b,0x344b,5,0,0,0,0, +0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6, +6,0x58b,0x7cb,0xa4b,0x1e4b,0x17,0x17,0x17,0x17,0x17,0,0,0,0,0,0, +5,5,6,6,6,6,0x17,0x17,0x17,0x17,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -5,5,5,5,5,5,5,5,5,5,5,5,8,8,8,6, -6,6,6,6,6,6,6,6,8,6,6,0x17,0,0,0,0, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b, -0x16cb,0x194b,0x1bcb,0,0,0,0,0,0,0,0,0,0,0,0,5, -8,5,8,6,0x17,0x17,0x17,0,0,0,0,0,0,0,0,0, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0, -5,5,5,5,5,5,5,0,0,5,0,0,5,5,5,5, -5,5,5,5,0,5,5,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,8,8,8,8,8,8,0,8, -8,0,0,6,6,8,6,5,6,5,0x17,5,8,0,0,0, +5,5,5,5,5,0x58b,0x5cb,0x60b,0x64b,0x7cb,0xa4b,0x1e4b,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0x784b,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289, +6,5,5,6,6,5,0,0,0,0,0,0,0,0,0,6, +8,6,8,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +6,6,6,6,6,6,6,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,0, +0,0,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +8,8,8,6,6,6,6,8,8,6,6,0x17,0x17,0x10,0x17,0x17, +0x17,0x17,6,0,0,0,0,0,0,0,0,0,0,0x10,0,0, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, +0x249,0x289,0,0,0,0,0,0,5,5,5,5,5,5,5,6, +6,6,6,6,8,6,6,6,6,6,6,6,6,0,0x49,0x89, +0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,0x17,0x17,5,8,8,5, 0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, -0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,8,8,8,6,6,6,6, -0,0,6,6,8,8,8,8,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6, -6,8,5,6,6,6,6,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,6, -0,0,0,0,0,0,0,0,5,6,6,6,6,6,6,8, -8,6,6,6,5,5,5,5,5,6,6,6,6,6,6,6, -6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,0x17,0x17,0x17,0,0,0,0,0, +5,5,5,5,5,5,5,5,6,6,6,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,6,0x17,0x17,5,0, +0,0,0,0,0,0,0,0,8,5,5,5,5,0x17,0x17,0x17, +0x17,6,6,6,6,0x17,8,6,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, +0x249,0x289,5,0x17,5,0x17,0x17,0x17,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,8,8,8,6,6, +6,6,6,6,6,6,6,8,0,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b, +0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0x784b,0,0,0, 0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6, -6,6,6,6,6,6,6,8,6,6,0x17,0x17,0x17,5,0x17,0x17, -5,0x17,0x17,0x17,0x17,0x17,0,0,0,0,0,0,0,0,0,0, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb, -0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,0,0,0,0,0, +5,5,5,5,8,8,8,6,6,6,8,8,6,8,6,6, +0x17,0x17,0x17,0x17,0x17,0x17,6,5,5,6,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0,0,0, -0x17,0x17,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,8,6,6,6,6, -6,6,6,0,6,6,6,6,6,6,8,6,6,6,6,6, -6,6,6,6,0,8,6,6,6,6,6,6,6,8,6,6, -8,6,6,0,0,0,0,0,0,0,0,0,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,0,0,6,6, -6,6,6,6,6,6,6,6,6,6,6,6,6,6,5,6, -0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, -0x249,0x289,0,0,0,0,0,0,5,5,5,5,5,5,5,0, +0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,0,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,0,5,0,5,5, 5,5,0,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,0, -0,0,6,0,6,6,0,6,5,5,5,5,5,5,5,5, -5,5,8,8,8,8,8,0,6,6,0,8,8,6,8,6, -5,0,0,0,0,0,0,0,5,5,5,5,5,5,0,5, -5,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,6,6,8,8,0x17, -0x17,0,0,0,0,0,0,0,6,8,6,0x17,0x17,0x17,0x17,0x17, -0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, -0x249,0x289,0,0,0,0,0,0,6,6,5,8,5,5,5,5, -5,5,5,5,5,5,5,5,5,0,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -8,8,6,6,6,6,6,0,0,0,8,8,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x19,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0, -0,0,0,0,0,0,0,0,0,0,0,0x17,0xcd0b,0xcc0b,0xcb0b,0xd00b, -0xca0b,0xcf0b,0xcb4b,0xd04b,0xc90b,0x37cb,0x37cb,0x364b,0x35cb,0xc94b,0x3fcb,0x350b,0x34cb,0x344b,0x344b,0x3ccb, -0xcd0b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x19,0x19,0x19,0x34ca,0x354a,0x34ca,0x34ca, -0x344a,0x348a,0x388a,0xf4a,0x11ca,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0,0x17,0x17,0x17,0x17, -0x17,0,0,0,0,0,0,0,0,0,0,0,0x5ca,0x60a,0x64a,0x68a, -0x6ca,0x70a,0x74a,0x78a,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x64a,0x68a,0x6ca,0x70a,0x74a, -0x78a,0x58a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x58a,0x5ca,0x60a,0x64a,0x68a,0x5ca, -0x60a,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x58a,0x5ca,0x60a,0x60a,0x64a,0x68a,0xc08a,0xc18a, -0x58a,0x5ca,0x60a,0x60a,0x64a,0x68a,0x60a,0x60a,0x64a,0x64a,0x64a,0x64a,0x6ca,0x70a,0x70a,0x70a, -0x74a,0x74a,0x78a,0x78a,0x78a,0x78a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x58a,0x5ca,0x60a,0x64a,0x64a, -0x68a,0x68a,0x5ca,0x60a,0x58a,0x5ca,0x348a,0x388a,0x454a,0x348a,0x388a,0x35ca,5,5,5,5, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +5,5,0,5,5,5,5,5,5,5,5,5,5,0x17,0,0, +0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,8,8,8,6,6,6,6,6,6,6,6,0, +0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0, +0,0,0,0,5,5,8,8,0,0,6,6,6,6,6,6, +6,0,0,0,6,6,6,6,6,0,0,0,0,0,0,0, +0,0,0,0,6,6,8,8,0,5,5,5,5,5,5,5, +5,0,0,5,5,0,0,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,0,5,5,5,5,5,5,5,0,5,5, +0,5,5,5,5,5,0,6,6,5,8,8,6,8,8,8, +8,0,0,8,8,0,0,8,8,8,0,0,5,0,0,0, +0,0,0,8,0,0,0,0,0,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,8,8,8,6,6,6,6,6,6,6,6,8,8,6,6, +6,8,6,5,5,5,5,0x17,0x17,0x17,0x17,0x17,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,0,0x17,6,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,8,8,8,6, +6,6,6,6,6,8,6,8,8,8,8,6,6,8,6,6, +5,5,0x17,5,0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,8,8,8,6,6, +6,6,0,0,8,8,8,8,6,6,8,6,6,0x17,0x17,0x17, +0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, +0x17,0x17,0x17,0x17,5,5,5,5,6,6,0,0,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,8,8,8,6, +6,6,6,6,6,6,6,8,8,6,8,6,6,0x17,0x17,0x17, +5,0,0,0,0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,0x17,0x17,0x17,0x17, +0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,0x17,0x17,0, +5,5,5,5,5,5,5,6,8,6,8,8,6,6,6,6, +6,6,8,6,5,0x17,0,0,0,0,0,0,8,8,6,6, +6,6,8,6,6,6,6,6,0,0,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0x7cb,0xa4b,0x17,0x17,0x17,0x1b,5,5,5,5, +5,5,5,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,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,6,5,5,5, -5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6, -6,6,0,0,0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, +5,5,5,5,5,5,5,5,8,8,8,6,6,6,6,6, +6,6,6,6,8,6,6,0x17,0,0,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0, +0,0,0,0,0,0,0,0,0,0,0,5,8,5,8,6, +0x17,0x17,0x17,0,0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, 0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0, -6,6,6,6,6,0x17,0,0,0,0,0,0,0,0,0,0, +5,5,5,0,0,5,0,0,5,5,5,5,5,5,5,5, +0,5,5,0,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,8,8,8,8,8,8,0,8,8,0,0,6, +6,8,6,5,6,5,0x17,5,8,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,0,0,5,5,5,5,5,5,5,5,0,0,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,8,8,8,6,6,6,6,0,0,6,6, +8,8,8,8,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,6,6,6,6,6,6,8,5,6, +6,6,6,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,6,0,0,0,0, +0,0,0,0,5,6,6,6,6,6,6,8,8,6,6,6, +5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,0x17,0x17,0x17,0,0,0,0,0,0,0,0,0, +0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6, +6,6,6,8,6,6,0x17,0x17,0x17,5,0x17,0x17,5,0x17,0x17,0x17, +0x17,0x17,0,0,0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x17,0x17,0x17,0x17, +0x17,0x17,0x17,0x17,0x17,0x17,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x70b,0x74b,0x78b,0x7cb, +0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0,0,0,0x17,0x17,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,0,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,8,6,6,6,6,6,6,6,0, +6,6,6,6,6,6,8,6,6,6,6,6,6,6,6,6, +0,8,6,6,6,6,6,6,6,8,6,6,8,6,6,0, +0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,0,0,6,6,6,6,6,6, +6,6,6,6,6,6,6,6,6,6,5,6,0,0,0,0, +0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0, +0,0,0,0,5,5,5,5,5,5,5,0,5,5,0,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,6,6,6,6,6,6,0,0,0,6,0, +6,6,0,6,5,5,5,5,5,5,5,5,5,5,8,8, +8,8,8,0,6,6,0,8,8,6,8,6,5,0,0,0, +0,0,0,0,5,5,5,5,5,5,0,5,5,0,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,6,6,8,8,0x17,0x17,0,0,0, +0,0,0,0,6,8,6,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, +0x17,0x17,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0, +0,0,0,0,6,6,5,8,5,5,5,5,5,5,5,5, +5,5,5,5,5,0,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,8,8,6,6, +6,6,6,0,0,0,8,8,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x19,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0, +0,0,0,0,0,0,0,0x17,0xcd0b,0xcc0b,0xcb0b,0xd00b,0xca0b,0xcf0b,0xcb4b,0xd04b, +0xc90b,0x37cb,0x37cb,0x364b,0x35cb,0xc94b,0x3fcb,0x350b,0x34cb,0x344b,0x344b,0x3ccb,0xcd0b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x19,0x19,0x19,0x34ca,0x354a,0x34ca,0x34ca,0x344a,0x348a,0x388a,0xf4a, +0x11ca,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0,0x17,0x17,0x17,0x17,0x17,0,0,0, +0,0,0,0,0,0,0,0,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a, +0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x58a,0x5ca,0x60a, +0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x58a,0x5ca,0x60a,0x64a,0x68a,0x5ca,0x60a,0x60a,0x64a,0x68a, +0x6ca,0x70a,0x74a,0x78a,0x58a,0x5ca,0x60a,0x60a,0x64a,0x68a,0xc08a,0xc18a,0x58a,0x5ca,0x60a,0x60a, +0x64a,0x68a,0x60a,0x60a,0x64a,0x64a,0x64a,0x64a,0x6ca,0x70a,0x70a,0x70a,0x74a,0x74a,0x78a,0x78a, +0x78a,0x78a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x58a,0x5ca,0x60a,0x64a,0x64a,0x68a,0x68a,0x5ca,0x60a, +0x58a,0x5ca,0x348a,0x388a,0x454a,0x348a,0x388a,0x35ca,5,5,5,5,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,0,0,0,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,0x17,0x17,0,0,0,0,0, +0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, +0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,6,5,5,5,5,5,5,6, +6,6,6,6,6,6,6,6,6,6,6,6,6,6,0,0, +0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, +0x249,0x289,0,0,0,0,0,0,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,0,0,6,6,6,6, +6,0x17,0,0,0,0,0,0,0,0,0,0,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6, +6,6,6,0x17,0x17,0x17,0x17,0x17,0x1b,0x1b,0x1b,0x1b,4,4,4,4, +0x17,0x1b,0,0,0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0x7cb,0x1e4b,0x788b,0x790b,0x798b,0x7a0b,0x7a8b,0,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -6,6,6,6,6,6,6,0x17,0x17,0x17,0x17,0x17,0x1b,0x1b,0x1b,0x1b, -4,4,4,4,0x17,0x1b,0,0,0,0,0,0,0,0,0,0, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0x7cb,0x1e4b,0x788b,0x790b,0x798b, -0x7a0b,0x7a8b,0,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,0,0,0,0,0,5,5,5, -0x54b,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0x80b,0x84b,0x88b,0x8cb,0x90b, -0x94b,0x98b,0x9cb,0xa0b,0x58b,0x5cb,0x60b,0x17,0x17,0x17,0x17,0,0,0,0,0, -5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,6, -5,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, +5,5,5,5,0,0,0,0,0,5,5,5,0x54b,0x58b,0x5cb,0x60b, +0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0x80b,0x84b,0x88b,0x8cb,0x90b,0x94b,0x98b,0x9cb,0xa0b, +0x58b,0x5cb,0x60b,0x17,0x17,0x17,0x17,0,0,0,0,0,5,5,5,5, +5,5,5,5,5,5,5,0,0,0,0,6,5,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -8,8,8,8,0,0,0,0,0,0,0,6,6,6,6,4, -4,4,4,4,4,4,4,4,4,4,4,4,4,4,0x17,4, -6,0,0,0,0,0,0,0,0,0,0,0,8,8,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, +8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, +0,0,0,0,0,0,0,6,6,6,6,4,4,4,4,4, +4,4,4,4,4,4,4,4,4,4,0x17,4,6,0,0,0, +0,0,0,0,0,0,0,0,8,8,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,4,4,4,4,0,4,4,4,4,4,4,4, -0,4,4,0,5,5,5,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,5,5,5,0,0,5,0,0, -0,0,0,0,0,0,0,0,5,5,5,5,0,0,0,0, -0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,0,0,0,0,0,5,5,5,5, -5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,0, -5,5,5,5,5,5,5,5,5,5,0,0,0x1b,6,6,0x17, -0x10,0x10,0x10,0x10,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,0,0,0, -0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0,0,0,0,0, +4,4,4,4,0,4,4,4,4,4,4,4,0,4,4,0, +5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,5,5,5,0,0,5,0,0,0,0,0,0, +0,0,0,0,5,5,5,5,0,0,0,0,0,0,0,0, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,0,0,0,0,0,5,5,5,5,5,5,5,5, +5,5,5,5,5,0,0,0,0,0,0,0,5,5,5,5, +5,5,5,5,5,5,0,0,0x1b,6,6,0x17,0x10,0x10,0x10,0x10, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -6,6,6,6,6,6,6,6,6,6,6,6,6,6,0,0, -6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, -6,6,6,0,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0, -0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,8,8,6,6,6,0x1b,0x1b, -0x1b,8,8,8,8,8,8,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,6, -6,6,6,6,6,6,6,0x1b,0x1b,6,6,6,6,6,6,6, +0,0,0,0,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, +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,0,0,0,6,6,6,6, +6,6,6,6,6,6,6,6,6,6,0,0,6,6,6,6, +6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,0, +0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,6,6,6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,6, -6,0x1b,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,0,0x54b,0x58b,0x5cb,0x60b, -0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0x80b,0x84b,0x88b,0x8cb,0x90b,0x94b,0x98b,0x9cb,0xa0b, -0,0,0,0,0,0,0,0,0,0,0,0,0x58b,0x5cb,0x60b,0x64b, -0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x58b,0x5cb, -0x60b,0x64b,0x68b,0x58b,0x68b,0,0,0,0,0,0,0,0x249,0x289,0x49,0x89, -0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, -0x249,0x289,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,1,1,1,1, +0x1b,0x1b,0x1b,0x1b,0x1b,8,8,6,6,6,0x1b,0x1b,0x1b,8,8,8, +8,8,8,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,6,6,6,6,6, +6,6,6,0x1b,0x1b,6,6,6,6,6,6,6,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,6,6,6,6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,6,6,0x1b,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,0,0x54b,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b, +0x74b,0x78b,0x7cb,0x80b,0x84b,0x88b,0x8cb,0x90b,0x94b,0x98b,0x9cb,0xa0b,0,0,0,0, +0,0,0,0,0,0,0,0,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b, +0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x58b,0x5cb,0x60b,0x64b,0x68b,0x58b, +0x68b,0,0,0,0,0,0,0,0x249,0x289,0x49,0x89,0xc9,0x109,0x149,0x189, +0x1c9,0x209,0x249,0x289,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x49,0x89, +0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,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,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2, -2,0,2,2,2,2,2,2,2,2,2,2,1,1,1,1, +1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,2,2,2,2,2,2,2,0,2,2, +2,2,2,2,2,2,2,2,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,2,2,2,2,2,2,2,2,2,2, +1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,1,0,1,1, +0,0,1,0,0,1,1,0,0,1,1,1,1,0,1,1, +1,1,1,1,1,1,2,2,2,2,0,2,0,2,2,2, +2,2,2,2,0,2,2,2,2,2,2,2,2,2,2,2, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +2,2,2,2,1,1,0,1,1,1,1,0,0,1,1,1, +1,1,1,1,1,0,1,1,1,1,1,1,1,0,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -1,0,1,1,0,0,1,0,0,1,1,0,0,1,1,1, -1,0,1,1,1,1,1,1,1,1,2,2,2,2,0,2, -0,2,2,2,2,2,2,2,0,2,2,2,2,2,2,2, -2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,2,2,2,2,1,1,0,1,1,1,1,0, -0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1, +2,2,2,2,2,2,2,2,1,1,0,1,1,1,1,0, +1,1,1,1,1,0,1,0,0,0,1,1,1,1,1,1, 1,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,2,1,1,0,1, -1,1,1,0,1,1,1,1,1,0,1,0,0,0,1,1, -1,1,1,1,1,0,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,2,2,2,2,2,2,0,0,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,0x18,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0x18, -2,2,2,2,2,2,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,0x18, +2,2,2,2,2,2,0,0,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,0x18,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,0x18,2,2,2,2, +2,2,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,0x18,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,0x18,2,2,2,2,2,2,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,0x18, -2,2,2,2,2,2,1,2,0,0,0x49,0x89,0xc9,0x109,0x149,0x189, -0x1c9,0x209,0x249,0x289,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0,6,6,6, -6,6,6,6,6,6,6,6,6,6,6,6,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6, -6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, -6,6,6,0x1b,0x1b,0x1b,0x1b,6,6,6,6,6,6,6,6,6, -6,6,6,6,6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,0x1b,0x1b,0x17,0x17,0x17,0x17,0x17, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6, -6,6,6,6,6,6,6,0,6,6,6,6,6,6,6,6, -6,6,6,6,6,6,6,6,6,0,0,6,6,6,6,6, -2,2,2,2,2,2,2,2,2,2,5,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0, -0,0,0,0,0,2,2,2,2,2,2,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -6,6,0,6,6,0,6,6,6,6,6,0,0,0,0,0, -4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,5,0x1b, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0, -6,6,6,6,6,6,6,4,4,4,4,4,4,4,0,0, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0x19, -5,5,5,5,5,5,5,5,5,5,5,4,6,6,6,6, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0, -5,5,5,5,5,5,5,0,5,5,5,5,0,5,5,0, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0, -5,5,5,5,5,0,0,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b, -6,6,6,6,6,6,6,0,0,0,0,0,0,0,0,0, -2,2,2,2,6,6,6,6,6,6,6,4,0,0,0,0, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0x17,0x17, -1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,0x18,2,2,2,2,2,2,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,2,2,2,0x18,2,2,2,2, +2,2,1,2,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289, +0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0,6,6,6,6,6,6,6, +6,6,6,6,6,6,6,6,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,6,6,6,6,6,6,6,6, +6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,0x1b, +0x1b,0x1b,0x1b,6,6,6,6,6,6,6,6,6,6,6,6,6, +6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,6,0x1b,0x1b,0x17,0x17,0x17,0x17,0x17,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6, +6,6,6,0,6,6,6,6,6,6,6,6,6,6,6,6, +6,6,6,6,6,0,0,6,6,6,6,6,2,2,2,2, +2,2,2,2,2,2,5,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0, +0,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,6,6,0,6, +6,0,6,6,6,6,6,0,0,0,0,0,4,4,4,4, +4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4, +4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,5,0x1b,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, +5,5,5,5,5,5,5,5,5,0,0,0,6,6,6,6, +6,6,6,4,4,4,4,4,4,4,0,0,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,6,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, +5,5,5,5,5,5,5,5,6,6,6,6,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0x19,5,5,5,5, +5,5,5,5,5,5,5,4,6,6,6,6,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,5,5,5,5, +5,5,5,0,5,5,5,5,0,5,5,0,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,0,5,5,5,5, +5,0,0,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,6,6,6,6, +6,6,6,0,0,0,0,0,0,0,0,0,2,2,2,2, +6,6,6,6,6,6,6,4,0,0,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0x17,0x17,1,1,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b, -0x78cb,0x794b,0x814b,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x1b,0x34cb,0x344b,0x3ccb, -0x19,0x58b,0x5cb,0x788b,0x78cb,0,0,0,0,0,0,0,0,0,0,0, -0x16cb,0x194b,0x1bcb,0x1e4b,0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b,0x784b,0x804b,0x884b,0x904b, -0x984b,0xa04b,0xa84b,0xb04b,0xb84b,0x788b,0x808b,0x888b,0x908b,0x988b,0xa08b,0xa88b,0xb08b,0xb88b,0x78cb,0x80cb, -0x984b,0xa04b,0xa84b,0xb04b,0xb84b,0x788b,0x808b,0x888b,0x908b,0x988b,0xa08b,0xa88b,0xb08b,0xb88b,0x1b,0x5cb, -0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0x900b,0xa00b,0x804b,0x788b,0x344b,0x354b,0,0, -0,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b, -0x16cb,0x194b,0x1bcb,0x1e4b,0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b,0x784b,0x804b,0x884b,0x904b, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0x18,0x18,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -5,5,5,5,0,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -0,5,5,0,5,0,0,5,0,5,5,5,5,5,5,5, -5,5,5,0,5,5,5,5,0,5,0,5,0,0,0,0, -0,0,5,0,0,0,0,5,0,5,0,5,0,5,5,5, -0,5,5,0,5,0,0,5,0,5,0,5,0,5,0,5, -0,5,5,0,5,0,0,5,5,5,5,0,5,5,5,5, -5,5,5,0,5,5,5,5,0,5,5,5,5,0,5,0, -5,5,5,5,5,5,5,5,5,5,0,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0, -0,5,5,5,0,5,5,5,5,5,0,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0, +2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0x58b,0x5cb,0x60b, +0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x78cb,0x794b,0x814b,0x58b, +0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x1b,0x34cb,0x344b,0x3ccb,0x19,0x58b,0x5cb,0x788b, +0x78cb,0,0,0,0,0,0,0,0,0,0,0,0x16cb,0x194b,0x1bcb,0x1e4b, +0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b,0x784b,0x804b,0x884b,0x904b,0x984b,0xa04b,0xa84b,0xb04b, +0xb84b,0x788b,0x808b,0x888b,0x908b,0x988b,0xa08b,0xa88b,0xb08b,0xb88b,0x78cb,0x80cb,0x984b,0xa04b,0xa84b,0xb04b, +0xb84b,0x788b,0x808b,0x888b,0x908b,0x988b,0xa08b,0xa88b,0xb08b,0xb88b,0x1b,0x5cb,0x60b,0x64b,0x68b,0x6cb, +0x70b,0x74b,0x78b,0x7cb,0x900b,0xa00b,0x804b,0x788b,0x344b,0x354b,0,0,0,0x58b,0x5cb,0x60b, +0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b, +0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b,0x784b,0x804b,0x884b,0x904b,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x18,0x18,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, +0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,0,5,5,0, +5,0,0,5,0,5,5,5,5,5,5,5,5,5,5,0, +5,5,5,5,0,5,0,5,0,0,0,0,0,0,5,0, +0,0,0,5,0,5,0,5,0,5,5,5,0,5,5,0, +5,0,0,5,0,5,0,5,0,5,0,5,0,5,5,0, +5,0,0,5,5,5,5,0,5,5,5,5,5,5,5,0, +5,5,5,5,0,5,5,5,5,0,5,0,5,5,5,5, +5,5,5,5,5,5,0,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,0,0,0,0,0,5,5,5, +0,5,5,5,5,5,0,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,0,0,0,0,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x2cb,0x2cb,0x30b,0x34b, +0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x54b,0x54b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0, +0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x2cb,0x2cb,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x54b,0x54b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0,0,0,0,0,0, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0x1b,0x1b,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,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,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1a,0x1a,0x1a,0x1a,0x1a, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1a,0x1a,0x1a,0x1a,0x1a,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0x1b,0,0,0, +0x1b,0x1b,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0,0,0,0,0x1b,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0x1b,0x1b,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0, -0x1b,0x1b,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0, -0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0, -0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0, -0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,5,0x705,5,5,5,5,5,5,5,5,5,5, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +5,0x705,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,0x645,5,5,5,5,5,5,5,5,5,5,5, +0x645,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x645,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,0x645,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,0x685,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,0x685,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0xcc5, +5,5,5,5,5,5,5,5,0xf45,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,0xf45,5,5,5,5,5,5,5, +5,5,5,5,5,5,0x6c5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,0x605,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,0xcc5,5,5,5,5,5,5,5,5,0xf45,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,0xf45,5,5,5, -5,5,5,5,5,5,5,5,5,5,0x6c5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,0x605,5,5, +5,5,5,5,5,0x605,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,0x605,5,5,5,5,5,5, +0x605,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x605, +5,5,5,5,5,5,5,5,5,5,5,5,5,0x645,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,0x605,5,5,5,5,5,5,5,5,5,5,5, +5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,0x605,5,5,5,5,5,5,5,5,5,5,5,5, -5,0x645,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,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,0,0, -0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,0x785,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, +5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +0x785,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0,0x10,0,0,0,0,0,0,0,0,0,0, +0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, +0,0x10,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,0,0,0,0,0, +6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,6,6,6,6,6,6,6,6,6,6,6,6, -6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11, 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11, -0x11,0x11,0,0,0,0,0,0 +0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0,0, +0,0,0,0 }; static const UTrie2 propsTrie={ @@ -1458,155 +1467,155 @@ static const UTrie2 propsTrie={ propsTrie_index+4692, nullptr, 4692, - 18324, + 18464, 0xa40, 0x12d4, 0x0, 0x0, 0x110000, - 0x59e4, + 0x5a70, nullptr, 0, false, false, 0, nullptr }; -static const uint16_t propsVectorsTrie_index[32692]={ -0x539,0x541,0x549,0x551,0x569,0x571,0x579,0x581,0x589,0x591,0x599,0x5a1,0x5a9,0x5b1,0x5b9,0x5c1, -0x5c8,0x5d0,0x5d8,0x5e0,0x5e3,0x5eb,0x5f3,0x5fb,0x603,0x60b,0x613,0x61b,0x623,0x62b,0x633,0x63b, -0x643,0x64b,0x652,0x65a,0x662,0x66a,0x672,0x67a,0x682,0x68a,0x68f,0x697,0x69e,0x6a6,0x6ae,0x6b6, -0x6be,0x6c6,0x6ce,0x6d6,0x6dd,0x6e5,0x6ed,0x6f5,0x6fd,0x705,0x70d,0x715,0x71d,0x725,0x72d,0x735, -0x1b39,0xd8a,0xe56,0x118d,0x12cc,0x1d01,0x1ea0,0x1cf9,0x13e6,0x13f6,0x13de,0x13ee,0x80a,0x810,0x818,0x820, -0x828,0x82e,0x836,0x83e,0x846,0x84c,0x854,0x85c,0x864,0x86a,0x872,0x87a,0x882,0x88a,0x892,0x899, -0x8a1,0x8a7,0x8af,0x8b7,0x8bf,0x8c5,0x8cd,0x8d5,0x8dd,0x13fe,0x8e5,0x8ed,0x8f5,0x8fc,0x904,0x90c, -0x914,0x918,0x920,0x927,0x92f,0x937,0x93f,0x947,0x1719,0x1721,0x94f,0x957,0x95f,0x967,0x96f,0x976, -0x177f,0x176f,0x1777,0x1a74,0x1a7c,0x140e,0x97e,0x1406,0x1662,0x1662,0x1664,0x1422,0x1423,0x1416,0x1418,0x141a, -0x1787,0x1789,0x986,0x1789,0x98e,0x993,0x99b,0x178e,0x9a1,0x1789,0x9a7,0x9af,0xc6a,0x1796,0x1796,0x9b7, -0x17a6,0x17a7,0x17a7,0x17a7,0x17a7,0x17a7,0x17a7,0x17a7,0x17a7,0x17a7,0x17a7,0x17a7,0x17a7,0x17a7,0x17a7,0x17a7, -0x17a7,0x17a7,0x17a7,0x179e,0x9bf,0x17af,0x17af,0x9c7,0xb92,0xb9a,0xba2,0xbaa,0x17bf,0x17b7,0x9cf,0x9d7, -0x9df,0x17c9,0x17d1,0x9e7,0x17c7,0x9ef,0x1b41,0xd92,0xbb2,0xbba,0xbc2,0xbc7,0x19da,0xc91,0xc98,0x1936, -0xc42,0x1b49,0xd9a,0xda2,0xdaa,0xdb2,0xf60,0xf64,0x1a3a,0x1a3f,0xcd0,0xcd8,0x1ab0,0x1ab8,0x1c19,0xe5e, -0x1ac0,0xd1e,0xd26,0x1ac8,0x1105,0x11b5,0xf38,0xdba,0x1956,0x193e,0x194e,0x1946,0x19f2,0x19ea,0x19a6,0x1a32, -0x142b,0x142b,0x142b,0x142b,0x142e,0x142b,0x142b,0x1436,0x9f7,0x143e,0x9fb,0xa03,0x143e,0xa0b,0xa13,0xa1b, -0x144e,0x1446,0x1456,0xa23,0xa2b,0x145e,0xa33,0xa3b,0x1466,0x146e,0x1476,0x147e,0xa43,0x1486,0x148d,0x1495, -0x149d,0x14a5,0x14ad,0x14b5,0x14bd,0x14c4,0x14cc,0x14d4,0x14dc,0x14e4,0x14e7,0x14e9,0x17d9,0x18cc,0x18d2,0x1a22, -0x14f1,0xa4b,0xa53,0x1617,0x161c,0x161f,0x1625,0x14f9,0x162d,0x162d,0x1509,0x1501,0x1511,0x1519,0x1521,0x1529, -0x1531,0x1539,0x1541,0x1549,0x18da,0x192e,0x1a84,0x1be1,0x1559,0x155f,0x1567,0x156f,0x1551,0x1577,0x18e2,0x18e9, -0x17e1,0x17e1,0x17e1,0x17e1,0x17e1,0x17e1,0x17e1,0x17e1,0x18f1,0x18f1,0x18f1,0x18f1,0x18f9,0x1900,0x1902,0x1909, -0x1911,0x1915,0x1915,0x1918,0x1915,0x1915,0x191e,0x1915,0x195e,0x1a2a,0x1a8c,0xbcf,0xbd5,0x1d45,0x1d4d,0x1e2b, -0x19ca,0x19be,0x19c2,0x1a47,0x19ae,0x19ae,0x19ae,0xc52,0x19b6,0xc72,0x1a0a,0xcc0,0xc5a,0xc62,0xc62,0x1ad0, -0x19fa,0x1a94,0xca8,0xcb0,0xa5b,0x17e9,0x17e9,0xa63,0x17f1,0x17f1,0x17f1,0x17f1,0x17f1,0x17f1,0xa6b,0x73d, -0x164a,0x166c,0xa73,0x1674,0xa7b,0x167c,0x1684,0x168c,0xa83,0xa88,0x1694,0x169b,0xa8d,0x17f9,0x1a1a,0xc4a, -0xa95,0x16f6,0x16fd,0x16a3,0x1705,0x1709,0x16ab,0x16af,0x16c8,0x16c8,0x16ca,0x16b7,0x16bf,0x16bf,0x16c0,0x1711, -0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801, -0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801, -0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801, -0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801, -0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801, -0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801, -0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801, -0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801, -0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801, -0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801, -0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801, -0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801, -0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1804,0x1966,0x1966, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d9,0x1b31,0x1f0c, -0x180c,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812, -0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812, -0x1812,0x1812,0x1812,0x1812,0xa9d,0x181a,0xaa5,0x1b51,0x1adc,0x1adc,0x1adc,0x1adc,0x1adc,0x1adc,0x1adc,0x1adc, -0x1ad8,0xd2e,0x1aec,0x1ae4,0x1aee,0x1b59,0x1b59,0xdc2,0x19d2,0x1a4f,0x1aa4,0x1aa8,0x1a9c,0x1c11,0xce0,0xce7, -0x1a02,0xcb8,0x1a57,0xcef,0x1af6,0x1af9,0xd36,0x1b61,0x1b09,0x1b01,0xd3e,0xdca,0x1b69,0x1b6d,0xdd2,0x100f, -0x1b11,0xd46,0xd4e,0x1b75,0x1b85,0x1b7d,0xdda,0xf08,0xe66,0xe6e,0x1d9b,0xfbf,0x1e48,0x1e48,0x1b8d,0xde2, -0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762, -0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764, -0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766, -0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761, -0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763, -0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765, -0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767, -0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762, -0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764, -0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766, -0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761, -0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763, -0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765, -0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767, -0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762, -0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764, -0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766, -0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761, -0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763, -0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765, -0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767, -0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0xaad,0xdea,0xded, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739, -0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739, -0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635, -0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635, -0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635, -0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635, -0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635, -0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635, -0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635, -0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635, -0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635, -0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635, -0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635, -0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635, -0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x16e1,0x16e1,0x16e1,0x16e1,0x16e1,0x16e1,0x16e1,0x16e1, -0x16e6,0x16ee,0x1926,0x13a3,0x1a12,0x1a12,0x13a7,0x13ae,0xab5,0xabd,0xac5,0x1597,0x159e,0x15a6,0xacd,0x15ae, -0x15ec,0x15ec,0x157f,0x1587,0x15b6,0x15e3,0x15e4,0x15f4,0x15be,0x15c3,0x15cb,0x15d3,0xad5,0x15db,0xadd,0x158f, -0xcc8,0x15fc,0xae5,0xaed,0x1604,0x160a,0x160f,0xaf5,0xb05,0x1652,0x165a,0x163d,0x1642,0xb0d,0xb15,0xafd, -0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729, -0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1731,0x1731,0x1731,0x1731, -0x1564,0x1564,0x15a4,0x15e4,0x1624,0x1664,0x16a4,0x16e4,0x1720,0x1760,0x178c,0x17cc,0x180c,0x184c,0x188c,0x18cc, -0x190c,0x1948,0x1988,0x19c8,0x1a08,0x1a3c,0x1a78,0x1ab8,0x1af8,0x1b38,0x1b74,0x1bb4,0x1bf4,0x1c34,0x1c74,0x1cb4, -0xe59,0xa80,0xac0,0xb00,0xb40,0xb6b,0xf99,0xa40,0xed9,0xa40,0xa40,0xa40,0xa40,0xbab,0x13e2,0x13e2, +static const uint16_t propsVectorsTrie_index[32784]={ +0x53e,0x546,0x54e,0x556,0x56e,0x576,0x57e,0x586,0x58e,0x596,0x59e,0x5a6,0x5ae,0x5b6,0x5be,0x5c6, +0x5cd,0x5d5,0x5dd,0x5e5,0x5ed,0x5f5,0x5fd,0x605,0x60d,0x615,0x61d,0x625,0x62d,0x635,0x63d,0x645, +0x64d,0x655,0x65c,0x664,0x66c,0x674,0x67c,0x684,0x68c,0x694,0x699,0x6a1,0x6a8,0x6b0,0x6b8,0x6c0, +0x6c8,0x6d0,0x6d8,0x6e0,0x6e7,0x6ef,0x6f7,0x6ff,0x707,0x70f,0x717,0x71f,0x727,0x72f,0x737,0x73f, +0x1b48,0xd94,0xe60,0x1197,0x12d6,0x1d10,0x1eaf,0x1d08,0x13f5,0x1405,0x13ed,0x13fd,0x814,0x81a,0x822,0x82a, +0x832,0x838,0x840,0x848,0x850,0x856,0x85e,0x866,0x86e,0x874,0x87c,0x884,0x88c,0x894,0x89c,0x8a3, +0x8ab,0x8b1,0x8b9,0x8c1,0x8c9,0x8cf,0x8d7,0x8df,0x8e7,0x140d,0x8ef,0x8f7,0x8ff,0x906,0x90e,0x916, +0x91e,0x922,0x92a,0x931,0x939,0x941,0x949,0x951,0x1727,0x172f,0x959,0x961,0x969,0x971,0x979,0x980, +0x178d,0x177d,0x1785,0x1a82,0x1a8a,0x141d,0x988,0x1415,0x1670,0x1670,0x1672,0x1431,0x1432,0x1425,0x1427,0x1429, +0x1795,0x1797,0x990,0x1797,0x998,0x99d,0x9a5,0x179c,0x9ab,0x1797,0x9b1,0x9b9,0xc74,0x17a4,0x17a4,0x9c1, +0x17b4,0x17b5,0x17b5,0x17b5,0x17b5,0x17b5,0x17b5,0x17b5,0x17b5,0x17b5,0x17b5,0x17b5,0x17b5,0x17b5,0x17b5,0x17b5, +0x17b5,0x17b5,0x17b5,0x17ac,0x9c9,0x17bd,0x17bd,0x9d1,0xb9c,0xba4,0xbac,0xbb4,0x17cd,0x17c5,0x9d9,0x9e1, +0x9e9,0x17d7,0x17df,0x9f1,0x17d5,0x9f9,0x1b50,0xd9c,0xbbc,0xbc4,0xbcc,0xbd1,0x19e8,0xc9b,0xca2,0x1944, +0xc4c,0x1b58,0xda4,0xdac,0xdb4,0xdbc,0xf6a,0xf6e,0x1a48,0x1a4d,0xcda,0xce2,0x1abe,0x1ac6,0x1c28,0xe68, +0x1ace,0xd28,0xd30,0x1ad6,0x110f,0x11bf,0xf42,0xdc4,0x1964,0x194c,0x195c,0x1954,0x1a00,0x19f8,0x19b4,0x1a40, +0x1442,0x1442,0x1442,0x1442,0x143a,0x1442,0x1442,0x1444,0xa01,0x144c,0xa05,0xa0d,0x144c,0xa15,0xa1d,0xa25, +0x145c,0x1454,0x1464,0xa2d,0xa35,0x146c,0xa3d,0xa45,0x1474,0x147c,0x1484,0x148c,0xa4d,0x1494,0x149b,0x14a3, +0x14ab,0x14b3,0x14bb,0x14c3,0x14cb,0x14d2,0x14da,0x14e2,0x14ea,0x14f2,0x14f5,0x14f7,0x17e7,0x18da,0x18e0,0x1a30, +0x14ff,0xa55,0xa5d,0x1625,0x162a,0x162d,0x1633,0x1507,0x163b,0x163b,0x1517,0x150f,0x151f,0x1527,0x152f,0x1537, +0x153f,0x1547,0x154f,0x1557,0x18e8,0x193c,0x1a92,0x1bf0,0x1567,0x156d,0x1575,0x157d,0x155f,0x1585,0x18f0,0x18f7, +0x17ef,0x17ef,0x17ef,0x17ef,0x17ef,0x17ef,0x17ef,0x17ef,0x18ff,0x18ff,0x18ff,0x18ff,0x1907,0x190e,0x1910,0x1917, +0x191f,0x1923,0x1923,0x1926,0x1923,0x1923,0x192c,0x1923,0x196c,0x1a38,0x1a9a,0xbd9,0xbdf,0x1d54,0x1d5c,0x1e3a, +0x19d8,0x19cc,0x19d0,0x1a55,0x19bc,0x19bc,0x19bc,0xc5c,0x19c4,0xc7c,0x1a18,0xcca,0xc64,0xc6c,0xc6c,0x1ade, +0x1a08,0x1aa2,0xcb2,0xcba,0xa65,0x17f7,0x17f7,0xa6d,0x17ff,0x17ff,0x17ff,0x17ff,0x17ff,0x17ff,0xa75,0x747, +0x1658,0x167a,0xa7d,0x1682,0xa85,0x168a,0x1692,0x169a,0xa8d,0xa92,0x16a2,0x16a9,0xa97,0x1807,0x1a28,0xc54, +0xa9f,0x1704,0x170b,0x16b1,0x1713,0x1717,0x16b9,0x16bd,0x16d6,0x16d6,0x16d8,0x16c5,0x16cd,0x16cd,0x16ce,0x171f, +0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f, +0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f, +0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f, +0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f, +0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f, +0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f, +0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f, +0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f, +0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f, +0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f, +0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f, +0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f, +0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x1812,0x1974,0x1974, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e7,0x1b40,0x1f1b, +0x181a,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820, +0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820, +0x1820,0x1820,0x1820,0x1820,0xaa7,0x1828,0xaaf,0x1b60,0x1aeb,0x1aeb,0x1aeb,0x1aeb,0x1aeb,0x1aeb,0x1aeb,0x1aeb, +0x1ae6,0xd38,0x1afb,0x1af3,0x1afd,0x1b68,0x1b68,0xdcc,0x19e0,0x1a5d,0x1ab2,0x1ab6,0x1aaa,0x1c20,0xcea,0xcf1, +0x1a10,0xcc2,0x1a65,0xcf9,0x1b05,0x1b08,0xd40,0x1b70,0x1b18,0x1b10,0xd48,0xdd4,0x1b78,0x1b7c,0xddc,0x1019, +0x1b20,0xd50,0xd58,0x1b84,0x1b94,0x1b8c,0xde4,0xf12,0xe70,0xe78,0x1daa,0xfc9,0x1e57,0x1e57,0x1b9c,0xdec, +0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770, +0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772, +0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774, +0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f, +0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771, +0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773, +0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775, +0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770, +0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772, +0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774, +0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f, +0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771, +0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773, +0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775, +0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770, +0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772, +0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774, +0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f, +0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771, +0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773, +0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775, +0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0xab7,0xdf4,0xdf7, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747, +0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747, +0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643, +0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643, +0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643, +0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643, +0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643, +0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643, +0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643, +0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643, +0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643, +0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643, +0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643, +0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643, +0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef, +0x16f4,0x16fc,0x1934,0x13a2,0x1a20,0x1a20,0x13a6,0x13ad,0xabf,0xac7,0xacf,0x15a5,0x15ac,0x15b4,0xad7,0x15bc, +0x15fa,0x15fa,0x158d,0x1595,0x15c4,0x15f1,0x15f2,0x1602,0x15cc,0x15d1,0x15d9,0x15e1,0xadf,0x15e9,0xae7,0x159d, +0xcd2,0x160a,0xaef,0xaf7,0x1612,0x1618,0x161d,0xaff,0xb0f,0x1660,0x1668,0x164b,0x1650,0xb17,0xb1f,0xb07, +0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737, +0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x173f,0x173f,0x173f,0x173f, +0x1578,0x1578,0x15b8,0x15f8,0x1638,0x1678,0x16b8,0x16f8,0x1734,0x1774,0x17b4,0x17f4,0x1834,0x1874,0x18b4,0x18f4, +0x1934,0x1970,0x19b0,0x19f0,0x1a30,0x1a64,0x1aa0,0x1ae0,0x1b20,0x1b60,0x1b9c,0x1bdc,0x1c1c,0x1c5c,0x1c9c,0x1cdc, +0xe59,0xa80,0xac0,0xb00,0xb40,0xb6b,0xf99,0xa40,0xed9,0xa40,0xa40,0xa40,0xa40,0xbab,0x13f5,0x13f5, 0xf19,0xfd9,0xa40,0xa40,0xa40,0xbeb,0xf59,0xc2b,0xa40,0xc51,0xc91,0xcd1,0xd11,0xd51,0xe99,0xdc9, -0x1322,0x1322,0x1322,0x1322,0x1322,0x1322,0x1322,0x1322,0x1322,0x1322,0x1322,0x1322,0x1322,0x1322,0x1322,0x1322, -0x1322,0x1322,0x1322,0x1322,0x1019,0x1362,0x1157,0x1197,0x13a2,0x11a2,0x1422,0x1422,0x1422,0x1059,0x1079,0x10b9, -0x1462,0x1462,0x11e2,0x14a2,0x10f9,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079, -0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1117, +0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335, +0x1335,0x1335,0x1335,0x1335,0x1019,0x1375,0x116a,0x11aa,0x13b5,0x11b5,0x1435,0x1435,0x1435,0x1059,0x108c,0x10cc, +0x1475,0x1475,0x11f5,0x14b5,0x110c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c, +0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x112a, 0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, 0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xd89, 0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, @@ -1629,2364 +1638,2386 @@ static const uint16_t propsVectorsTrie_index[32692]={ 0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xd89, 0xe09,0xe19,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, 0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xd89, -0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2, -0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x1222, -0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2, -0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x1262, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0xc27,0xc2a,0xdf5,0x1deb,0x1017,0x745,0x559,0x10b1,0xcf7,0xd76,0x559,0x559,0x1d11,0xf10,0xf18,0x1e33, -0xc7a,0xc81,0xc89,0x1b95,0x1dcb,0x559,0x1dab,0xfe7,0x1b9d,0xdfd,0xe05,0xe0d,0x103f,0x74d,0x559,0x559, -0x1ba5,0x1ba5,0x755,0x559,0x1e60,0x10c9,0x1e58,0x10d1,0x1f4c,0x11cb,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0xe15,0x1fa4,0x12c4,0x1346,0x1347,0x1f6c,0x11f3,0x11fa,0x1201,0x1303,0x1307,0x127b,0x1211, -0x1c21,0x1c23,0xe76,0xe7d,0x1bad,0x1bb5,0xe1d,0xf30,0x1d09,0xef8,0xf00,0xfdf,0x1d29,0x1d2d,0x1d35,0x105f, -0xfaf,0x1d8b,0x75d,0x559,0x10b9,0x10c1,0x1d93,0xfb7,0xf91,0xf97,0xf9f,0xfa7,0x559,0x559,0x559,0x559, -0x1ed0,0x1ec8,0x113b,0x1143,0x1e13,0x1e0b,0x1087,0x559,0x559,0x559,0x559,0x559,0x1dfb,0x1047,0x104f,0x1057, -0x1dc3,0x1dbb,0xff7,0x1133,0x1d3d,0xf40,0x765,0x559,0x1097,0x109f,0x76d,0x559,0x559,0x559,0x559,0x559, -0x1f44,0x11ad,0x775,0x559,0x559,0x1e23,0x1e1b,0x108f,0x1283,0x1289,0x1291,0x559,0x559,0x1219,0x121d,0x1225, -0x1f04,0x1efc,0x1195,0x1ef4,0x1eec,0x1185,0x1df3,0x1037,0x1357,0x135a,0x135a,0x559,0x559,0x559,0x559,0x559, -0x10e9,0x10ee,0x10f6,0x10fd,0x1125,0x112b,0x559,0x559,0x1169,0x116d,0x1175,0x11bd,0x11c3,0x77d,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x11db,0x136a,0x136f,0x1377,0x559,0x559,0x781,0x1f8c,0x126b, -0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f, -0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a64,0xcff,0xd06,0xd06,0xd06, -0x1a6c,0x1a6c,0x1a6c,0xd0e,0x1e50,0x1e50,0x1e50,0x1e50,0x1e50,0x1e50,0x789,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x78d,0x1fbc,0x1fbc,0x12d4,0x1c2b,0x1c2b,0x1c2b,0x1c2b,0x1c2b, -0x1c2b,0x1c2b,0x1c2b,0x1c2b,0x1c2b,0x1c2b,0x1c2b,0x1c2b,0x1c2b,0x1c2b,0x1c2b,0x1c2b,0xe85,0xfff,0x1007,0x1fc4, -0x130f,0x1317,0xf48,0x1de3,0x1ddb,0x1027,0x102f,0x795,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x1f64,0x1f5c,0x11eb, -0x559,0x559,0x559,0x1d21,0x1d21,0xf20,0x1d19,0xf28,0x559,0x559,0x111d,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x799,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x1d73,0x1d73,0x1d73,0xf6c,0xf71, -0x7a1,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x1fd4,0x1337,0x133e,0x1fcc,0x1fcc,0x1fcc,0x7a9, -0x559,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0xb2b,0x184f,0xb33,0x1850,0x1847,0x1858,0x185e,0x1866, -0xb3b,0x198e,0x198e,0x7b1,0x559,0x559,0x559,0x1362,0x11e3,0x197e,0x197e,0xc32,0xd16,0x559,0x559,0x559, -0x559,0x1897,0x189e,0xb43,0x18a1,0xb4b,0xb53,0xb5b,0x189b,0xb63,0xb6b,0xb73,0x18a0,0x18a8,0x1897,0x189e, -0x189a,0x18a1,0x18a9,0x1898,0x189f,0x189b,0xb7a,0x186e,0x1876,0x187d,0x1884,0x1871,0x1879,0x1880,0x1887,0xb82, -0x188f,0x1e78,0x1e78,0x1e78,0x1e78,0x1e78,0x1e78,0x1e78,0x1e78,0x1e78,0x1e78,0x1e78,0x1e78,0x1e78,0x1e78,0x1e78, -0x1e78,0x1e68,0x1e6b,0x1e68,0x1e72,0x10d9,0x7b9,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x12f0,0x12f8,0x12fb,0x12fb,0x12fb,0x12fb,0x12fb, -0x12fb,0x110d,0x1115,0x1fdc,0x134f,0x7c1,0x559,0x559,0x559,0x1f84,0x122d,0x7c9,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x7cd,0x131f,0x1f94,0x1273,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x7d5,0x137f,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x12dc,0x1db3,0x1db3,0x1db3,0x1db3,0x1db3,0x1db3,0xfef,0x559,0x1ec0,0x1eb8,0x10e1,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x7dd,0x1f54,0x11d3,0x559,0x559,0x1235,0x1236,0x7e5,0x559,0x559,0x559,0x559, -0x559,0xebd,0xec5,0xecd,0xed5,0xedd,0xee5,0xeec,0xef0,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x7e9,0x1067,0x1e03,0x106d,0x1e03,0x1075,0x107a,0x107f, -0x107f,0x1e88,0x1ea8,0x1eb0,0x1f1c,0x1e90,0x1f74,0x1e98,0x1f24,0x1f7c,0x1f7c,0x119d,0x11a5,0x124d,0x1253,0x125b, -0x1263,0x1f9c,0x1f9c,0x1f9c,0x1f9c,0x12a7,0x1f9c,0x12ad,0x12b1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1, -0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1, -0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f2,0xb8a,0x18b1,0x18b1,0x18b1,0x7fa,0x7fa,0x7fa, -0x7fa,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x802,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa, -0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa, -0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa, -0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa, -0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0xbdd,0xbe4,0xbec,0xbf4,0x196e,0x196e,0x196e, -0xbfc,0xc04,0xc07,0x199e,0x1996,0xc3a,0xd56,0xd5a,0xd5e,0x559,0x559,0x559,0x559,0xd66,0x1b19,0xd6e, -0xf58,0x1822,0xb1d,0xb23,0x101f,0xc0f,0x19e2,0xca0,0x559,0x1837,0x182a,0x182f,0x1976,0xc17,0xc1f,0x114b, -0x1151,0x1d7b,0xf79,0x1d6b,0xf50,0x1327,0x132f,0x559,0x559,0x1da3,0x1da3,0x1da3,0x1da3,0x1da3,0x1da3,0x1da3, -0x1da3,0x1da3,0xfc7,0xfcf,0xfd7,0x12e4,0x12e8,0x559,0x559,0x1b21,0xd7e,0x1b29,0x1b29,0xd82,0xe8d,0xe95, -0xe9d,0x1bf1,0x1bd9,0x1bf9,0x1c01,0x1be9,0xe25,0xe29,0xe30,0xe38,0xe3c,0xe44,0xe4c,0xe4e,0xe4e,0xe4e, -0xe4e,0x1c62,0x1c6a,0x1c62,0x1c70,0x1c78,0x1c43,0x1c80,0x1c88,0x1c62,0x1c90,0x1c98,0x1c9f,0x1ca7,0x1c4b,0x1c62, -0x1cac,0x1c53,0x1c5a,0x1cb4,0x1cba,0x1d5c,0x1d63,0x1d55,0x1cc1,0x1cc9,0x1cd1,0x1cd9,0x1dd3,0x1ce1,0x1ce9,0xea5, -0xead,0x1c33,0x1c33,0x1c33,0xeb5,0x1d83,0x1d83,0xf81,0xf89,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x1e3b,0x1e3b,0x1e3b,0x1e3b,0x1e3b,0x1e3b,0x1e3b, -0x1e3b,0x1e3b,0x1e3b,0x1e3b,0x1e3b,0x1e3b,0x1e3b,0x1e40,0x1e3b,0x1e3b,0x1e3b,0x10a7,0x10a9,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8, -0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8, -0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8, -0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8, -0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1159,0x1c3b,0x1f14,0x1f14,0x1f14,0x1f14,0x1f14,0x1f14, -0x1f14,0x1f34,0x1161,0x123e,0x1245,0x1f3c,0x1f3c,0x1f3c,0x1f3c,0x1f3c,0x1f3c,0x1f3c,0x1f3c,0x1f3c,0x1f3c,0x1f3c, -0x117d,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bbd, -0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bbf,0x1bbd,0x1bc7,0x1bbd,0x1bbd, -0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bca,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bd1,0x1209,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0, -0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0, -0x1ee4,0x1fb4,0x1fb4,0x1fb4,0x1fb4,0x1fb4,0x1fb4,0x1fb4,0x1fb4,0x1fb4,0x1fb4,0x1fb4,0x1fb4,0x1fb4,0x1fb4,0x1299, -0x129f,0x12b9,0x12bc,0x12bc,0x12bc,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9, -0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9, -0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9, -0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18bc, -0x1387,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c, -0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c, -0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x138f,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387, -0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387, -0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387, -0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387, -0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x18c4,0x18c4,0x18c4,0x18c4,0x18c4,0x18c4,0x18c4, -0x18c4,0x18c4,0x18c4,0x18c4,0x18c4,0x18c4,0x18c4,0x18c4,0x18c4,0x13b6,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387, -0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387, -0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387, -0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1393,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4, -0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4, -0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x139b,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387, -0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387, -0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387, -0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387, -0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1393,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09, -0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09, -0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09, -0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09, -0x13be,0x1cf1,0x1cf1,0x1cf1,0x1cf1,0x1cf1,0x1cf1,0x13c6,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80, -0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80, -0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80, -0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80, -0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x13ce,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c, -0x1f2c,0x1f2c,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac, -0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x13d6,0x1fe4,0x1fe4,0x1fe4, -0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4, -0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4, -0x1fe4,0x1fe4,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751, -0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751, -0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751, -0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751, -0x1751,0x1741,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759, -0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759, -0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759, -0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759, -0x1759,0x1749,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751, -0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751, -0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751, -0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751, -0x1751,0x1751,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759, -0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759, -0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759, -0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759, -0x1759,0x1759,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9, -0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9, -0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9, -0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9, -0x18b9,0x18b9,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09, -0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09, -0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09, -0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09, -0x1c09,0x1c09,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80, -0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80, -0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80, -0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80, -0x1e80,0x1e80,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8, -0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8, -0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8, -0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8, -0x1ed8,0x1ed8,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c, -0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c, -0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c, -0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c, -0x1f2c,0x1f2c,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac, -0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac, -0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac, -0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac, -0x1fac,0x1fac,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4, -0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4, -0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4, -0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4, -0x1fe4,0x1fe4,0x538,0x538,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e5,0x2ee,0x2e8, -0x2e8,0x2eb,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2, -0x2e2,0x2e2,0x2e2,0x2e2,0x7da,0x7d4,0x7b9,0x79e,0x7aa,0x7a7,0x79e,0x7b6,0x7a4,0x7b0,0x79e,0x7cb, -0x7c2,0x7b3,0x7d7,0x7ad,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x7bf,0x7bc, -0x7c5,0x7c5,0x7c5,0x7d4,0x79e,0x7e6,0x7e6,0x7e6,0x7e6,0x7e6,0x7e6,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0, -0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7a4, -0x7aa,0x7b0,0x7d1,0x798,0x7ce,0x7e3,0x7e3,0x7e3,0x7e3,0x7e3,0x7e3,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd, -0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7a4, -0x7c8,0x7a1,0x7c5,0x2e2,0,0,0,0,0,0,0,0,0,0,0,0, +0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5, +0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x1235, +0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5, +0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x1275, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0xc31,0xc34,0xdff,0x1dfa,0x1021,0x74f,0x55e,0x10bb,0xd01,0xd80,0x55e,0x55e,0x1d20,0xf1a,0xf22,0x1e42, +0xc84,0xc8b,0xc93,0x1ba4,0x1dda,0x55e,0x1dba,0xff1,0x1bac,0xe07,0xe0f,0xe17,0x1049,0x757,0x55e,0x55e, +0x1bb4,0x1bb4,0x75f,0x55e,0x1e6f,0x10d3,0x1e67,0x10db,0x1f5b,0x11d5,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0xe1f,0x1fb3,0x12ce,0x1350,0x1351,0x1f7b,0x11fd,0x1204,0x120b,0x130d,0x1311,0x1285,0x121b, +0x1c30,0x1c32,0xe80,0xe87,0x1bbc,0x1bc4,0xe27,0xf3a,0x1d18,0xf02,0xf0a,0xfe9,0x1d38,0x1d3c,0x1d44,0x1069, +0xfb9,0x1d9a,0x767,0x55e,0x10c3,0x10cb,0x1da2,0xfc1,0xf9b,0xfa1,0xfa9,0xfb1,0x55e,0x55e,0x55e,0x55e, +0x1edf,0x1ed7,0x1145,0x114d,0x1e22,0x1e1a,0x1091,0x55e,0x55e,0x55e,0x55e,0x55e,0x1e0a,0x1051,0x1059,0x1061, +0x1dd2,0x1dca,0x1001,0x113d,0x1d4c,0xf4a,0x76f,0x55e,0x10a1,0x10a9,0x777,0x55e,0x55e,0x55e,0x55e,0x55e, +0x1f53,0x11b7,0x77f,0x55e,0x55e,0x1e32,0x1e2a,0x1099,0x128d,0x1293,0x129b,0x55e,0x55e,0x1223,0x1227,0x122f, +0x1f13,0x1f0b,0x119f,0x1f03,0x1efb,0x118f,0x1e02,0x1041,0x1361,0x1364,0x1364,0x55e,0x55e,0x55e,0x55e,0x55e, +0x10f3,0x10f8,0x1100,0x1107,0x112f,0x1135,0x55e,0x55e,0x1173,0x1177,0x117f,0x11c7,0x11cd,0x787,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x11e5,0x1374,0x1379,0x1381,0x55e,0x55e,0x78b,0x1f9b,0x1275, +0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d, +0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a72,0xd09,0xd10,0xd10,0xd10, +0x1a7a,0x1a7a,0x1a7a,0xd18,0x1e5f,0x1e5f,0x1e5f,0x1e5f,0x1e5f,0x1e5f,0x793,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x797,0x1fcb,0x1fcb,0x12de,0x1c3a,0x1c3a,0x1c3a,0x1c3a,0x1c3a, +0x1c3a,0x1c3a,0x1c3a,0x1c3a,0x1c3a,0x1c3a,0x1c3a,0x1c3a,0x1c3a,0x1c3a,0x1c3a,0x1c3a,0xe8f,0x1009,0x1011,0x1fd3, +0x1319,0x1321,0xf52,0x1df2,0x1dea,0x1031,0x1039,0x79f,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x1f73,0x1f6b,0x11f5, +0x55e,0x55e,0x55e,0x1d30,0x1d30,0xf2a,0x1d28,0xf32,0x55e,0x55e,0x1127,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x7a3,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x1d82,0x1d82,0x1d82,0xf76,0xf7b, +0x7ab,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x1fe3,0x1341,0x1348,0x1fdb,0x1fdb,0x1fdb,0x7b3, +0x55e,0x184d,0x184d,0x184d,0x184d,0x184d,0x184d,0x184d,0xb35,0x185d,0xb3d,0x185e,0x1855,0x1866,0x186c,0x1874, +0xb45,0x199c,0x199c,0x7bb,0x55e,0x55e,0x55e,0x136c,0x11ed,0x198c,0x198c,0xc3c,0xd20,0x55e,0x55e,0x55e, +0x55e,0x18a5,0x18ac,0xb4d,0x18af,0xb55,0xb5d,0xb65,0x18a9,0xb6d,0xb75,0xb7d,0x18ae,0x18b6,0x18a5,0x18ac, +0x18a8,0x18af,0x18b7,0x18a6,0x18ad,0x18a9,0xb84,0x187c,0x1884,0x188b,0x1892,0x187f,0x1887,0x188e,0x1895,0xb8c, +0x189d,0x1e87,0x1e87,0x1e87,0x1e87,0x1e87,0x1e87,0x1e87,0x1e87,0x1e87,0x1e87,0x1e87,0x1e87,0x1e87,0x1e87,0x1e87, +0x1e87,0x1e77,0x1e7a,0x1e77,0x1e81,0x10e3,0x7c3,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x12fa,0x1302,0x1305,0x1305,0x1305,0x1305,0x1305, +0x1305,0x1117,0x111f,0x1feb,0x1359,0x7cb,0x55e,0x55e,0x55e,0x1f93,0x1237,0x7d3,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x7d7,0x1329,0x1fa3,0x127d,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x7df,0x1389,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x12e6,0x1dc2,0x1dc2,0x1dc2,0x1dc2,0x1dc2,0x1dc2,0xff9,0x55e,0x1ecf,0x1ec7,0x10eb,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x7e7,0x1f63,0x11dd,0x55e,0x55e,0x123f,0x1240,0x7ef,0x55e,0x55e,0x55e,0x55e, +0x55e,0xec7,0xecf,0xed7,0xedf,0xee7,0xeef,0xef6,0xefa,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x7f3,0x1071,0x1e12,0x1077,0x1e12,0x107f,0x1084,0x1089, +0x1089,0x1e97,0x1eb7,0x1ebf,0x1f2b,0x1e9f,0x1f83,0x1ea7,0x1f33,0x1f8b,0x1f8b,0x11a7,0x11af,0x1257,0x125d,0x1265, +0x126d,0x1fab,0x1fab,0x1fab,0x1fab,0x12b1,0x1fab,0x12b7,0x12bb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb, +0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb, +0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fc,0xb94,0x18bf,0x18bf,0x18bf,0x804,0x804,0x804, +0x804,0x1994,0x1994,0x1994,0x1994,0x1994,0x1994,0x1994,0x80c,0x804,0x804,0x804,0x804,0x804,0x804,0x804, +0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804, +0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804, +0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804, +0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0xbe7,0xbee,0xbf6,0xbfe,0x197c,0x197c,0x197c, +0xc06,0xc0e,0xc11,0x19ac,0x19a4,0xc44,0xd60,0xd64,0xd68,0x55e,0x55e,0x55e,0x55e,0xd70,0x1b28,0xd78, +0xf62,0x1830,0xb27,0xb2d,0x1029,0xc19,0x19f0,0xcaa,0x55e,0x1845,0x1838,0x183d,0x1984,0xc21,0xc29,0x1155, +0x115b,0x1d8a,0xf83,0x1d7a,0xf5a,0x1331,0x1339,0x55e,0x55e,0x1db2,0x1db2,0x1db2,0x1db2,0x1db2,0x1db2,0x1db2, +0x1db2,0x1db2,0xfd1,0xfd9,0xfe1,0x12ee,0x12f2,0x55e,0x55e,0x1b30,0xd88,0x1b38,0x1b38,0xd8c,0xe97,0xe9f, +0xea7,0x1c00,0x1be8,0x1c08,0x1c10,0x1bf8,0xe2f,0xe33,0xe3a,0xe42,0xe46,0xe4e,0xe56,0xe58,0xe58,0xe58, +0xe58,0x1c71,0x1c79,0x1c71,0x1c7f,0x1c87,0x1c52,0x1c8f,0x1c97,0x1c71,0x1c9f,0x1ca7,0x1cae,0x1cb6,0x1c5a,0x1c71, +0x1cbb,0x1c62,0x1c69,0x1cc3,0x1cc9,0x1d6b,0x1d72,0x1d64,0x1cd0,0x1cd8,0x1ce0,0x1ce8,0x1de2,0x1cf0,0x1cf8,0xeaf, +0xeb7,0x1c42,0x1c42,0x1c42,0xebf,0x1d92,0x1d92,0xf8b,0xf93,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a, +0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4f,0x1e4a,0x1e4a,0x1e4a,0x10b1,0x10b3,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7, +0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7, +0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7, +0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7, +0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1163,0x1c4a,0x1f23,0x1f23,0x1f23,0x1f23,0x1f23,0x1f23, +0x1f23,0x1f43,0x116b,0x1248,0x124f,0x1f4b,0x1f4b,0x1f4b,0x1f4b,0x1f4b,0x1f4b,0x1f4b,0x1f4b,0x1f4b,0x1f4b,0x1f4b, +0x1187,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1bcc, +0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1bce,0x1bcc,0x1bd6,0x1bcc,0x1bcc, +0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1bd9,0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1be0,0x1213,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef, +0x1eef,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef, +0x1ef3,0x1fc3,0x1fc3,0x1fc3,0x1fc3,0x1fc3,0x1fc3,0x1fc3,0x1fc3,0x1fc3,0x1fc3,0x1fc3,0x1fc3,0x1fc3,0x1fc3,0x12a3, +0x12a9,0x12c3,0x12c6,0x12c6,0x12c6,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7, +0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7, +0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7, +0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18ca, +0x1391,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b, +0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b, +0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x13d5,0x1ffb,0x1ffb,0x1ffb,0x1ffb,0x1ffb,0x1ffb,0x1ffb, +0x1ffb,0x1ffb,0x1ffb,0x1ffb,0x1ffb,0x1ffb,0x1ffb,0x1ffb,0x1ffb,0x1ffb,0x1ffb,0x13e5,0x1391,0x1391,0x1391,0x1391, +0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391, +0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391, +0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391, +0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x18d2,0x18d2,0x18d2,0x18d2, +0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x13b5,0x1391,0x1391,0x1391, +0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391, +0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391, +0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1392,0x1ff3,0x1ff3,0x1ff3,0x1ff3, +0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3, +0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x139a,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391, +0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391, +0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391, +0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391, +0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1392,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18, +0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18, +0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18, +0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18, +0x1c18,0x1c18,0x1c18,0x13bd,0x1d00,0x1d00,0x1d00,0x1d00,0x1d00,0x1d00,0x13c5,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f, +0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f, +0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f, +0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f, +0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x13cd,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b, +0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb, +0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x13dd, +0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3, +0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3, +0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f, +0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f, +0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f, +0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f, +0x175f,0x175f,0x175f,0x175f,0x174f,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, +0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, +0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, +0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, +0x1767,0x1767,0x1767,0x1767,0x1757,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f, +0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f, +0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f, +0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f, +0x175f,0x175f,0x175f,0x175f,0x175f,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, +0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, +0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, +0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, +0x1767,0x1767,0x1767,0x1767,0x1767,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7, +0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7, +0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7, +0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7, +0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18, +0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18, +0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18, +0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18, +0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f, +0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f, +0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f, +0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f, +0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7, +0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7, +0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7, +0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7, +0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b, +0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b, +0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b, +0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b, +0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb, +0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb, +0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb, +0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb, +0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3, +0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3, +0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3, +0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3, +0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x53d,0x53d,0x53d,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2, +0x2e2,0x2e5,0x2ee,0x2e8,0x2e8,0x2eb,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2, +0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x828,0x822,0x804,0x7ec,0x7f8,0x7f5,0x7ec,0x807, +0x7f2,0x7fe,0x7ec,0x819,0x80d,0x801,0x825,0x7fb,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9, +0x7e9,0x7e9,0x810,0x80a,0x813,0x813,0x813,0x822,0x7ec,0x834,0x834,0x834,0x834,0x834,0x834,0x82e, +0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e, +0x82e,0x82e,0x82e,0x7f2,0x7f8,0x7fe,0x81f,0x7e6,0x81c,0x831,0x831,0x831,0x831,0x831,0x831,0x82b, +0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b, +0x82b,0x82b,0x82b,0x7f2,0x816,0x7ef,0x813,0x2e2,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,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,0,0,0,0,0,0, -0,0,0,0,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x300,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1, +0,0,0,0,0,0,0,0,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x300,0x2f1,0x2f1, 0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1, -0x2f1,0x2f1,0x2f1,0x2f1,0x2f4,0x64b,0x7ef,0x7f2,0x651,0x7f2,0x7ec,0x645,0x63c,0x2fa,0x65a,0x2fd, -0x7f5,0x633,0x648,0x7e9,0x64e,0x657,0x639,0x639,0x63f,0x2f7,0x645,0x642,0x63c,0x639,0x65a,0x2fd, -0x636,0x636,0x636,0x64b,0x306,0x306,0x306,0x306,0x306,0x306,0x663,0x306,0x306,0x306,0x306,0x306, -0x306,0x306,0x306,0x306,0x663,0x306,0x306,0x306,0x306,0x306,0x306,0x654,0x663,0x306,0x306,0x306, -0x306,0x306,0x663,0x65d,0x660,0x660,0x303,0x303,0x303,0x303,0x65d,0x303,0x660,0x660,0x660,0x303, -0x660,0x660,0x303,0x303,0x65d,0x303,0x660,0x660,0x303,0x303,0x303,0x654,0x65d,0x660,0x660,0x303, -0x660,0x303,0x65d,0x303,0x312,0x669,0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309, -0x312,0x309,0x312,0x309,0x30f,0x666,0x312,0x669,0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x669, -0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309,0x66f,0x666,0x312,0x309,0x312,0x669, -0x312,0x309,0x312,0x309,0x312,0x666,0x672,0x66c,0x312,0x309,0x312,0x309,0x666,0x312,0x309,0x312, -0x309,0x312,0x309,0x672,0x66c,0x66f,0x666,0x312,0x669,0x312,0x309,0x312,0x669,0x675,0x66f,0x666, -0x312,0x669,0x312,0x309,0x312,0x309,0x66f,0x666,0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309, -0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309,0x66f,0x666,0x312,0x309,0x312,0x669, -0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x312,0x309,0x312, -0x309,0x312,0x309,0x30c,0x315,0x321,0x321,0x315,0x321,0x315,0x321,0x321,0x315,0x321,0x321,0x321, -0x315,0x315,0x321,0x321,0x321,0x321,0x315,0x321,0x321,0x315,0x321,0x321,0x321,0x315,0x315,0x315, -0x321,0x321,0x315,0x321,0x324,0x318,0x321,0x315,0x321,0x315,0x321,0x321,0x315,0x321,0x315,0x315, -0x321,0x315,0x321,0x324,0x318,0x321,0x321,0x321,0x315,0x321,0x315,0x321,0x321,0x315,0x315,0x31e, -0x321,0x315,0x315,0x315,0x31e,0x31e,0x31e,0x31e,0x327,0x327,0x31b,0x327,0x327,0x31b,0x327,0x327, -0x31b,0x324,0x678,0x324,0x678,0x324,0x678,0x324,0x678,0x324,0x678,0x324,0x678,0x324,0x678,0x324, -0x678,0x315,0x324,0x318,0x324,0x318,0x324,0x318,0x321,0x315,0x324,0x318,0x324,0x318,0x324,0x318, -0x324,0x318,0x324,0x318,0x318,0x327,0x327,0x31b,0x324,0x318,0x9cf,0x9cf,0x9d2,0x9cc,0x324,0x318, -0x324,0x318,0x324,0x318,0x324,0x318,0x324,0x318,0x324,0x318,0x324,0x318,0x324,0x318,0x324,0x318, -0x324,0x318,0x324,0x318,0x324,0x318,0x324,0x318,0x9d2,0x9cc,0x9d2,0x9cc,0x9cf,0x9c9,0x9d2,0x9cc, -0xb8b,0xc84,0x9cf,0x9c9,0x9cf,0x9c9,0x9d2,0x9cc,0x9d2,0x9cc,0x9d2,0x9cc,0x9d2,0x9cc,0x9d2,0x9cc, -0x9d2,0x9cc,0x9d2,0x9cc,0xc84,0xc84,0xc84,0xd7d,0xd7d,0xd7d,0xd80,0xd80,0xd7d,0xd80,0xd80,0xd7d, -0xd7d,0xd80,0xebe,0xec1,0xec1,0xec1,0xec1,0xebe,0xec1,0xebe,0xec1,0xebe,0xec1,0xebe,0xec1,0xebe, -0x32a,0x67b,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a, -0x32a,0x67b,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a, -0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a, -0x32d,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a, -0x32a,0x32a,0x32a,0x32a,0x32a,0x9d5,0x9d5,0x9d5,0x9d5,0x9d5,0xc87,0xc87,0x342,0x342,0x342,0x342, -0x342,0x342,0x342,0x342,0x342,0x339,0x339,0x339,0x339,0x339,0x339,0x339,0x336,0x336,0x333,0x333, -0x681,0x333,0x339,0x684,0x33c,0x684,0x684,0x684,0x33c,0x684,0x339,0x339,0x687,0x33f,0x333,0x333, -0x333,0x333,0x333,0x333,0x67e,0x67e,0x67e,0x67e,0x330,0x67e,0x333,0xb01,0x342,0x342,0x342,0x342, -0x342,0x333,0x333,0x333,0x333,0x333,0x9de,0x9de,0x9db,0x9d8,0x9db,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a, -0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0x68a,0x68a,0x68a,0x68a, -0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a, -0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a, -0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a, -0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68d,0x68d,0x92d,0x68d, -0x68d,0x930,0xb04,0xb04,0xb04,0xb04,0xb04,0xb04,0xb04,0xb04,0xb04,0xc3c,0xd47,0xd47,0xd47,0xd47, -0xd47,0xd47,0xd47,0xd47,0xe82,0xe82,0xe82,0xe82,0xe85,0xd4a,0xd4a,0xd4a,0x690,0x690,0xb07,0xc81, -0xc81,0xc81,0xc81,0xc81,0xc81,0xc81,0xc81,0xc81,0xc81,0xc81,0xc81,0xc81,0xf6c,0xf69,0xf6c,0xf69, -0x34e,0x357,0xf6c,0xf69,9,9,0x35d,0xec4,0xec4,0xec4,0x345,0x14af,9,9,9,9, -0x35a,0x348,0x36c,0x34b,0x36c,0x36c,0x36c,9,0x36c,9,0x36c,0x36c,0x363,0x696,0x696,0x696, -0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,9,0x696, -0x696,0x696,0x696,0x696,0x696,0x696,0x36c,0x36c,0x363,0x363,0x363,0x363,0x363,0x693,0x693,0x693, -0x693,0x693,0x693,0x693,0x693,0x693,0x693,0x693,0x693,0x693,0x693,0x693,0x693,0x693,0x360,0x693, -0x693,0x693,0x693,0x693,0x693,0x693,0x363,0x363,0x363,0x363,0x363,0xf6c,0x36f,0x36f,0x372,0x36c, -0x36c,0x36f,0x366,0x9e1,0xb94,0xb91,0x369,0x9e1,0x369,0x9e1,0x369,0x9e1,0x369,0x9e1,0x354,0x351, -0x354,0x351,0x354,0x351,0x354,0x351,0x354,0x351,0x354,0x351,0x354,0x351,0x36f,0x36f,0x366,0x360, -0xb43,0xb40,0xb8e,0xc90,0xc8d,0xc93,0xc90,0xc8d,0xd83,0xd86,0xd86,0xd86,0x9f0,0x6a2,0x37e,0x381, -0x37e,0x37e,0x37e,0x381,0x37e,0x37e,0x37e,0x37e,0x381,0x9f0,0x381,0x37e,0x69f,0x69f,0x69f,0x69f, -0x69f,0x69f,0x69f,0x69f,0x69f,0x6a2,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f, -0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x699,0x699,0x699,0x699, -0x699,0x699,0x699,0x699,0x699,0x69c,0x699,0x699,0x699,0x699,0x699,0x699,0x699,0x699,0x699,0x699, -0x699,0x699,0x699,0x699,0x699,0x699,0x699,0x699,0x9ea,0x69c,0x378,0x37b,0x378,0x378,0x378,0x37b, -0x378,0x378,0x378,0x378,0x37b,0x9ea,0x37b,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378, -0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x381,0x37b, -0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x375,0x939,0x93c,0x91e,0x91e,0x1116, -0x9e4,0x9e4,0xb9a,0xb97,0x9ed,0x9e7,0x9ed,0x9e7,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378, -0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378, -0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378, -0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x381,0x37b,0x37e,0x378,0xb9a,0xb97,0x37e, -0x378,0xb9a,0xb97,0x37e,0x378,0xb9a,0xb97,0xec7,0x381,0x37b,0x381,0x37b,0x37e,0x378,0x381,0x37b, -0x37e,0x378,0x381,0x37b,0x381,0x37b,0x381,0x37b,0x37e,0x378,0x381,0x37b,0x381,0x37b,0x381,0x37b, -0x37e,0x378,0x381,0x37b,0x9f0,0x9ea,0x381,0x37b,0x381,0x37b,0x381,0x37b,0x381,0x37b,0xd8c,0xd89, -0x381,0x37b,0xeca,0xec7,0xeca,0xec7,0xeca,0xec7,0xc00,0xbfd,0xc00,0xbfd,0xc00,0xbfd,0xc00,0xbfd, -0xc00,0xbfd,0xc00,0xbfd,0xc00,0xbfd,0xc00,0xbfd,0xef7,0xef4,0xef7,0xef4,0xfe7,0xfe4,0xfe7,0xfe4, -0xfe7,0xfe4,0xfe7,0xfe4,0xfe7,0xfe4,0xfe7,0xfe4,0xfe7,0xfe4,0xfe7,0xfe4,0x114f,0x114c,0x1329,0x1326, -0x14e5,0x14e2,0x14e5,0x14e2,0x14e5,0x14e2,0x14e5,0x14e2,0xc,0x393,0x393,0x393,0x393,0x393,0x393,0x393, -0x393,0x393,0x393,0x393,0x393,0x393,0x393,0x393,0x393,0x393,0x393,0x393,0x393,0x393,0x393,0x393, -0x393,0x393,0x393,0xc,0xc,0x396,0x384,0x384,0x384,0x38a,0x384,0x387,0x18ea,0x38d,0x38d,0x38d, -0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d, -0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x390, -0x18ea,0x399,0x9f3,0xc,0xc,0x14b2,0x14b2,0x13ce,0xf,0x960,0x960,0x960,0x960,0x960,0x960,0x960, -0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0xd8f,0x960,0x960,0x960,0x960,0x960, -0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x39c,0x39c,0x39c,0x39c,0x39c,0x39c,0x39c,0x39c, -0x39c,0x39c,0xecd,0x39c,0x39c,0x39c,0x3a8,0x39c,0x39f,0x39c,0x39c,0x3ab,0x963,0xd92,0xd95,0xd92, -0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae, -0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae, -0x3ae,0x3ae,0x3ae,0xf,0xf,0xf,0xf,0x18ed,0x3ae,0x3ae,0x3ae,0x3a5,0x3a2,0xf,0xf,0xf, -0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xca8,0xca8,0xca8,0xca8,0x13d1,0x14b5,0xf75,0xf75, -0xf75,0xf72,0xf72,0xd9b,0x8a6,0xca2,0xc9f,0xc9f,0xc96,0xc96,0xc96,0xc96,0xc96,0xc96,0xf6f,0xf6f, -0xf6f,0xf6f,0xf6f,0x8a3,0x14ac,0x1afd,0xd9e,0x8a9,0x12f0,0x3c9,0x3cc,0x3cc,0x3cc,0x3cc,0x3cc,0x3c9, -0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9, -0x3c9,0x3c9,0x3c9,0xf78,0xf78,0xf78,0xf78,0xf78,0x8ac,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9, -0x3c9,0x3c9,0x3c9,0x924,0x924,0x924,0x924,0x924,0x924,0x924,0x924,0xb3a,0xb3a,0xb3a,0xc96,0xc9c, -0xc99,0xd98,0xd98,0xd98,0xd98,0xd98,0xd98,0x12ed,0x93f,0x93f,0x93f,0x93f,0x93f,0x93f,0x93f,0x93f, -0x93f,0x93f,0x3c3,0x3c0,0x3bd,0x3ba,0xb9d,0xb9d,0x921,0x3c9,0x3c9,0x3d5,0x3c9,0x3cf,0x3cf,0x3cf, -0x3cf,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9, -0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9, -0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9, -0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x9f9,0x9f9,0x3c9,0x3c9, -0x3c9,0x3c9,0x3c9,0x9f9,0x3cc,0x3c9,0x3cc,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9, -0x3c9,0x3c9,0x3c9,0x9f9,0x3c9,0x3c9,0x3c9,0x3cc,0x942,0x3c9,0x3b4,0x3b4,0x3b4,0x3b4,0x3b4,0x3b4, -0x3b4,0x3b1,0x3ba,0x3b7,0x3b7,0x3b4,0x3b4,0x3b4,0x3b4,0x3d2,0x3d2,0x3b4,0x3b4,0x3ba,0x3b7,0x3b7, -0x3b7,0x3b4,0xca5,0xca5,0x3c6,0x3c6,0x3c6,0x3c6,0x3c6,0x3c6,0x3c6,0x3c6,0x3c6,0x3c6,0x9f9,0x9f9, -0x9f9,0x9f6,0x9f6,0xca5,0xa0e,0xa0e,0xa0e,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa05, -0xa08,0xa05,0x12,0xa11,0xa0b,0x9fc,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b, -0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b, -0xa0b,0xcab,0xcab,0xcab,0xa02,0xa02,0xa02,0xa02,0xa02,0xa02,0xa02,0xa02,0xa02,0xa02,0xa02,0xa02, -0xa02,0xa02,0xa02,0xa02,0x9ff,0x9ff,0x9ff,0x9ff,0x9ff,0x9ff,0x9ff,0x9ff,0x9ff,0x9ff,0x9ff,0x12, -0x12,0xcab,0xcab,0xcab,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb, -0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb, -0xdfb,0xdfb,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9, -0xff9,0xff9,0xff9,0xff9,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17, -0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17, -0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14, -0xa14,0xa14,0xa14,0xa14,0xa14,0xba0,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15, -0x15,0x15,0x15,0x15,0xf0f,0xf0f,0xf0f,0xf0f,0xf0f,0xf0f,0xf0f,0xf0f,0xf0f,0xf0f,0xf12,0xf12, -0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12, -0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf06, -0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf15,0xf15,0xf09,0xf09,0xf0c,0xf1b,0xf18,0x102, -0x102,0x1911,0x1914,0x1914,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0xb13,0xb13,0xb16,0xb16,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13, -0x6f,0x6f,0x6f,0x6f,0x1e0,0x1e0,0x1e0,0x1e0,0x1e0,0x1e0,0x1e0,0x1617,0x1617,0x1617,0x1617,0x1617, -0x1617,0x1617,0x1617,0x1617,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1650,0x1650,0x1650, -0x1650,0x1650,0x1650,0x1650,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x16b,0x16b,0x16b, -0x16b,0x16b,0x16b,0x16b,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x1bdb,0x1bd8,0x1c2,0x1c2,0x1c2,0x1c2,0x1c2,0x1c2,0x1c2,0x1c2,0x1c2,0x1c2, -0x1c2,0x1c2,0x1c2,0x1c2,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x1488,0x1488,0x1488,0x1488,0x1488,0x1488,0x1488,0x1488,0x1488,0x1488,0x1a7,0x1a7, -0x1a7,0x1a7,0x1a7,0x1a7,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x201,0x201,0x201,0x201,0x201, -0x201,0x201,0x201,0x201,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x249,0x249,0x249,0x249,0x249,0x249,0x249,0x249,0x249,0x249,0x249,0x249, -0x249,0x249,0x249,0x249,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x195f,0x195f,0x195f,0x195f,0x195f,0x195f,0x195f,0x195f,0x195f,0x195f,0x24f,0x24f, -0x24f,0x24f,0x24f,0x24f,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x1ac1,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b, -0x28b,0x28b,0x28b,0x28b,0x1752,0x1752,0x1752,0x1752,0x207,0x207,0x207,0x207,0x207,0x207,0x207,0x207, -0x207,0x207,0x207,0x207,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c, -0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e, -0x163e,0x163e,0x163e,0x163e,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x2a0,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3, -0x2a0,0x1bc3,0x1bc3,0x2a0,0x16b6,0x16b6,0x16b6,0x16b6,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef, -0x1ef,0x1ef,0x1ef,0x1ef,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5, -0x2b5,0x2b5,0x2b5,0x2b5,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0xdf2,0xdf2,0xdef,0xdef,0xdef,0xdf2,0xd5,0xd5,0xd5,0xd5,0xd5,0xd5, -0xd5,0xd5,0xd5,0xd5,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x213,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a, -0x176a,0x176a,0x176a,0x176a,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb, -0x2bb,0x2bb,0x2bb,0x1bf6,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x1a13,0x1a13,0x1a13,0x1a13,0x1a13,0x1a13,0x1a13,0x1a13,0x1a13,0x1a13,0x270,0x270, -0x270,0x270,0x1a16,0x1a10,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x1b93,0x1b93,0x1b93,0x1b93,0x1b93,0x1b93,0x1b93,0x1b93,0x1b93,0x1b93,0x1b93,0x1b93, -0x1b93,0x1b93,0x1b93,0x1b93,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x1c26,0x1c26,0x1c26,0x1c26,0x1c26,0x1c26,0x1c26,0x1c26,0x1c26,0x1c26,0x1c26,0x1c26, -0x1c26,0x1c26,0x1c26,0x1c26,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x255,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974, -0x1974,0x1974,0x1974,0x1974,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273, -0x273,0x273,0x273,0x273,0,0,0,0,0,0,0,0,0,0,0,0, +0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f4,0x690,0x83d,0x840,0x696,0x840,0x83a,0x68a, +0x681,0x2fa,0x69f,0x2fd,0x843,0x678,0x68d,0x837,0x693,0x69c,0x67e,0x67e,0x684,0x2f7,0x68a,0x687, +0x681,0x67e,0x69f,0x2fd,0x67b,0x67b,0x67b,0x690,0x306,0x306,0x306,0x306,0x306,0x306,0x6a8,0x306, +0x306,0x306,0x306,0x306,0x306,0x306,0x306,0x306,0x6a8,0x306,0x306,0x306,0x306,0x306,0x306,0x699, +0x6a8,0x306,0x306,0x306,0x306,0x306,0x6a8,0x6a2,0x6a5,0x6a5,0x303,0x303,0x303,0x303,0x6a2,0x303, +0x6a5,0x6a5,0x6a5,0x303,0x6a5,0x6a5,0x303,0x303,0x6a2,0x303,0x6a5,0x6a5,0x303,0x303,0x303,0x699, +0x6a2,0x6a5,0x6a5,0x303,0x6a5,0x303,0x6a2,0x303,0x312,0x6b4,0x312,0x30c,0x312,0x30c,0x312,0x30c, +0x312,0x30c,0x312,0x30c,0x312,0x30c,0x312,0x30c,0x30f,0x6b1,0x312,0x6b4,0x312,0x30c,0x312,0x30c, +0x312,0x30c,0x312,0x6b4,0x312,0x30c,0x312,0x30c,0x312,0x30c,0x312,0x30c,0x312,0x30c,0x6b7,0x6b1, +0x312,0x30c,0x312,0x6b4,0x312,0x30c,0x312,0x30c,0x312,0x6b1,0x6ae,0x6ab,0x312,0x30c,0x312,0x30c, +0x6b1,0x312,0x30c,0x312,0x30c,0x312,0x30c,0x6ae,0x6ab,0x6b7,0x6b1,0x312,0x6b4,0x312,0x30c,0x312, +0x6b4,0x6ba,0x6b7,0x6b1,0x312,0x6b4,0x312,0x30c,0x312,0x30c,0x6b7,0x6b1,0x312,0x30c,0x312,0x30c, +0x312,0x30c,0x312,0x30c,0x312,0x30c,0x312,0x30c,0x312,0x30c,0x312,0x30c,0x312,0x30c,0x6b7,0x6b1, +0x312,0x30c,0x312,0x6b4,0x312,0x30c,0x312,0x30c,0x312,0x30c,0x312,0x30c,0x312,0x30c,0x312,0x30c, +0x312,0x312,0x30c,0x312,0x30c,0x312,0x30c,0x309,0x318,0x327,0x327,0x324,0x327,0x324,0x327,0x327, +0x324,0x327,0x327,0x327,0x324,0x31e,0x327,0x333,0x327,0x327,0x324,0x327,0x327,0x324,0x327,0x327, +0x327,0x324,0x324,0x324,0x327,0x327,0x324,0x327,0x336,0x330,0x327,0x324,0x327,0x324,0x327,0x327, +0x324,0x327,0x31e,0x31e,0x327,0x324,0x327,0x336,0x330,0x327,0x327,0x327,0x324,0x327,0x324,0x327, +0x327,0x315,0x31e,0x321,0x327,0x324,0x31e,0x315,0x31b,0x31b,0x31b,0x31b,0x32d,0x32d,0x32a,0x32d, +0x32d,0x32a,0x32d,0x32d,0x32a,0x336,0x6bd,0x336,0x6bd,0x336,0x6bd,0x336,0x6bd,0x336,0x6bd,0x336, +0x6bd,0x336,0x6bd,0x336,0x6bd,0x324,0x336,0x330,0x336,0x330,0x336,0x330,0x327,0x324,0x336,0x330, +0x336,0x330,0x336,0x330,0x336,0x330,0x336,0x330,0x330,0x32d,0x32d,0x32a,0x336,0x330,0xa29,0xa29, +0xa35,0xa32,0x336,0x330,0x336,0x330,0x336,0x330,0x336,0x330,0x336,0x330,0x336,0x330,0x336,0x330, +0x336,0x330,0x336,0x330,0x336,0x330,0x336,0x330,0x336,0x330,0x336,0x330,0xa35,0xa32,0xa35,0xa32, +0xa29,0xa26,0xa35,0xa32,0xc0c,0xd08,0xa2f,0xa2c,0xa2f,0xa2c,0xa35,0xa32,0xa35,0xa32,0xa35,0xa32, +0xa35,0xa32,0xa35,0xa32,0xa35,0xa32,0xa35,0xa32,0xd05,0xd05,0xd05,0xe01,0xe01,0xe01,0xe04,0xe04, +0xe01,0xe04,0xe04,0xe01,0xe01,0xe04,0xf4e,0xf51,0xf51,0xf51,0xf51,0xf4e,0xf51,0xf4e,0xf51,0xf4e, +0xf51,0xf4e,0xf51,0xf4e,0x339,0x6c0,0x339,0x342,0x342,0x339,0x342,0x342,0x339,0x345,0x339,0x342, +0x339,0x339,0x339,0x339,0x339,0x6c0,0x339,0x342,0x339,0x339,0x339,0x339,0x342,0x342,0x339,0x339, +0x339,0x339,0x339,0x339,0x339,0x339,0x342,0x339,0x339,0x339,0x339,0x33f,0x339,0x339,0x339,0x339, +0x33f,0x339,0x339,0x339,0x339,0x339,0x339,0x339,0x339,0x339,0x339,0x339,0x339,0x342,0x339,0x339, +0x339,0x339,0x339,0x339,0x339,0x339,0x342,0x339,0x33c,0x339,0x339,0x339,0x339,0x339,0x339,0x339, +0x339,0x339,0x33f,0x339,0x339,0x339,0x339,0x339,0x339,0x339,0x339,0x339,0x339,0xa38,0xa38,0xa38, +0xa38,0xa38,0xd0b,0xd0b,0x35d,0x35d,0x35d,0x35d,0x35d,0x35d,0x35d,0x35d,0x35d,0x351,0x351,0x357, +0x357,0x351,0x351,0x351,0x34e,0x34e,0x348,0x348,0x6c3,0x348,0x351,0x6c9,0x354,0x6c9,0x6c9,0x6c9, +0x354,0x6c9,0x351,0x351,0x6cc,0x35a,0x348,0x348,0x348,0x348,0x348,0x348,0x6c6,0x6c6,0x6c6,0x6c6, +0x34b,0x6c6,0x348,0xb82,0x35d,0x35d,0x35d,0x35d,0x35d,0x348,0x348,0x348,0x348,0x348,0xa44,0xa44, +0xa41,0xa3b,0xa3e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e, +0xd0e,0xd0e,0xd0e,0xd0e,0x6db,0x6db,0x6db,0x6db,0x6db,0x6d5,0x6db,0x6db,0x6db,0x6db,0x6db,0x6db, +0x6db,0x6d5,0x6cf,0x6db,0x6db,0x6db,0x6cf,0x6db,0x6db,0x6cf,0x6d5,0x6cf,0x6cf,0x6cf,0x6cf,0x6db, +0x6cf,0x6cf,0x6cf,0x6cf,0x6cf,0x6d5,0x6d5,0x6db,0x6db,0x6db,0x6db,0x6db,0x6db,0x6cf,0x6cf,0x6cf, +0x6cf,0x6db,0x6db,0x6cf,0x6db,0x6db,0x6d5,0x6cf,0x6d5,0x6db,0x6d5,0x6cf,0x6db,0x6db,0x6cf,0x6cf, +0x6cf,0x6cf,0x6cf,0x6cf,0x6d8,0x6d8,0x981,0x6d8,0x6d8,0x984,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85, +0xb85,0xb85,0xb85,0xcbd,0xdcb,0xdcb,0xdcb,0xdcb,0xdcb,0xdcb,0xdcb,0xdcb,0xf15,0xf0f,0xf0f,0xf0f, +0xf12,0xdce,0xdce,0xdce,0x6d2,0x6d2,0xb88,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02, +0xd02,0xd02,0xd02,0xd02,0x100e,0x100b,0x100e,0x100b,0x369,0x375,0x100e,0x100b,9,9,0x378,0xf54, +0xf54,0xf54,0x360,0x158a,9,9,9,9,0x372,0x363,0x38d,0x366,0x38d,0x38d,0x38d,9, +0x38d,9,0x38d,0x38d,0x38a,0x6e1,0x6e1,0x6e1,0x6e1,0x6e1,0x6e1,0x6e1,0x6e1,0x6e1,0x6e1,0x6e1, +0x6e1,0x6e1,0x6e1,0x6e1,0x6e1,0x6e1,9,0x6e1,0x6e1,0x6e1,0x6e1,0x6e1,0x6e1,0x6e1,0x38d,0x38d, +0x38a,0x38a,0x38a,0x38a,0x38a,0x6de,0x6de,0x6de,0x6de,0x6de,0x6de,0x6de,0x6de,0x6de,0x6de,0x6de, +0x6de,0x6de,0x6de,0x6de,0x6de,0x6de,0x387,0x6de,0x6de,0x6de,0x6de,0x6de,0x6de,0x6de,0x38a,0x38a, +0x38a,0x38a,0x38a,0x1011,0x390,0x390,0x393,0x384,0x384,0x390,0x381,0xa4a,0xc15,0xc12,0x37b,0xa47, +0x37b,0xa47,0x37b,0xa47,0x37b,0xa47,0x36f,0x36c,0x36f,0x36c,0x36f,0x36c,0x36f,0x36c,0x36f,0x36c, +0x36f,0x36c,0x36f,0x36c,0x390,0x390,0x381,0x37e,0xbc4,0xbc1,0xc0f,0xd14,0xd11,0xd17,0xd14,0xd11, +0xe07,0xe0a,0xe0a,0xe0a,0xa59,0x6ed,0x3ab,0x3ae,0x3ab,0x3ab,0x3ab,0x3ae,0x3ab,0x3ab,0x3ab,0x3ab, +0x3ae,0xa59,0x3ae,0x3ab,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ed,0x6ea,0x6ea, +0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea, +0x6ea,0x6ea,0x6ea,0x6ea,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e7,0x6e4,0x6e4, +0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4, +0xa53,0x6e7,0x3a5,0x3a8,0x3a5,0x3a5,0x3a5,0x3a8,0x3a5,0x3a5,0x3a5,0x3a5,0x3a8,0xa53,0x3a8,0x3a5, +0x39f,0x399,0x39f,0x399,0x39f,0x399,0x39f,0x399,0x39f,0x399,0x39f,0x399,0x39f,0x399,0x39f,0x399, +0x39f,0x399,0x39f,0x399,0x39f,0x399,0x3a2,0x39c,0x39f,0x399,0x39f,0x399,0x39f,0x399,0x39f,0x399, +0x39f,0x399,0x396,0x98d,0x990,0x972,0x972,0x11e2,0xa4d,0xa4d,0xc1b,0xc18,0xa56,0xa50,0xa56,0xa50, +0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5, +0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5, +0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5, +0x3ab,0x3ae,0x3a8,0x3ab,0x3a5,0xc1b,0xc18,0x3ab,0x3a5,0xc1b,0xc18,0x3ab,0x3a5,0xc1b,0xc18,0xf57, +0x3ae,0x3a8,0x3ae,0x3a8,0x3ab,0x3a5,0x3ae,0x3a8,0x3ab,0x3a5,0x3ae,0x3a8,0x3ae,0x3a8,0x3ae,0x3a8, +0x3ab,0x3a5,0x3ae,0x3a8,0x3ae,0x3a8,0x3ae,0x3a8,0x3ab,0x3a5,0x3ae,0x3a8,0xa59,0xa53,0x3ae,0x3a8, +0x3ae,0x3a8,0x3ae,0x3a8,0x3ae,0x3a8,0xe10,0xe0d,0x3ae,0x3a8,0xf5a,0xf57,0xf5a,0xf57,0xf5a,0xf57, +0xc81,0xc7e,0xc81,0xc7e,0xc81,0xc7e,0xc81,0xc7e,0xc81,0xc7e,0xc81,0xc7e,0xc81,0xc7e,0xc81,0xc7e, +0xf87,0xf84,0xf87,0xf84,0x1092,0x108f,0x1092,0x108f,0x1092,0x108f,0x1092,0x108f,0x1092,0x108f,0x1092,0x108f, +0x1092,0x108f,0x1092,0x108f,0x121b,0x1218,0x13f8,0x13f5,0x15c6,0x15c3,0x15c0,0x15bd,0x15c0,0x15bd,0x15c6,0x15c3, +0xc,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0, +0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0xc,0xc,0x3c3,0x3b1,0x3b1, +0x3b1,0x3b7,0x3b1,0x3b4,0x19d7,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd, +0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd, +0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3ba,0x19d7,0x3c6,0xa5c,0xc,0xc,0x158d,0x158d,0x14a6, +0xf,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4, +0x9b4,0x9b4,0xe13,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4, +0x3c9,0x3c9,0x3c9,0x3c9,0x3cc,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0xf5d,0x3c9,0x3c9,0x3c9,0x3d8,0x3c9, +0x3cf,0x3c9,0x3c9,0x3db,0x9b7,0xe16,0xe1c,0xe19,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf, +0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de, +0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0xf,0xf,0xf,0xf,0x19da, +0x3de,0x3de,0x3de,0x3d5,0x3d2,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf, +0xd2c,0xd2c,0xd2c,0xd2c,0x14a9,0x1590,0x101a,0x101a,0x101a,0x1017,0x1017,0xe22,0x8f7,0xd26,0xd23,0xd23, +0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0x1014,0x1014,0x1014,0x1014,0x1014,0x8f4,0x1587,0x1bfc,0xe25,0x8fa, +0x13bf,0x3ff,0x402,0x402,0x402,0x402,0x402,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff, +0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x101d,0x101d,0x101d,0x101d,0x101d, +0x8fd,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x978,0x978,0x978,0x978,0x978, +0x978,0x978,0x978,0xbbb,0xbbb,0xbbb,0xd1a,0xd20,0xd1d,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0x13bc, +0x993,0x993,0x993,0x993,0x993,0x993,0x993,0x993,0x993,0x993,0x3f3,0x3f0,0x3ed,0x3ea,0xc1e,0xc1e, +0x975,0x3ff,0x3ff,0x408,0x3ff,0x3fc,0x3fc,0x3fc,0x3fc,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff, +0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3f9,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff, +0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3f9,0x3ff,0x3ff, +0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff, +0x3ff,0x3ff,0x3ff,0x3ff,0xa62,0xa62,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0xa62,0x402,0x3ff,0x402,0x3ff, +0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0xa62,0x3ff,0x3ff,0x3ff,0x402, +0x996,0x3ff,0x3e4,0x3e4,0x3e4,0x3e4,0x3e4,0x3e4,0x3e4,0x3e1,0x3ea,0x3e7,0x3e7,0x3e4,0x3e4,0x3e4, +0x3e4,0x405,0x405,0x3e4,0x3e4,0x3ea,0x3e7,0x3e7,0x3e7,0x3e4,0xd29,0xd29,0x3f6,0x3f6,0x3f6,0x3f6, +0x3f6,0x3f6,0x3f6,0x3f6,0x3f6,0x3f6,0xa62,0xa62,0xa62,0xa5f,0xa5f,0xd29,0xa77,0xa77,0xa77,0xa71, +0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa6e,0xa71,0xa6e,0x12,0xa7a,0xa74,0xa65,0xa74,0xa74, +0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74, +0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xd2f,0xd2f,0xd2f,0xa6b,0xa6b,0xa6b,0xa6b, +0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa68,0xa68,0xa68,0xa68, +0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0x12,0x12,0xd2f,0xd2f,0xd2f,0xe85,0xe85,0xe85,0xe85, +0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85, +0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4, +0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0xa80,0xa80,0xa80,0xa80, +0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80, +0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80, +0xa80,0xa80,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xc21,0x15,0x15, +0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0xf9f,0xf9f,0xf9f,0xf9f, +0xf9f,0xf9f,0xf9f,0xf9f,0xf9f,0xf9f,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2, +0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2, +0xfa2,0xfa2,0xfa2,0xfa2,0xfa5,0xfa5,0xfa5,0xf96,0xf96,0xf96,0xf96,0xf96,0xf96,0xf96,0xf96,0xf96, +0xfa8,0xfa8,0xf99,0xf99,0xf9c,0xfae,0xfab,0xff,0xff,0x19fe,0x1a01,0x1a01,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xb94,0xb94,0xb97,0xb97, +0xb94,0xb94,0xb94,0xb94,0xb94,0xb94,0xb94,0xb94,0x1d40,0x1d40,0x1d3d,0x1d3d,0x1dd,0x1dd,0x1dd,0x1dd, +0x1dd,0x1dd,0x1dd,0x1704,0x1704,0x1704,0x1704,0x1704,0x1704,0x1704,0x1704,0x1704,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x1e9,0x1e9,0x1e9,0x1e9, +0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x1311,0x1311,0x1311,0x1311, +0x1311,0x1311,0x1311,0x1311,0x1311,0x168,0x168,0x168,0x168,0x168,0x168,0x168,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x1cda,0x1cd7,0x1bf,0x1bf, +0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x1563,0x1563,0x1563,0x1563, +0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,0x1a4,0x1a4,0x1a4,0x1a4,0x1a4,0x1a4,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x1c59,0x1c59,0x1c59,0x1c59, +0x1c59,0x1c59,0x1c59,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x246,0x246,0x246,0x246, +0x246,0x246,0x246,0x246,0x246,0x246,0x246,0x246,0x246,0x246,0x246,0x246,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x1a4f,0x1a4f,0x1a4f,0x1a4f, +0x1a4f,0x1a4f,0x1a4f,0x1a4f,0x1a4f,0x1a4f,0x24c,0x24c,0x24c,0x24c,0x24c,0x24c,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x1bc0,0x288,0x288,0x288, +0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x183f,0x183f,0x183f,0x183f, +0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x1c6b,0x1c6b,0x1c6b,0x1c6b, +0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x172b,0x172b,0x172b,0x172b, +0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x1cc2,0x1cc2,0x1cc2,0x1cc2, +0x29d,0x1cc2,0x1cc2,0x1cc2,0x1cc2,0x1cc2,0x1cc2,0x1cc2,0x29d,0x1cc2,0x1cc2,0x29d,0x17a3,0x17a3,0x17a3,0x17a3, +0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x1c9e,0x1c9e,0x1c9e,0x1c9e, +0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xe7c,0xe7c,0xe79,0xe79, +0xe79,0xe7c,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x210,0x1857,0x1857,0x1857, +0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x2b8,0x2b8,0x2b8,0x2b8, +0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x1cf5,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x1b0c,0x1b0c,0x1b0c,0x1b0c, +0x1b0c,0x1b0c,0x1b0c,0x1b0c,0x1b0c,0x1b0c,0x26d,0x26d,0x26d,0x26d,0x1b0f,0x1b09,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x1c92,0x1c92,0x1c92,0x1c92, +0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x1d25,0x1d25,0x1d25,0x1d25, +0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x252,0x1a64,0x1a64,0x1a64, +0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x270,0x270,0x270,0x270, +0x270,0x270,0x270,0x270,0x270,0x270,0x270,0x270,0x270,0x270,0x270,0x270,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0x95d,0x95d,3,3,3,3,3,3,3,3,3,3,3,3, +0,0,0,0,0,0,0,0,0,0,0x9b1,0x9b1,3,3,3,3, 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, -3,3,3,3,3,3,0x95d,0x95d,6,6,6,6,6,6,6,6, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,0x9b1,0x9b1, 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, -6,6,6,6,6,6,6,6,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50, -0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,6,6,6,6,6,6,6,6, -6,6,6,6,6,6,6,6,0x14bb,0x3f0,0x3ff,0x3ff,0x18,0x405,0x405,0x405, -0x405,0x405,0x405,0x405,0x405,0x18,0x18,0x405,0x405,0x18,0x18,0x405,0x405,0x405,0x405,0x405, -0x405,0x405,0x405,0x405,0x405,0x405,0x405,0x405,0x405,0x18,0x405,0x405,0x405,0x405,0x405,0x405, -0x405,0x18,0x405,0x18,0x18,0x18,0x405,0x405,0x405,0x405,0x18,0x18,0x3f3,0xcb1,0x3f0,0x3ff, -0x3ff,0x3f0,0x3f0,0x3f0,0x3f0,0x18,0x18,0x3ff,0x3ff,0x18,0x18,0x402,0x402,0x3f6,0xda4,0x18, -0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3f0,0x18,0x18,0x18,0x18,0x408,0x408,0x18,0x408, -0x405,0x405,0x3f0,0x3f0,0x18,0x18,0x948,0x948,0x948,0x948,0x948,0x948,0x948,0x948,0x948,0x948, -0x405,0x405,0x3fc,0x3fc,0x3f9,0x3f9,0x3f9,0x3f9,0x3f9,0x3fc,0x3f9,0x1125,0x184b,0x1848,0x18f0,0x18, -0x1b,0xcb4,0x40b,0xcb7,0x1b,0x417,0x417,0x417,0x417,0x417,0x417,0x1b,0x1b,0x1b,0x1b,0x417, -0x417,0x1b,0x1b,0x417,0x417,0x417,0x417,0x417,0x417,0x417,0x417,0x417,0x417,0x417,0x417,0x417, -0x417,0x1b,0x417,0x417,0x417,0x417,0x417,0x417,0x417,0x1b,0x417,0x41a,0x1b,0x417,0x41a,0x1b, -0x417,0x417,0x1b,0x1b,0x40e,0x1b,0x414,0x414,0x414,0x40b,0x40b,0x1b,0x1b,0x1b,0x1b,0x40b, -0x40b,0x1b,0x1b,0x40b,0x40b,0x411,0x1b,0x1b,0x1b,0xf81,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x41a,0x41a,0x41a,0x417,0x1b,0x41a,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x94b,0x94b, -0x94b,0x94b,0x94b,0x94b,0x94b,0x94b,0x94b,0x94b,0x40b,0x40b,0x417,0x417,0x417,0xf81,0x18f3,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1e,0x41d,0x41d,0x426,0x1e,0x429,0x429,0x429, -0x429,0x429,0x429,0x429,0xcc0,0x429,0x1e,0x429,0x429,0x429,0x1e,0x429,0x429,0x429,0x429,0x429, -0x429,0x429,0x429,0x429,0x429,0x429,0x429,0x429,0x429,0x1e,0x429,0x429,0x429,0x429,0x429,0x429, -0x429,0x1e,0x429,0x429,0x1e,0x429,0x429,0x429,0x429,0x429,0x1e,0x1e,0x420,0x429,0x426,0x426, -0x426,0x41d,0x41d,0x41d,0x41d,0x41d,0x1e,0x41d,0x41d,0x426,0x1e,0x426,0x426,0x423,0x1e,0x1e, -0x429,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e, -0x429,0xcc0,0xcba,0xcba,0x1e,0x1e,0x94e,0x94e,0x94e,0x94e,0x94e,0x94e,0x94e,0x94e,0x94e,0x94e, -0x13d4,0xcbd,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x16cb,0x184e,0x184e,0x184e,0x1851,0x1851,0x1851, -0x21,0x42c,0x43b,0x43b,0x21,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x21,0x21,0x441, -0x441,0x21,0x21,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x441, -0x441,0x21,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x21,0x441,0x441,0x21,0xcc3,0x441,0x441, -0x441,0x441,0x21,0x21,0x42f,0x441,0x42c,0x42c,0x43b,0x42c,0x42c,0x42c,0xf84,0x21,0x21,0x43b, -0x43e,0x21,0x21,0x43e,0x43e,0x432,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x1a5b,0x42c,0x42c, -0x21,0x21,0x21,0x21,0x444,0x444,0x21,0x441,0x441,0x441,0xf84,0xf84,0x21,0x21,0x438,0x438, -0x438,0x438,0x438,0x438,0x438,0x438,0x438,0x438,0x435,0xcc3,0x12fc,0x12fc,0x12fc,0x12fc,0x12fc,0x12fc, -0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x24,0x24,0x447,0x453,0x24,0x453,0x453,0x453, -0x453,0x453,0x453,0x24,0x24,0x24,0x453,0x453,0x453,0x24,0x453,0x453,0x456,0x453,0x24,0x24, -0x24,0x453,0x453,0x24,0x453,0x24,0x453,0x453,0x24,0x24,0x24,0x453,0x453,0x24,0x24,0x24, -0x453,0x453,0x453,0x24,0x24,0x24,0x453,0x453,0x453,0x453,0x453,0x453,0x453,0x453,0xda7,0x453, -0x453,0x453,0x24,0x24,0x24,0x24,0x447,0x44d,0x447,0x44d,0x44d,0x24,0x24,0x24,0x44d,0x44d, -0x44d,0x24,0x450,0x450,0x450,0x44a,0x24,0x24,0xf87,0x24,0x24,0x24,0x24,0x24,0x24,0x447, -0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0xebb,0x954,0x954,0x954,0x954,0x954, -0x954,0x954,0x954,0x954,0x951,0x951,0x951,0xd77,0xcc6,0xcc6,0xcc6,0xcc6,0xcc6,0xcc9,0xcc6,0x24, -0x24,0x24,0x24,0x24,0x14be,0x465,0x465,0x465,0x18f6,0x468,0x468,0x468,0x468,0x468,0x468,0x468, -0x468,0x27,0x468,0x468,0x468,0x27,0x468,0x468,0x468,0x468,0x468,0x468,0x468,0x468,0x468,0x468, -0x468,0x468,0x468,0x468,0x468,0x27,0x468,0x468,0x468,0x468,0x468,0x468,0x468,0x468,0x468,0x468, -0x14c1,0x468,0x468,0x468,0x468,0x468,0x27,0x27,0x1b00,0xf90,0x459,0x459,0x459,0x465,0x465,0x465, -0x465,0x27,0x459,0x459,0x45c,0x27,0x459,0x459,0x459,0x45f,0x27,0x27,0x27,0x27,0x27,0x27, -0x27,0x459,0x459,0x27,0xf90,0xf90,0x16ce,0x27,0x27,0x1b03,0x27,0x27,0x468,0x468,0xf8a,0xf8a, -0x27,0x27,0x462,0x462,0x462,0x462,0x462,0x462,0x462,0x462,0x462,0x462,0x27,0x27,0x27,0x27, -0x27,0x27,0x27,0x19bf,0xf8d,0xf8d,0xf8d,0xf8d,0xf8d,0xf8d,0xf8d,0xf8d,0x178e,0x14c4,0x471,0x471, -0x18f9,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x2a,0x477,0x477,0x477,0x2a,0x477,0x477, -0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x2a,0x477,0x477, -0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x2a,0x477,0x477,0x477,0x477,0x477,0x2a,0x2a, -0xccc,0xccf,0x471,0x46b,0x474,0x471,0x46b,0x471,0x471,0x2a,0x46b,0x474,0x474,0x2a,0x474,0x474, -0x46b,0x46e,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x46b,0x46b,0x2a,0x2a,0x2a,0x2a,0x2a, -0x2a,0x1b06,0x477,0x2a,0x477,0x477,0xed3,0xed3,0x2a,0x2a,0x957,0x957,0x957,0x957,0x957,0x957, -0x957,0x957,0x957,0x957,0x2a,0xed6,0xed6,0x1bc9,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a, -0x2a,0x2a,0x2a,0x2a,0x1854,0x14c7,0x483,0x483,0x1a5e,0x489,0x489,0x489,0x489,0x489,0x489,0x489, -0x489,0x2d,0x489,0x489,0x489,0x2d,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489, -0x489,0x489,0x489,0x489,0x483,0x47a,0x47a,0x47a,0xf93,0x2d,0x483,0x483,0x483,0x2d,0x486,0x486, -0x486,0x47d,0x1302,0x1791,0x2d,0x2d,0x2d,0x2d,0x1794,0x1794,0x1794,0x47a,0x1791,0x1791,0x1791,0x1791, -0x1791,0x1791,0x1791,0x16d1,0x489,0x489,0xf93,0xf93,0x2d,0x2d,0x480,0x480,0x480,0x480,0x480,0x480, -0x480,0x480,0x480,0x480,0xf96,0xf96,0xf96,0xf96,0xf96,0xf96,0x1791,0x1791,0x1791,0xf99,0xf9c,0xf9c, -0xf9c,0xf9c,0xf9c,0xf9c,0x30,0x1a61,0xa23,0xa23,0x30,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29, -0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0x30,0x30,0x30,0xa29,0xa29, -0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29, -0xa29,0xa29,0x30,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0x30,0xa29,0x30,0x30, -0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0x30,0x30,0x30,0xa1d,0x30,0x30,0x30,0x30,0xa1a, -0xa23,0xa23,0xa1a,0xa1a,0xa1a,0x30,0xa1a,0x30,0xa23,0xa23,0xa26,0xa23,0xa26,0xa26,0xa26,0xa1a, -0x30,0x30,0x30,0x30,0x30,0x30,0x14ca,0x14ca,0x14ca,0x14ca,0x14ca,0x14ca,0x14ca,0x14ca,0x14ca,0x14ca, -0x30,0x30,0xa23,0xa23,0xa20,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, -0x33,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4, -0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4, -0x4a4,0x48f,0x4a4,0x4a1,0x48f,0x48f,0x48f,0x48f,0x48f,0x48f,0x495,0x33,0x33,0x33,0x33,0x48c, -0x4aa,0x4aa,0x4aa,0x4aa,0x4aa,0x4a4,0x4a7,0x492,0x492,0x492,0x492,0x492,0x492,0x48f,0x492,0x498, -0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49b,0x49b,0x33,0x33,0x33,0x33, +6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, +0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4, +6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, +0x1596,0x426,0x435,0x435,0x18,0x43e,0x43e,0x43e,0x43e,0x43e,0x43e,0x43e,0x43e,0x18,0x18,0x43e, +0x43e,0x18,0x18,0x43e,0x43e,0x43e,0x43e,0x43e,0x43e,0x43e,0x43e,0x43e,0x43e,0x43e,0x43e,0x43e, +0x43e,0x18,0x43e,0x43e,0x43e,0x43e,0x43e,0x43e,0x43e,0x18,0x43e,0x18,0x18,0x18,0x43e,0x43e, +0x43e,0x43e,0x18,0x18,0x429,0xd35,0x426,0x435,0x435,0x426,0x426,0x426,0x426,0x18,0x18,0x435, +0x435,0x18,0x18,0x438,0x438,0x42c,0xe2b,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x426, +0x18,0x18,0x18,0x18,0x43b,0x43b,0x18,0x43b,0x43e,0x43e,0x426,0x426,0x18,0x18,0x99c,0x99c, +0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,0x43e,0x43e,0x432,0x432,0x42f,0x42f,0x42f,0x42f, +0x42f,0x432,0x42f,0x11f1,0x1938,0x1935,0x19dd,0x18,0x1b,0xd38,0x441,0xd3b,0x1b,0x450,0x450,0x450, +0x450,0x450,0x450,0x1b,0x1b,0x1b,0x1b,0x450,0x450,0x1b,0x1b,0x450,0x450,0x450,0x450,0x450, +0x450,0x450,0x450,0x450,0x450,0x450,0x450,0x450,0x450,0x1b,0x450,0x450,0x450,0x450,0x450,0x450, +0x450,0x1b,0x450,0x44d,0x1b,0x450,0x44d,0x1b,0x450,0x450,0x1b,0x1b,0x444,0x1b,0x44a,0x44a, +0x44a,0x441,0x441,0x1b,0x1b,0x1b,0x1b,0x441,0x441,0x1b,0x1b,0x441,0x441,0x447,0x1b,0x1b, +0x1b,0x1026,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x44d,0x44d,0x44d,0x450,0x1b,0x44d,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x99f,0x99f,0x99f,0x99f,0x99f,0x99f,0x99f,0x99f,0x99f,0x99f, +0x441,0x441,0x450,0x450,0x450,0x1026,0x19e0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1e,0x453,0x453,0x45c,0x1e,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0xd44,0x45f,0x1e,0x45f, +0x45f,0x45f,0x1e,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f, +0x45f,0x1e,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x1e,0x45f,0x45f,0x1e,0x45f,0x45f,0x45f, +0x45f,0x45f,0x1e,0x1e,0x456,0x45f,0x45c,0x45c,0x45c,0x453,0x453,0x453,0x453,0x453,0x1e,0x453, +0x453,0x45c,0x1e,0x45c,0x45c,0x459,0x1e,0x1e,0x45f,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e, +0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x45f,0xd44,0xd3e,0xd3e,0x1e,0x1e,0x9a2,0x9a2, +0x9a2,0x9a2,0x9a2,0x9a2,0x9a2,0x9a2,0x9a2,0x9a2,0x14ac,0xd41,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e, +0x1e,0x17b8,0x193b,0x193b,0x193b,0x193e,0x193e,0x193e,0x21,0x462,0x471,0x471,0x21,0x47a,0x47a,0x47a, +0x47a,0x47a,0x47a,0x47a,0x47a,0x21,0x21,0x47a,0x47a,0x21,0x21,0x47a,0x47a,0x47a,0x47a,0x47a, +0x47a,0x47a,0x47a,0x47a,0x47a,0x47a,0x47a,0x47a,0x47a,0x21,0x47a,0x47a,0x47a,0x47a,0x47a,0x47a, +0x47a,0x21,0x47a,0x47a,0x21,0xd47,0x47a,0x47a,0x47a,0x47a,0x21,0x21,0x465,0x47a,0x462,0x462, +0x471,0x462,0x462,0x462,0x1029,0x21,0x21,0x471,0x474,0x21,0x21,0x474,0x474,0x468,0x21,0x21, +0x21,0x21,0x21,0x21,0x21,0x1b54,0x462,0x462,0x21,0x21,0x21,0x21,0x477,0x477,0x21,0x47a, +0x47a,0x47a,0x1029,0x1029,0x21,0x21,0x46e,0x46e,0x46e,0x46e,0x46e,0x46e,0x46e,0x46e,0x46e,0x46e, +0x46b,0xd47,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21, +0x24,0x24,0x47d,0x489,0x24,0x489,0x489,0x489,0x489,0x489,0x489,0x24,0x24,0x24,0x489,0x489, +0x489,0x24,0x489,0x489,0x48c,0x489,0x24,0x24,0x24,0x489,0x489,0x24,0x489,0x24,0x489,0x489, +0x24,0x24,0x24,0x489,0x489,0x24,0x24,0x24,0x489,0x489,0x489,0x24,0x24,0x24,0x489,0x489, +0x489,0x489,0x489,0x489,0x489,0x489,0xe2e,0x489,0x489,0x489,0x24,0x24,0x24,0x24,0x47d,0x483, +0x47d,0x483,0x483,0x24,0x24,0x24,0x483,0x483,0x483,0x24,0x486,0x486,0x486,0x480,0x24,0x24, +0x102c,0x24,0x24,0x24,0x24,0x24,0x24,0x47d,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24, +0x24,0x24,0xf4b,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a5,0x9a5,0x9a5,0xdfb, +0xd4a,0xd4a,0xd4a,0xd4a,0xd4a,0xd4d,0xd4a,0x24,0x24,0x24,0x24,0x24,0x1599,0x49b,0x49b,0x49b, +0x19e3,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x27,0x49e,0x49e,0x49e,0x27,0x49e,0x49e, +0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x27,0x49e,0x49e, +0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x159c,0x49e,0x49e,0x49e,0x49e,0x49e,0x27,0x27, +0x1bff,0x1038,0x48f,0x48f,0x48f,0x49b,0x49b,0x49b,0x49b,0x27,0x48f,0x48f,0x492,0x27,0x48f,0x48f, +0x48f,0x495,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x48f,0x48f,0x27,0x1035,0x1035,0x17bb,0x27, +0x27,0x1c02,0x27,0x27,0x49e,0x49e,0x102f,0x102f,0x27,0x27,0x498,0x498,0x498,0x498,0x498,0x498, +0x498,0x498,0x498,0x498,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x1ab2,0x1032,0x1032,0x1032,0x1032, +0x1032,0x1032,0x1032,0x1032,0x187b,0x159f,0x4a7,0x4a7,0x19e6,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0, +0x4b0,0x2a,0x4b0,0x4b0,0x4b0,0x2a,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0, +0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x2a,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0, +0x2a,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x2a,0x2a,0xd50,0xd53,0x4a7,0x4a1,0x4aa,0x4a7,0x4a1,0x4a7, +0x4a7,0x2a,0x4a1,0x4aa,0x4aa,0x2a,0x4aa,0x4aa,0x4a1,0x4a4,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a, +0x2a,0x4a1,0x4a1,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x1c05,0x4ad,0x2a,0x4b0,0x4b0,0xf63,0xf63, +0x2a,0x2a,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x2a,0xf66,0xf66,0x1cc8, +0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x1941,0x15a2,0x4bc,0x4bc, +0x1b57,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x2d,0x4c2,0x4c2,0x4c2,0x2d,0x4c2,0x4c2, +0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4bc,0x4b3,0x4b3,0x4b3, +0x103b,0x2d,0x4bc,0x4bc,0x4bc,0x2d,0x4bf,0x4bf,0x4bf,0x4b6,0x13d1,0x187e,0x2d,0x2d,0x2d,0x2d, +0x1881,0x1881,0x1881,0x4b3,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x17be,0x4c2,0x4c2,0x103b,0x103b, +0x2d,0x2d,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x103e,0x103e,0x103e,0x103e, +0x103e,0x103e,0x187e,0x187e,0x187e,0x1041,0x1044,0x1044,0x1044,0x1044,0x1044,0x1044,0x30,0x1b5a,0xa92,0xa92, +0x30,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa98,0xa98,0xa9b,0xa9b,0xa9b, +0xa9b,0xa9b,0xa9b,0x30,0x30,0x30,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa98,0xa9b, +0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0x30,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b, +0xa9b,0xa9b,0xa9b,0xa9b,0x30,0xa9b,0x30,0x30,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0x30, +0x30,0x30,0xa89,0x30,0x30,0x30,0x30,0xa86,0xa92,0xa92,0xa86,0xa86,0xa86,0x30,0xa86,0x30, +0xa92,0xa92,0xa95,0xa92,0xa95,0xa95,0xa95,0xa83,0x30,0x30,0x30,0x30,0x30,0x30,0x15a5,0x15a5, +0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x30,0x30,0xa92,0xa8f,0xa8c,0x30,0x30,0x30, +0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x33,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd, +0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd, +0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4c8,0x4dd,0x4da,0x4c8,0x4c8,0x4c8,0x4c8, +0x4c8,0x4c8,0x4ce,0x33,0x33,0x33,0x33,0x4c5,0x4e3,0x4e3,0x4e3,0x4e3,0x4e3,0x4dd,0x4e0,0x4cb, +0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4c8,0x4cb,0x4d1,0x4d7,0x4d7,0x4d7,0x4d7,0x4d7,0x4d7,0x4d7,0x4d7, +0x4d7,0x4d7,0x4d4,0x4d4,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33, 0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33, -0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x36,0x4b9,0x4b9,0x36, -0x4b9,0x36,0x19c5,0x4b9,0x4b9,0x19c5,0x4b9,0x36,0x19c5,0x4b9,0x19c5,0x19c5,0x19c5,0x19c5,0x19c5,0x19c5, -0x4b9,0x4b9,0x4b9,0x4b9,0x19c5,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x19c5,0x4b9,0x4b9,0x4b9, -0x36,0x4b9,0x36,0x4b9,0x19c5,0x19c5,0x4b9,0x4b9,0x19c5,0x4b9,0x4b9,0x4b9,0x4b9,0x4ad,0x4b9,0x4b6, -0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x19c2,0x4ad,0x4ad,0x4b9,0x36,0x36,0x4c2,0x4c2,0x4c2,0x4c2, -0x4c2,0x36,0x4bf,0x36,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x4ad,0x1bcc,0x36,0x4b3,0x4b3,0x4b3,0x4b3, -0x4b3,0x4b3,0x4b3,0x4b3,0x4b3,0x4b3,0x36,0x36,0x4bc,0x4bc,0x13d7,0x13d7,0x36,0x36,0x36,0x36, +0x33,0x33,0x33,0x33,0x36,0x4f5,0x4f5,0x36,0x4f5,0x36,0x1ab8,0x4f5,0x4f5,0x1ab8,0x4f5,0x36, +0x1ab8,0x4f5,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x4f5,0x4f5,0x4f5,0x4f5,0x1ab8,0x4f5,0x4f5,0x4f5, +0x4f5,0x4f5,0x4f5,0x4f5,0x1ab8,0x4f5,0x4f5,0x4f5,0x36,0x4f5,0x36,0x4f5,0x1ab8,0x1ab8,0x4f5,0x4f5, +0x1ab8,0x4f5,0x4f5,0x4f5,0x4f5,0x4e6,0x4f5,0x4ef,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x1ab5,0x4e6, +0x4e6,0x4f5,0x36,0x36,0x4fb,0x4fb,0x4fb,0x4fb,0x4fb,0x36,0x4f8,0x36,0x4e9,0x4e9,0x4e9,0x4e9, +0x4e9,0x4e6,0x1ccb,0x36,0x4ec,0x4ec,0x4ec,0x4ec,0x4ec,0x4ec,0x4ec,0x4ec,0x4ec,0x4ec,0x36,0x36, +0x4f2,0x4f2,0x14af,0x14af,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, -0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x99c,0x99c,0x99c,0x99f, -0x99c,0x99c,0x99c,0x99c,0x39,0x99c,0x99c,0x99c,0x99c,0x99f,0x99c,0x99c,0x99c,0x99c,0x99f,0x99c, -0x99c,0x99c,0x99c,0x99f,0x99c,0x99c,0x99c,0x99c,0x99f,0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,0x99c, -0x99c,0x99c,0x99c,0x99c,0x99c,0x99f,0xa38,0xfa8,0xfa8,0x39,0x39,0x39,0x39,0x966,0x966,0x969, -0x966,0x969,0x969,0x975,0x969,0x975,0x966,0x966,0x966,0x966,0x966,0x996,0x966,0x969,0x96f,0x96f, -0x972,0x97b,0x96c,0x96c,0x99c,0x99c,0x99c,0x99c,0x130b,0x1305,0x1305,0x1305,0x966,0x966,0x966,0x969, -0x966,0x966,0xa2c,0x966,0x39,0x966,0x966,0x966,0x966,0x969,0x966,0x966,0x966,0x966,0x969,0x966, -0x966,0x966,0x966,0x969,0x966,0x966,0x966,0x966,0x969,0x966,0xa2c,0xa2c,0xa2c,0x966,0x966,0x966, -0x966,0x966,0x966,0x966,0xa2c,0x969,0xa2c,0xa2c,0xa2c,0x39,0xa35,0xa35,0xa32,0xa32,0xa32,0xa32, -0xa32,0xa32,0xa2f,0xa32,0xa32,0xa32,0xa32,0xa32,0xa32,0x39,0xf9f,0xa32,0xdaa,0xdaa,0xfa2,0xfa5, -0xf9f,0x1128,0x1128,0x1128,0x1128,0x1308,0x1308,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39, +0x36,0x36,0x36,0x36,0x9fc,0x9fc,0x9fc,0x9f9,0x9fc,0x9fc,0x9fc,0x9fc,0x39,0x9fc,0x9fc,0x9fc, +0x9fc,0x9f9,0x9fc,0x9fc,0x9fc,0x9fc,0x9f9,0x9fc,0x9fc,0x9fc,0x9fc,0x9f9,0x9fc,0x9fc,0x9fc,0x9fc, +0x9f9,0x9fc,0x9fc,0x9fc,0x9fc,0x9fc,0x9fc,0x9fc,0x9fc,0x9fc,0x9fc,0x9fc,0x9fc,0x9f9,0xaaa,0x1050, +0x1050,0x39,0x39,0x39,0x39,0x9bd,0x9bd,0x9ba,0x9bd,0x9ba,0x9ba,0x9cf,0x9ba,0x9cf,0x9bd,0x9bd, +0x9bd,0x9bd,0x9bd,0x9f3,0x9bd,0x9ba,0x9c9,0x9c9,0x9cc,0x9d5,0x9c6,0x9c6,0x9fc,0x9fc,0x9fc,0x9fc, +0x13da,0x13d4,0x13d4,0x13d4,0x9bd,0x9bd,0x9bd,0x9ba,0x9bd,0x9bd,0xa9e,0x9bd,0x39,0x9bd,0x9bd,0x9bd, +0x9bd,0x9ba,0x9bd,0x9bd,0x9bd,0x9bd,0x9ba,0x9bd,0x9bd,0x9bd,0x9bd,0x9ba,0x9bd,0x9bd,0x9bd,0x9bd, +0x9ba,0x9bd,0xa9e,0xa9e,0xa9e,0x9bd,0x9bd,0x9bd,0x9bd,0x9bd,0x9bd,0x9bd,0xa9e,0x9ba,0xa9e,0xa9e, +0xa9e,0x39,0xaa7,0xaa7,0xaa4,0xaa4,0xaa4,0xaa4,0xaa4,0xaa4,0xaa1,0xaa4,0xaa4,0xaa4,0xaa4,0xaa4, +0xaa4,0x39,0x1047,0xaa4,0xe31,0xe31,0x104a,0x104d,0x1047,0x11f4,0x11f4,0x11f4,0x11f4,0x13d7,0x13d7,0x39, 0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39, -0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x3c,0x13dd, -0x3c,0x3c,0x3c,0x3c,0x3c,0x13dd,0x3c,0x3c,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5, -0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xdb9, -0xa62,0x3f,0xa62,0xa62,0xa62,0xa62,0x3f,0x3f,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0x3f, -0xa62,0x3f,0xa62,0xa62,0xa62,0xa62,0x3f,0x3f,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xdb9, -0xa62,0x3f,0xa62,0xa62,0xa62,0xa62,0x3f,0x3f,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62, -0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xdb9,0xa62,0x3f,0xa62,0xa62, -0xa62,0xa62,0x3f,0x3f,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0x3f,0xa62,0x3f,0xa62,0xa62, -0xa62,0xa62,0x3f,0x3f,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xdb9,0xa62,0xa62,0xa62,0xa62, -0xa62,0xa62,0xa62,0x3f,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62, -0xa62,0xa62,0xa62,0xdb9,0xa62,0x3f,0xa62,0xa62,0xa62,0xa62,0x3f,0x3f,0xa62,0xa62,0xa62,0xa62, -0xa62,0xa62,0xa62,0xdb9,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62, -0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0x3f,0x3f,0x130e,0x130e,0xdb3,0xdb6,0xa5c,0xa65,0xa59, -0xa59,0xa59,0xa59,0xa65,0xa65,0xa5f,0xa5f,0xa5f,0xa5f,0xa5f,0xa5f,0xa5f,0xa5f,0xa5f,0xa56,0xa56, -0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0x3f,0x3f,0x3f,0xa68,0xa68,0xa68,0xa68, -0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68, -0xa68,0x16d7,0x42,0x42,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x42,0x42,0xa7a,0xa7d,0xa7d,0xa7d, -0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d, -0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa77,0xa74,0x45,0x45,0x45,0xa83,0xa83,0xa83,0xa83, -0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa80,0xa80,0xa80,0xa83,0xa83,0xa83,0x14cd,0x14cd,0x14cd, -0x14cd,0x14cd,0x14cd,0x14cd,0x14cd,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0xaa4,0xaa4,0xaa4,0xaa4, -0xaa4,0xaa4,0xa86,0xaa4,0xaa4,0xa89,0xa89,0xa89,0xa89,0xa89,0xa89,0xa89,0xa89,0xa89,0xa8c,0xa89, -0xa9b,0xa9b,0xa9e,0xaa7,0xa95,0xa92,0xa9b,0xa98,0xaa7,0xcd2,0x4b,0x4b,0xaa1,0xaa1,0xaa1,0xaa1, -0xaa1,0xaa1,0xaa1,0xaa1,0xaa1,0xaa1,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0xcd5,0xcd5,0xcd5,0xcd5, -0xcd5,0xcd5,0xcd5,0xcd5,0xcd5,0xcd5,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0xab6,0xab6,0xb2e,0xb31, -0xabc,0xb2b,0xab9,0xab6,0xabf,0xace,0xac2,0xad1,0xad1,0xad1,0xaad,0x1b09,0xac5,0xac5,0xac5,0xac5, -0xac5,0xac5,0xac5,0xac5,0xac5,0xac5,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0xac8,0xac8,0xac8,0xac8, -0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8, -0xac8,0xac8,0xac8,0xac8,0x18fc,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0xac8,0xac8,0xac8,0xac8, -0xac8,0xac8,0xac8,0xac8,0xac8,0xab0,0xfc6,0x4e,0x4e,0x4e,0x4e,0x4e,0x117f,0x117f,0x117f,0x117f, -0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x4e6,0x4e6,0x4e6,0x4e6, -0x4e6,0x4e6,0x4e6,0x4e6,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e6,0x4e6,0x4e6,0x4e6, -0x4e6,0x4e6,0x51,0x51,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x51,0x51,0x4e6,0x4e6,0x4e6,0x4e6, -0x4e6,0x4e6,0x4e6,0x4e6,0x51,0x4e9,0x51,0x4e9,0x51,0x4e9,0x51,0x4e9,0x4e6,0x4e6,0x4e6,0x4e6, -0x4e6,0x4e6,0x4e6,0x4e6,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e6,0x4e6,0x4e6,0x4e6, -0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x51,0x51,0x4e6,0x4e6,0x4e6,0x4e6, -0x4e6,0x4e6,0x4e6,0x4e6,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e6,0x4e6,0x4e6,0x4e6, -0x4e6,0x51,0x4e6,0x4e6,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e0,0x4e6,0x4e0,0x4e0,0x4dd,0x4e6,0x4e6, -0x4e6,0x51,0x4e6,0x4e6,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4dd,0x4dd,0x4dd,0x4e6,0x4e6,0x4e6,0x4e6, -0x51,0x51,0x4e6,0x4e6,0x4e9,0x4e9,0x4e9,0x4e9,0x51,0x4dd,0x4dd,0x4dd,0x4e6,0x4e6,0x4e6,0x4e6, -0x4e6,0x4e6,0x4e6,0x4e6,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4dd,0x4dd,0x4dd,0x51,0x51,0x4e6,0x4e6, -0x4e6,0x51,0x4e6,0x4e6,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e3,0x4e0,0x51,0xba6,0xba9,0xba9,0xba9, -0xfcf,0x54,0x14a9,0x14a9,0x14a9,0x14a9,0x4f2,0x4f2,0x4f2,0x4f2,0x4f2,0x4f2,0x53d,0xbbb,0x57,0x57, -0x6d8,0x53d,0x53d,0x53d,0x53d,0x53d,0x543,0x555,0x543,0x54f,0x549,0x6db,0x53a,0x6d5,0x6d5,0x6d5, -0x6d5,0x53a,0x53a,0x53a,0x53a,0x53a,0x540,0x552,0x540,0x54c,0x546,0x57,0xdc2,0xdc2,0xdc2,0xdc2, -0xdc2,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x57,0x57,0x57,0x1b0c,0x5a,0x5a,0x5a, -0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x564,0x564,0x564,0x564, -0x564,0x564,0x564,0x564,0x564,0x564,0x564,0x564,0x564,0x561,0x561,0x561,0x561,0x564,0xadd,0xadd, -0xbc1,0xbc7,0xbc7,0xbc4,0xbc4,0xbc4,0xbc4,0xdc8,0xed9,0xed9,0xed9,0xed9,0x1113,0x5d,0x5d,0x5d, -0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x594,0x594,0x594,0xae6, -0xee2,0xfd5,0xfd5,0xfd5,0xfd5,0x126f,0x16dd,0x16dd,0x60,0x60,0x60,0x60,0x702,0x702,0x702,0x702, -0x702,0x702,0x702,0x702,0x702,0x702,0x5a0,0x5a0,0x59d,0x59d,0x59d,0x59d,0x5c1,0x5c1,0x5c1,0x5c1, -0x5c1,0xaef,0xaef,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63, -0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x5c4,0x5c4,0x5c4,0x5c4, -0x5c4,0x5c4,0x5c4,0x5c4,0x5c4,0x5c4,0x5c4,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66, -0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0xb0a,0xb0a,0xb0a,0xb0a, -0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a, -0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0x69,0xb0a,0xb0a,0xb0a,0xb0a,0xb0d,0xb0a,0xb0a,0xb0a,0xb0a, -0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0d, -0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0xb10,0xb10,0xb10,0xb10, -0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10, -0xb10,0xb10,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x72,0x822,0x81c,0x822, -0x81c,0x822,0x81c,0x822,0x81c,0x822,0x81c,0x81c,0x81f,0x81c,0x81f,0x81c,0x81f,0x81c,0x81f,0x81c, -0x81f,0x81c,0x81f,0x81c,0x81f,0x81c,0x81f,0x81c,0x81f,0x81c,0x81f,0x81c,0x81c,0x81c,0x81c,0x822, -0x81c,0x822,0x81c,0x822,0x81c,0x81c,0x81c,0x81c,0x81c,0x81c,0x822,0x81c,0x81c,0x81c,0x81c,0x81c, -0x81f,0xc60,0xc60,0x72,0x72,0x936,0x936,0x8fd,0x8fd,0x825,0x828,0xc5d,0x75,0x75,0x75,0x75, -0x75,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a, -0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x1101,0x18c3,0x19aa, -0x78,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d, -0x83d,0x83d,0x83d,0x78,0x906,0x906,0x909,0x909,0x909,0x909,0x909,0x909,0x909,0x909,0x909,0x909, -0x909,0x909,0x909,0x909,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846, -0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846, -0x846,0xd5c,0xd5c,0x7b,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22, -0xb22,0x7e,0x7e,0x7e,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28, -0xb28,0xb28,0xb28,0xb28,0xb28,0xc69,0xb28,0xb28,0xb28,0xc69,0xb28,0x81,0x81,0x81,0x81,0x81, -0x81,0x81,0x81,0x81,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6, -0x11a6,0x11a6,0x11a6,0x11a6,0x9c0,0x9c0,0x9c0,0x9c0,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84, -0x84,0x84,0x84,0x84,0x121b,0x121b,0x121b,0x121b,0x121b,0x121b,0x121b,0x121b,0x121b,0x121b,0x121b,0x121b, -0x121b,0x121b,0x121b,0x121b,0x609,0x609,0x609,0x609,0x609,0x609,0x609,0x87,0x87,0x87,0x87,0x87, -0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x87,0x87,0x87,0x87, -0x87,0xafb,0x5fa,0x600,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x5fd,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x87,0x600,0x600,0x600,0x600, -0x600,0x87,0x600,0x87,0x600,0x600,0x87,0x600,0x600,0x87,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x603,0x615,0x60f,0x615,0x60f,0x612,0x618,0x615,0x60f,0x612,0x618,0x615,0x60f, -0x612,0x618,0x615,0x60f,0x1323,0x1323,0x1b0f,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a, -0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x615,0x60f,0x612,0x618,0x615,0x60f,0x615,0x60f,0x615, -0x60f,0x615,0x615,0x60f,0x60f,0x60f,0x60f,0x612,0x60f,0x60f,0x612,0x60f,0x612,0x612,0x612,0x60f, -0x612,0x612,0x612,0x612,0x8a,0x8a,0x612,0x612,0x612,0x612,0x60f,0x60f,0x612,0x60f,0x60f,0x60f, -0x60f,0x612,0x60f,0x60f,0x60f,0x60f,0x60f,0x612,0x612,0x612,0x60f,0x60f,0x8a,0x8a,0x8a,0x8a, -0x8a,0x8a,0x8a,0x1b0f,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46, -0xb46,0xb46,0xb46,0xb46,0x85e,0x870,0x86d,0x870,0x86d,0xc7e,0xc7e,0xd68,0xd65,0x861,0x861,0x861, -0x861,0x873,0x873,0x873,0x88b,0x88e,0x89d,0x8d,0x891,0x894,0x8a0,0x8a0,0x888,0x87f,0x879,0x87f, -0x879,0x87f,0x879,0x87c,0x87c,0x897,0x897,0x89a,0x897,0x897,0x897,0x8d,0x897,0x885,0x882,0x87c, -0x8d,0x8d,0x8d,0x8d,0x621,0x62d,0x621,0xbfa,0x621,0x90,0x621,0x62d,0x621,0x62d,0x621,0x62d, -0x621,0x62d,0x621,0x62d,0x62d,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x627, -0x62d,0x62a,0x624,0x62a,0x624,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x62a,0x624,0x62a,0x624,0x62a, -0x624,0x90,0x90,0x61e,0x75f,0x762,0x777,0x77a,0x759,0x762,0x762,0x96,0x741,0x744,0x744,0x744, -0x744,0x741,0x741,0x96,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0xafe,0xafe,0xafe, -0x9c3,0x73b,0x630,0x630,0x96,0x789,0x768,0x759,0x762,0x75f,0x759,0x76b,0x75c,0x756,0x759,0x777, -0x76e,0x765,0x786,0x759,0x783,0x783,0x783,0x783,0x783,0x783,0x783,0x783,0x783,0x783,0x774,0x771, -0x777,0x777,0x777,0x789,0x74a,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747, -0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747, -0x747,0x747,0x747,0x96,0x96,0x96,0x747,0x747,0x747,0x747,0x747,0x747,0x96,0x96,0x747,0x747, -0x747,0x747,0x747,0x747,0x96,0x96,0x747,0x747,0x747,0x747,0x747,0x747,0x96,0x96,0x747,0x747, -0x747,0x96,0x96,0x96,0xb49,0xb49,0xb49,0xb49,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, -0x99,0x1860,0x1860,0x1860,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f, -0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0x9c,0x9c,0x9c,0x9c,0x9c,0x1626,0x1626,0x1626,0x1626, -0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0xb58,0xb58,0xb58,0xb58, -0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58, -0xb58,0xb58,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0xb64,0xb64,0xb64,0xb64, -0xb64,0xb64,0xb64,0xa2,0xa2,0xfe1,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64, -0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0x16e3,0x16e3,0x16e3,0x16e3, -0x16e3,0x16e3,0x16e3,0x16e3,0x16e3,0x1b12,0x1b12,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2, -0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xb7c,0xb7c,0xb7c,0xb7c, -0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79, -0xb79,0xa5,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb7c,0xb7c,0xb79,0xb79, -0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79, -0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb7c,0xa5,0xb7c,0xb7c,0xa5,0xa5,0xb7c,0xa5, -0xa5,0xb7c,0xb7c,0xa5,0xa5,0xb7c,0xb7c,0xb7c,0xb7c,0xa5,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c, -0xb7c,0xb7c,0xb79,0xb79,0xb79,0xb79,0xa5,0xb79,0xa5,0xb79,0xb79,0xb79,0xb79,0xcf0,0xb79,0xb79, -0xa5,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb7c,0xb7c,0xb7c,0xb7c, -0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb79,0xb79,0xb79,0xb79, -0xb7c,0xb7c,0xa5,0xb7c,0xb7c,0xb7c,0xb7c,0xa5,0xa5,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c, -0xb7c,0xa5,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xa5,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79, -0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79, -0xb79,0xb79,0xb79,0xb79,0xb7c,0xb7c,0xa5,0xb7c,0xb7c,0xb7c,0xb7c,0xa5,0xb7c,0xb7c,0xb7c,0xb7c, -0xb7c,0xa5,0xb7c,0xa5,0xa5,0xa5,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xa5,0xb79,0xb79, -0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xdda,0xdda,0xa5,0xa5, -0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c, -0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb79,0xb79,0xb79,0xb73,0xb79,0xb79,0xb79,0xb79, -0xb79,0xb79,0xef1,0xeee,0xa5,0xa5,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76, -0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xa8,0xb82,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8, -0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8, -0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09, -0xc09,0xc09,0xc09,0xc09,0xc09,0x1b18,0xc09,0xc09,0xc09,0xc09,0xc03,0xc03,0xc06,0x1b15,0xab,0xab, -0xab,0xab,0xab,0xab,0xab,0xab,0xab,0x1b18,0xc12,0xc12,0xc12,0xc12,0xc12,0xc12,0xc12,0xc12, -0xc12,0xc12,0xc12,0xc12,0xc12,0xc12,0xc12,0xc12,0xc12,0xc12,0xc0c,0xc0c,0xc0f,0xc72,0xc72,0xae, -0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18, -0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc15,0xc15,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xc1e,0xc1e,0xc1e,0xc1e,0xc1e,0xc1e,0xc1e,0xc1e, -0xc1e,0xc1e,0xc1e,0xc1e,0xc1e,0xb4,0xc1e,0xc1e,0xc1e,0xb4,0xc1b,0xc1b,0xb4,0xb4,0xb4,0xb4, -0xb4,0xb4,0xb4,0xb4,0xb4,0xb4,0xb4,0xb4,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02, -0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02, -0xd02,0xd02,0xd02,0xd02,0xd02,0x14e8,0x14e8,0xb7,0xcf3,0xcf3,0xcf3,0xcff,0xcff,0xcff,0xcff,0xcf3, -0xcf3,0xcff,0xcff,0xcff,0xb7,0xb7,0xb7,0xb7,0xcff,0xcff,0xcf3,0xcff,0xcff,0xcff,0xcff,0xcff, -0xcff,0xcf6,0xcf6,0xcf6,0xb7,0xb7,0xb7,0xb7,0xcf9,0xb7,0xb7,0xb7,0xd05,0xd05,0xcfc,0xcfc, -0xcfc,0xcfc,0xcfc,0xcfc,0xcfc,0xcfc,0xcfc,0xcfc,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08, -0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xba,0xba,0xd08,0xd08,0xd08,0xd08, -0xd08,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0x14eb,0x14eb,0x14eb,0x14eb, -0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb, -0xbd,0xbd,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb, -0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0xbd,0x1a64,0x14eb,0x14eb,0x14eb,0x14eb, -0x14eb,0x14eb,0x14eb,0x14eb,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c, -0xc0,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c, -0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xc0,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c, -0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xc0,0xd2c,0xd2c,0xc0,0xd2c, -0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xc0,0xc0, -0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xc0,0xc0, -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f, -0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xc3,0xc3,0xc3,0xc3,0xc3, -0xd6e,0xd6e,0xd74,0xc6,0xc6,0xc6,0xc6,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b, -0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b, -0xc6,0xc6,0xc6,0xd71,0xd71,0xd71,0xd71,0xd71,0xd71,0xd71,0xd71,0xd71,0xd35,0xd35,0xd35,0xd35, -0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35, -0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xc9,0xd32,0xd3e,0xd3e,0xd3e,0xd3e, -0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e, -0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xcc,0xcc,0xd3b,0xd3b,0xd3b,0xd3b, -0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x1824,0x1824,0x1824,0x1824, -0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0xd41,0xd41,0xd41,0xd41, -0xd41,0xd41,0xcf,0xcf,0xd41,0xcf,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41, -0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xcf,0xd41, -0xd41,0xcf,0xcf,0xcf,0xd41,0xcf,0xcf,0xd41,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44, -0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd2, -0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5, -0xdf5,0xdf5,0xdf5,0x14ee,0x14ee,0x179a,0x179a,0xd8,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0, -0x10e0,0x10e0,0x10e0,0x10e0,0x1a73,0x129,0x129,0x129,0xe07,0xe07,0xe07,0xe07,0xe07,0xe07,0xe07,0xe07, -0xe07,0xe07,0xe07,0xe07,0xe07,0xe07,0xe07,0xe07,0xe07,0xe07,0xe07,0xe07,0xe07,0xe07,0xe07,0xdfe, -0xdfe,0xe04,0xe04,0xdfe,0xdb,0xdb,0xe01,0xe01,0x1110,0x1110,0x1110,0x1110,0xde,0xde,0xde,0xde, -0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f, -0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xe19,0xe16,0xe19,0xe16,0xe16,0xe0d,0xe0d,0xe0d, -0xe0d,0xe0d,0xe0d,0x115b,0x1158,0x115b,0x1158,0x1155,0x1155,0x1155,0x13e6,0x13e3,0xe1,0xe1,0xe1,0xe1, -0xe1,0xe13,0xe10,0xe10,0xe10,0xe0d,0xe13,0xe10,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c, -0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe4, -0xe4,0xe4,0xe4,0xe4,0xe4,0xe4,0xe4,0xe4,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe4, -0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe4,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe4, -0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe4,0xe22,0xe22,0xe22,0xe22,0xe22,0xe22,0xe22,0xe22, -0xe22,0xe22,0xe22,0xe22,0xe22,0xe22,0xe22,0xe22,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f, -0xe1f,0xe1f,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xea,0x13e9, -0xea,0xea,0xea,0xea,0xea,0x13e9,0xea,0xea,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c, -0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe3d,0xe31,0xe31,0xe31,0xed,0xe31,0xe31,0xed, -0xed,0xed,0xed,0xed,0xe31,0xe31,0xe31,0xe31,0xe3d,0xe3d,0xe3d,0xe3d,0xed,0xe3d,0xe3d,0xe3d, -0xed,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d, -0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0x1905,0x1905,0xed,0xed,0xe2e,0xe2e,0xe2e,0xed, -0xed,0xed,0xed,0xe34,0xe37,0xe37,0xe37,0xe37,0xe37,0xe37,0xe37,0xe37,0x1902,0xed,0xed,0xed, -0xed,0xed,0xed,0xed,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe40,0xe40,0xe37,0xed,0xed,0xed, -0xed,0xed,0xed,0xed,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0x1161,0x1161, -0xf0,0xf0,0xf0,0xf0,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4f,0xe4f,0xe4f,0xe4c,0xe4c,0xe4f,0xe4c, -0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0, -0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0x115e,0xf0,0xf0,0xf0,0xe46,0xe46, -0xe55,0xe55,0xe55,0xe55,0xf3,0xf3,0xf3,0xf3,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55, -0xe52,0xe55,0xe55,0xe55,0xe55,0xe55,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3, -0x14fd,0x1503,0x1500,0x1845,0x17a0,0x1869,0x1869,0x1869,0x1869,0x1869,0x190b,0x1908,0x190e,0x1908,0x190e,0x19cb, -0x1a67,0x1a67,0x1a67,0x1b2a,0x1b2a,0x1b24,0x1b21,0x1b24,0x1b21,0x1b24,0x1b21,0x1b24,0x1b21,0x1b27,0xf6,0xf6, -0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6, -0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6, -0xe79,0xe79,0xe79,0xe76,0xe76,0xe6d,0xe6d,0xe76,0xe73,0xe73,0xe73,0xe73,0x1a6a,0xf9,0xf9,0xf9, -0x12cc,0x12cc,0x12cc,0x12cf,0x12cf,0x12cf,0x12c6,0x12c6,0x12c9,0x12c6,0x14d,0x14d,0x14d,0x14d,0x14d,0x14d, -0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0x13f5,0x13f5,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xe7f, -0x1335,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0x1332, -0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42, -0xeac,0xe9d,0xe97,0xea9,0xea6,0xea0,0xea0,0xeaf,0xe9a,0xea3,0xff,0xff,0xff,0xff,0xff,0xff, -0xf33,0xf33,0xf1e,0xf33,0xf36,0xf39,0xf39,0xf39,0xf39,0xf39,0xf39,0xf39,0x1b2d,0x105,0x105,0x105, -0xf2d,0xf2d,0xf2d,0xf2d,0xf2d,0xf2d,0xf2d,0xf2d,0xf2d,0xf2d,0xf3f,0xf3f,0xf24,0xf2a,0xf3f,0xf3f, -0xf27,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf21,0xf21,0xf21,0xf21,0xf21, -0xf21,0xf21,0xf21,0xf21,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0x1b30,0x1b30,0x105, -0x1b39,0x1b33,0x19d1,0x19ce,0x19d1,0x19d1,0x19d1,0x1a70,0x1a6d,0x1a70,0x1a6d,0x108,0x108,0x108,0x108,0x108, -0x1b39,0x1b33,0x108,0x1b33,0x108,0x1b33,0x1b39,0x1b33,0x1b39,0x1b33,0x108,0x108,0x108,0x108,0x108,0x108, -0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x1b36,0x1b36, -0x1b36,0x1a70,0x1a6d,0x150c,0x13fe,0x13fe,0x1338,0x103b,0x103b,0x103b,0x103b,0x103b,0xf4e,0xf4e,0xf4e,0xf4e, -0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e, -0xf4b,0xf4b,0xf51,0xf51,0x10b,0x10b,0x10b,0x10b,0x10b,0x10b,0x10b,0x10b,0xf5a,0xf5a,0xf5a,0xf5a, -0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a, -0xf5a,0xf5a,0xf54,0xf54,0xf54,0xf54,0x116a,0x116a,0x10e,0x10e,0x10e,0xf57,0x1512,0x1512,0x1512,0x1512, -0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512, -0x1512,0x1512,0x1512,0x1512,0x1512,0x16f2,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111, -0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111, -0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0xf63,0xf63,0xf63,0x1518,0x1518,0x1518,0x1518,0x1518, -0x1518,0x1518,0x1518,0x1518,0x1518,0x1518,0x1518,0x114,0xf60,0xf60,0xf60,0xf60,0x1515,0x114,0x114,0x114, -0x114,0x114,0x114,0x114,0x114,0x114,0x114,0x114,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66, -0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0x191d,0x191d,0x191d,0x191d,0x191d,0x191d, -0x191d,0x117,0x117,0x117,0x117,0x117,0x117,0x117,0x1062,0x1062,0x1062,0x1062,0x105f,0x105f,0x105f,0x105f, -0x105f,0x105f,0x105f,0x105f,0x1050,0x1050,0x1050,0x1050,0x1050,0x1050,0x1050,0x1050,0x105f,0x105f,0x1056,0x1053, -0x11a,0x11a,0x11a,0x1065,0x1065,0x1059,0x1059,0x1059,0x105c,0x105c,0x105c,0x105c,0x105c,0x105c,0x105c,0x105c, -0x105c,0x105c,0x11a,0x11a,0x11a,0x1062,0x1062,0x1062,0x1068,0x1068,0x1068,0x1068,0x1068,0x1068,0x1068,0x1068, -0x1068,0x1068,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x107d,0x107d,0x107d,0x107d,0x107d,0x107d,0x107d,0x107d, -0x107d,0x107d,0x1080,0x1080,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d, -0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x10a7,0x10a7,0x10a7,0x10a7,0x10a1,0x17a6,0x120,0x120, -0x120,0x120,0x120,0x120,0x120,0x120,0x10ad,0x10ad,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4, -0x10a4,0x10a4,0x120,0x120,0x120,0x120,0x120,0x120,0x10cb,0x10cb,0x10cb,0x10cb,0x10cb,0x10cb,0x10cb,0x10bf, -0x10bf,0x10bf,0x10bf,0x10bf,0x10bf,0x10bf,0x10bf,0x10bf,0x10bf,0x10bf,0x10c5,0x10c8,0x123,0x123,0x123,0x123, -0x123,0x123,0x123,0x123,0x123,0x123,0x123,0x10c2,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da, -0x10da,0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,0x10d7,0x10d7,0x10ce,0x10ce,0x10d7,0x10d7,0x10ce,0x10ce,0x126, -0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x10da,0x10da,0x10da,0x10ce,0x10da,0x10da,0x10da,0x10da, -0x10da,0x10da,0x10da,0x10da,0x10ce,0x10d7,0x126,0x126,0x10d4,0x10d4,0x10d4,0x10d4,0x10d4,0x10d4,0x10d4,0x10d4, -0x10d4,0x10d4,0x126,0x126,0x10d1,0x10dd,0x10dd,0x10dd,0x1524,0x129,0x129,0x129,0x129,0x129,0x129,0x129, -0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129, -0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3, -0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3, -0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e6,0x12c,0x12c,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9, -0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9, -0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x12f,0x12f,0x12f,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec, -0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x132,0x132,0x132,0x132,0x132,0x132,0x132, -0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2, -0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2, -0x10f2,0x10f2,0x135,0x135,0x135,0x135,0x135,0x10ef,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5, -0x10f5,0x10f5,0x10f5,0x10f5,0x138,0x138,0x138,0x138,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8, -0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x13b,0x13b,0x13b,0x13b, -0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x1170,0x1170,0x1170,0x1170,0x1179,0x1170,0x1170,0x1170, -0x1179,0x1170,0x1170,0x1170,0x1170,0x116d,0x13e,0x13e,0x1176,0x1176,0x1176,0x1176,0x1176,0x1176,0x1176,0x117c, -0x1176,0x117c,0x1176,0x1176,0x1176,0x117c,0x117c,0x13e,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f, -0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x141,0x141, -0x141,0x141,0x141,0x141,0x141,0x141,0x141,0x141,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a, -0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x1197,0x1182,0x1197, -0x1182,0x1182,0x1182,0x1182,0x1182,0x1182,0x1182,0x144,0x118b,0x1194,0x1182,0x1194,0x1194,0x1182,0x1182,0x1182, -0x1182,0x1182,0x1182,0x1182,0x1182,0x1197,0x1197,0x1197,0x1197,0x1197,0x1197,0x1182,0x1182,0x1188,0x1188,0x1188, -0x1188,0x1188,0x1188,0x1188,0x1188,0x144,0x144,0x1185,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191, -0x1191,0x1191,0x144,0x144,0x144,0x144,0x144,0x144,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191, -0x1191,0x1191,0x144,0x144,0x144,0x144,0x144,0x144,0x118e,0x118e,0x118e,0x118e,0x118e,0x118e,0x118e,0x119d, -0x11a0,0x11a0,0x11a0,0x11a0,0x118e,0x118e,0x144,0x144,0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,0x1563, -0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,0x1560,0x1a85,0x12e1,0x12ba,0x12d8,0x12d8,0x12d8,0x12d8,0x12d8,0x12d8, -0x12d8,0x12c0,0x12bd,0x12b4,0x12b4,0x12de,0x12b4,0x12b4,0x12b4,0x12b4,0x12c3,0x149d,0x14a3,0x14a0,0x14a0,0x18e4, -0x16b9,0x16b9,0x1a52,0x147,0x147,0x147,0x147,0x147,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5, -0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11ac,0x11ac,0x11af,0x11b8,0x11b2,0x11b2,0x11b2,0x11b8, -0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5, -0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5, -0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x150,0x150,0x150,0x11d6,0x11ca,0x11ca,0x11ca,0x11ca,0x11ca,0x11ca,0x11cd, -0x11dc,0x11dc,0x11ca,0x11ca,0x11ca,0x11ca,0x153,0x12d5,0x11d0,0x11d0,0x11d0,0x11d0,0x11d0,0x11d0,0x11d0,0x11d0, -0x11d0,0x11d0,0x153,0x153,0x153,0x153,0x11ca,0x11ca,0x11fa,0x11ee,0x11fa,0x156,0x156,0x156,0x156,0x156, -0x156,0x156,0x156,0x156,0x156,0x156,0x156,0x156,0x156,0x156,0x156,0x156,0x156,0x156,0x156,0x156, -0x156,0x156,0x156,0x11f7,0x11f7,0x11fd,0x11f1,0x11f4,0x1212,0x1212,0x1212,0x120c,0x120c,0x1203,0x120c,0x120c, -0x1203,0x120c,0x120c,0x1215,0x120f,0x1206,0x159,0x159,0x1209,0x1209,0x1209,0x1209,0x1209,0x1209,0x1209,0x1209, -0x1209,0x1209,0x159,0x159,0x159,0x159,0x159,0x159,0x121b,0x121b,0x121b,0x121b,0x121b,0x121b,0x121b,0x15c, -0x15c,0x15c,0x15c,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218, -0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218, -0x15c,0x15c,0x15c,0x15c,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224, -0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x15f,0x1221,0x121e,0x121e,0x121e,0x121e, -0x121e,0x121e,0x121e,0x121e,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233, -0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x162,0x162,0x162,0x122d,0x1230,0x1230, -0x1230,0x1230,0x1230,0x1230,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239, -0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x165,0x165,0x1236,0x1236,0x1236,0x1236, -0x1236,0x1236,0x1236,0x1236,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f, -0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x168,0x168,0x168,0x168,0x168,0x123c,0x123c,0x123c,0x123c, -0x123c,0x123c,0x123c,0x123c,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245, -0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245, -0x1245,0x1245,0x1245,0x16e,0x125d,0x125d,0x1b3c,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171, -0x171,0x1926,0x171,0x171,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c, -0x147c,0x147c,0x147c,0x147c,0x1827,0x1827,0x1827,0x1827,0x1827,0x1827,0x1827,0x1827,0x1827,0x1827,0x1827,0x1827, -0x1827,0x1a76,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174, +0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39, +0x501,0x501,0x501,0x501,0x501,0x501,0x3c,0x14b5,0x3c,0x3c,0x3c,0x3c,0x3c,0x14b5,0x3c,0x3c, +0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504, +0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xe40,0xad4,0x3f,0xad4,0xad4,0xad4,0xad4,0x3f,0x3f, +0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0x3f,0xad4,0x3f,0xad4,0xad4,0xad4,0xad4,0x3f,0x3f, +0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xe40,0xad4,0x3f,0xad4,0xad4,0xad4,0xad4,0x3f,0x3f, +0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4, +0xad4,0xad4,0xad4,0xe40,0xad4,0x3f,0xad4,0xad4,0xad4,0xad4,0x3f,0x3f,0xad4,0xad4,0xad4,0xad4, +0xad4,0xad4,0xad4,0x3f,0xad4,0x3f,0xad4,0xad4,0xad4,0xad4,0x3f,0x3f,0xad4,0xad4,0xad4,0xad4, +0xad4,0xad4,0xad4,0xe40,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0x3f,0xad4,0xad4,0xad4,0xad4, +0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xe40,0xad4,0x3f,0xad4,0xad4, +0xad4,0xad4,0x3f,0x3f,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xe40,0xad4,0xad4,0xad4,0xad4, +0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0x3f, +0x3f,0x13dd,0x13dd,0xe3a,0xe3d,0xace,0xad7,0xacb,0xacb,0xacb,0xacb,0xad7,0xad7,0xad1,0xad1,0xad1, +0xad1,0xad1,0xad1,0xad1,0xad1,0xad1,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8, +0xac8,0x3f,0x3f,0x3f,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada, +0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0x17c4,0x42,0x42,0x17c1,0x17c1,0x17c1,0x17c1, +0x17c1,0x17c1,0x42,0x42,0xaec,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef, +0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xae9, +0xae6,0x45,0x45,0x45,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf2, +0xaf2,0xaf2,0xaf5,0xaf5,0xaf5,0x15a8,0x15a8,0x15a8,0x15a8,0x15a8,0x15a8,0x15a8,0x15a8,0x48,0x48,0x48, +0x48,0x48,0x48,0x48,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xaf8,0xb1f,0xb1f,0xb04,0xb04,0xb04, +0xb04,0xb04,0xafe,0xafe,0xb04,0xb01,0xb07,0xafb,0xb2b,0xb2b,0xb19,0xb25,0xb13,0xb0d,0xb16,0xb10, +0xb25,0xd56,0x4b,0x4b,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0x4b,0x4b, +0x4b,0x4b,0x4b,0x4b,0xd59,0xd59,0xd59,0xd59,0xd59,0xd59,0xd59,0xd59,0xd59,0xd59,0x4b,0x4b, +0x4b,0x4b,0x4b,0x4b,0xb37,0xb37,0xbaf,0xbb2,0xb3d,0xbac,0xb3a,0xb37,0xb40,0xb4f,0xb43,0xb52, +0xb52,0xb52,0xb2e,0x1c08,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0x4e,0x4e, +0x4e,0x4e,0x4e,0x4e,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49, +0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0x19e9,0x4e,0x4e,0x4e, +0x4e,0x4e,0x4e,0x4e,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb31,0x106e,0x4e, +0x4e,0x4e,0x4e,0x4e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e, +0x124e,0x124e,0x124e,0x124e,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x52b,0x52b,0x52b,0x52b, +0x52b,0x52b,0x52b,0x52b,0x528,0x528,0x528,0x528,0x528,0x528,0x51,0x51,0x52b,0x52b,0x52b,0x52b, +0x52b,0x52b,0x51,0x51,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x51,0x52b,0x51,0x52b, +0x51,0x52b,0x51,0x52b,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x52b,0x52b,0x52b,0x52b, +0x52b,0x52b,0x52b,0x52b,0x528,0x522,0x528,0x522,0x528,0x522,0x528,0x522,0x528,0x522,0x528,0x522, +0x528,0x522,0x51,0x51,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x52b,0x52b,0x52b,0x52b, +0x52b,0x52b,0x52b,0x52b,0x528,0x528,0x528,0x528,0x528,0x51,0x528,0x528,0x52b,0x52b,0x52b,0x525, +0x52b,0x51c,0x522,0x51c,0x51c,0x519,0x528,0x528,0x528,0x51,0x528,0x528,0x52b,0x525,0x52b,0x525, +0x52b,0x519,0x519,0x519,0x528,0x528,0x528,0x522,0x51,0x51,0x528,0x528,0x52b,0x52b,0x52b,0x525, +0x51,0x519,0x519,0x519,0x528,0x528,0x528,0x522,0x528,0x528,0x528,0x528,0x52b,0x52b,0x52b,0x525, +0x52b,0x519,0x519,0x519,0x51,0x51,0x528,0x528,0x528,0x51,0x528,0x528,0x52b,0x525,0x52b,0x525, +0x52b,0x51f,0x51c,0x51,0xc27,0xc2a,0xc2a,0xc2a,0x107a,0x54,0x1584,0x1584,0x1584,0x1584,0x534,0x534, +0x534,0x534,0x534,0x534,0x57f,0xc3c,0x57,0x57,0x726,0x57f,0x57f,0x57f,0x57f,0x57f,0x585,0x597, +0x585,0x591,0x58b,0x729,0x57c,0x723,0x723,0x723,0x723,0x57c,0x57c,0x57c,0x57c,0x57c,0x582,0x594, +0x582,0x58e,0x588,0x57,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0x13e0,0x13e0,0x13e0,0x13e0,0x13e0,0x13e0,0x13e0, +0x13e0,0x57,0x57,0x57,0x1c0b,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a, +0x5a,0x5a,0x5a,0x5a,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6, +0x5a6,0x5a3,0x5a3,0x5a3,0x5a3,0x5a6,0xb5e,0xb5e,0xc42,0xc48,0xc48,0xc45,0xc45,0xc45,0xc45,0xe52, +0xf69,0xf69,0xf69,0xf69,0x11df,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d, +0x5d,0x5d,0x5d,0x5d,0x5d6,0x5d6,0x5d6,0xb67,0xf72,0x1080,0x1080,0x1080,0x1080,0x133e,0x17ca,0x17ca, +0x60,0x60,0x60,0x60,0x750,0x750,0x750,0x750,0x750,0x750,0x750,0x750,0x750,0x750,0x5e5,0x5e5, +0x5e2,0x5e2,0x5e2,0x5e2,0x606,0x606,0x606,0x606,0x606,0xb70,0xb70,0x63,0x63,0x63,0x63,0x63, +0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63, +0x63,0x63,0x63,0x63,0x609,0x609,0x609,0x609,0x609,0x609,0x609,0x609,0x609,0x609,0x609,0x66, +0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66, +0x66,0x66,0x66,0x66,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b, +0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0x69,0xb8b, +0xb8b,0xb8b,0xb8b,0xb8e,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b, +0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8e,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69, +0x69,0x69,0x69,0x69,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91, +0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c, +0x6c,0x6c,0x6c,0x6c,0x6f,0x873,0x86d,0x873,0x86d,0x873,0x86d,0x873,0x86d,0x873,0x86d,0x86d, +0x870,0x86d,0x870,0x86d,0x870,0x86d,0x870,0x86d,0x870,0x86d,0x870,0x86d,0x870,0x86d,0x870,0x86d, +0x870,0x86d,0x870,0x86d,0x86d,0x86d,0x86d,0x873,0x86d,0x873,0x86d,0x873,0x86d,0x86d,0x86d,0x86d, +0x86d,0x86d,0x873,0x86d,0x86d,0x86d,0x86d,0x86d,0x870,0xce1,0xce1,0x6f,0x6f,0x98a,0x98a,0x951, +0x951,0x876,0x879,0xcde,0x72,0x72,0x72,0x72,0x72,0x88b,0x88b,0x88b,0x88b,0x88b,0x88b,0x88b, +0x88b,0x88b,0x88b,0x88b,0x88b,0x88b,0x88b,0x88b,0x88b,0x88b,0x88b,0x88b,0x88b,0x88b,0x88b,0x88b, +0x88b,0x88b,0x88b,0x88b,0x88b,0x11cd,0x19b0,0x1a9d,0x75,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e, +0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x75,0x95a,0x95a,0x95d,0x95d, +0x95d,0x95d,0x95d,0x95d,0x95d,0x95d,0x95d,0x95d,0x95d,0x95d,0x95d,0x95d,0x897,0x897,0x897,0x897, +0x897,0x897,0x897,0x897,0x897,0x897,0x897,0x897,0x897,0x897,0x897,0x897,0x897,0x897,0x897,0x897, +0x897,0x897,0x897,0x897,0x897,0x897,0x897,0x897,0x897,0xde0,0xde0,0x78,0xba3,0xba3,0xba3,0xba3, +0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0x7b,0x7b,0x7b,0xba9,0xba9,0xba9,0xba9, +0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xcea,0xba9,0xba9, +0xba9,0xcea,0xba9,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x1275,0x1275,0x1275,0x1275, +0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0xa1d,0xa1d,0xa1d,0xa1d, +0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x12ea,0x12ea,0x12ea,0x12ea, +0x12ea,0x12ea,0x12ea,0x12ea,0x12ea,0x12ea,0x12ea,0x12ea,0x12ea,0x12ea,0x12ea,0x12ea,0x64e,0x64e,0x64e,0x64e, +0x64e,0x64e,0x64e,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x63c, +0x63c,0x63c,0x63c,0x63c,0x84,0x84,0x84,0x84,0x84,0xb7c,0x63f,0x645,0x64b,0x64b,0x64b,0x64b, +0x64b,0x64b,0x64b,0x64b,0x64b,0x642,0x645,0x645,0x645,0x645,0x645,0x645,0x645,0x645,0x645,0x645, +0x645,0x645,0x645,0x84,0x645,0x645,0x645,0x645,0x645,0x84,0x645,0x84,0x645,0x645,0x84,0x645, +0x645,0x84,0x645,0x645,0x645,0x645,0x645,0x645,0x645,0x645,0x645,0x648,0x65a,0x654,0x65a,0x654, +0x657,0x65d,0x65a,0x654,0x657,0x65d,0x65a,0x654,0x657,0x65d,0x65a,0x654,0x13f2,0x13f2,0x1c0e,0x87, +0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x65a, +0x654,0x657,0x65d,0x65a,0x654,0x65a,0x654,0x65a,0x654,0x65a,0x65a,0x654,0x654,0x654,0x654,0x657, +0x654,0x654,0x657,0x654,0x657,0x657,0x657,0x654,0x657,0x657,0x657,0x657,0x87,0x87,0x657,0x657, +0x657,0x657,0x654,0x654,0x657,0x654,0x654,0x654,0x654,0x657,0x654,0x654,0x654,0x654,0x654,0x657, +0x657,0x657,0x654,0x654,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x1c0e,0xbc7,0xbc7,0xbc7,0xbc7, +0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0x8af,0x8c1,0x8be,0x8c1, +0x8be,0xcff,0xcff,0xdec,0xde9,0x8b2,0x8b2,0x8b2,0x8b2,0x8c4,0x8c4,0x8c4,0x8dc,0x8df,0x8ee,0x8a, +0x8e2,0x8e5,0x8f1,0x8f1,0x8d9,0x8d0,0x8ca,0x8d0,0x8ca,0x8d0,0x8ca,0x8cd,0x8cd,0x8e8,0x8e8,0x8eb, +0x8e8,0x8e8,0x8e8,0x8a,0x8e8,0x8d6,0x8d3,0x8cd,0x8a,0x8a,0x8a,0x8a,0x666,0x672,0x666,0xc7b, +0x666,0x8d,0x666,0x672,0x666,0x672,0x666,0x672,0x666,0x672,0x666,0x672,0x672,0x66f,0x669,0x66c, +0x672,0x66f,0x669,0x66c,0x672,0x66f,0x669,0x66c,0x672,0x66f,0x669,0x66f,0x669,0x66f,0x669,0x66c, +0x672,0x66f,0x669,0x66f,0x669,0x66f,0x669,0x66f,0x669,0x8d,0x8d,0x663,0x7ad,0x7b0,0x7c5,0x7c8, +0x7a7,0x7b0,0x7b0,0x93,0x78f,0x792,0x792,0x792,0x792,0x78f,0x78f,0x93,0x90,0x90,0x90,0x90, +0x90,0x90,0x90,0x90,0x90,0xb7f,0xb7f,0xb7f,0xa20,0x789,0x675,0x675,0x93,0x7d7,0x7b6,0x7a7, +0x7b0,0x7ad,0x7a7,0x7b9,0x7aa,0x7a4,0x7a7,0x7c5,0x7bc,0x7b3,0x7d4,0x7a7,0x7d1,0x7d1,0x7d1,0x7d1, +0x7d1,0x7d1,0x7d1,0x7d1,0x7d1,0x7d1,0x7c2,0x7bf,0x7c5,0x7c5,0x7c5,0x7d7,0x798,0x795,0x795,0x795, +0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x795, +0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x93,0x93,0x93,0x795,0x795, +0x795,0x795,0x795,0x795,0x93,0x93,0x795,0x795,0x795,0x795,0x795,0x795,0x93,0x93,0x795,0x795, +0x795,0x795,0x795,0x795,0x93,0x93,0x795,0x795,0x795,0x93,0x93,0x93,0xbca,0xbca,0xbca,0xbca, +0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x194d,0x194d,0x194d,0xbd0,0xbd0,0xbd0,0xbd0, +0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0x99, +0x99,0x99,0x99,0x99,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713, +0x1713,0x1713,0x1713,0x1713,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9, +0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c, +0x9c,0x9c,0x9c,0x9c,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0x9f,0x9f,0x108c,0xbe5,0xbe5, +0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5, +0xbe5,0xbe5,0xbe5,0xbe5,0x17d0,0x17d0,0x17d0,0x17d0,0x17d0,0x17d0,0x17d0,0x17d0,0x17d0,0x1c11,0x1c11,0x9f, +0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f, +0x9f,0x9f,0x9f,0x9f,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd, +0xbfd,0xbfd,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xa2,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa, +0xbfa,0xbfa,0xbfa,0xbfa,0xbfd,0xbfd,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa, +0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa, +0xbfd,0xa2,0xbfd,0xbfd,0xa2,0xa2,0xbfd,0xa2,0xa2,0xbfd,0xbfd,0xa2,0xa2,0xbfd,0xbfd,0xbfd, +0xbfd,0xa2,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfa,0xbfa,0xbfa,0xbfa,0xa2,0xbfa, +0xa2,0xbfa,0xbfa,0xbfa,0xbfa,0xd74,0xbfa,0xbfa,0xa2,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa, +0xbfa,0xbfa,0xbfa,0xbfa,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd, +0xbfd,0xbfd,0xbfd,0xbfd,0xbfa,0xbfa,0xbfa,0xbfa,0xbfd,0xbfd,0xa2,0xbfd,0xbfd,0xbfd,0xbfd,0xa2, +0xa2,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xa2,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd, +0xbfd,0xa2,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa, +0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfd,0xbfd,0xa2,0xbfd, +0xbfd,0xbfd,0xbfd,0xa2,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xa2,0xbfd,0xa2,0xa2,0xa2,0xbfd,0xbfd, +0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xa2,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa, +0xbfa,0xbfa,0xbfa,0xbfa,0xe64,0xe64,0xa2,0xa2,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd, +0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd, +0xbfa,0xbfa,0xbfa,0xbf4,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xf81,0xf7e,0xa2,0xa2,0xbf7,0xbf7, +0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7, +0xa5,0xc03,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5, +0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5, +0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0x1c17,0xc8a,0xc8a, +0xc8a,0xc8a,0xc84,0xc84,0xc87,0x1c14,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0x1c17, +0xc93,0xc93,0xc93,0xc93,0xc93,0xc93,0xc93,0xc93,0xc93,0xc93,0xc93,0xc93,0xc93,0xc93,0xc93,0xc93, +0xc93,0xc93,0xc8d,0xc8d,0xc90,0xcf3,0xcf3,0xab,0xab,0xab,0xab,0xab,0xab,0xab,0xab,0xab, +0xc99,0xc99,0xc99,0xc99,0xc99,0xc99,0xc99,0xc99,0xc99,0xc99,0xc99,0xc99,0xc99,0xc99,0xc99,0xc99, +0xc99,0xc99,0xc96,0xc96,0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae, +0xc9f,0xc9f,0xc9f,0xc9f,0xc9f,0xc9f,0xc9f,0xc9f,0xc9f,0xc9f,0xc9f,0xc9f,0xc9f,0xb1,0xc9f,0xc9f, +0xc9f,0xb1,0xc9c,0xc9c,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, +0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86, +0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0x15c9,0x15c9,0xb4, +0xd77,0xd77,0xd77,0xd83,0xd83,0xd83,0xd83,0xd77,0xd77,0xd83,0xd83,0xd83,0xb4,0xb4,0xb4,0xb4, +0xd83,0xd83,0xd77,0xd83,0xd83,0xd83,0xd83,0xd83,0xd83,0xd7a,0xd7a,0xd7a,0xb4,0xb4,0xb4,0xb4, +0xd7d,0xb4,0xb4,0xb4,0xd89,0xd89,0xd80,0xd80,0xd80,0xd80,0xd80,0xd80,0xd80,0xd80,0xd80,0xd80, +0xd8c,0xd8c,0xd8c,0xd8c,0xd8c,0xd8c,0xd8c,0xd8c,0xd8c,0xd8c,0xd8c,0xd8c,0xd8c,0xd8c,0xd8c,0xd8c, +0xd8c,0xd8c,0xb7,0xb7,0xd8c,0xd8c,0xd8c,0xd8c,0xd8c,0xb7,0xb7,0xb7,0xb7,0xb7,0xb7,0xb7, +0xb7,0xb7,0xb7,0xb7,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc, +0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0xba,0xba,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc, +0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc, +0x15cc,0x15cc,0xba,0x1b5d,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0xdb0,0xdb0,0xdb0,0xdb0, +0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xbd,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0, +0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xbd, +0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0, +0xdb0,0xdb0,0xdb0,0xbd,0xdb0,0xdb0,0xbd,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0, +0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xbd,0xbd,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0, +0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd, +0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd, +0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3, +0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3, +0xdb3,0xdb3,0xdb3,0xc0,0xc0,0xc0,0xc0,0xc0,0xdf2,0xdf2,0xdf8,0xc3,0xc3,0xc3,0xc3,0xdef, +0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef, +0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xc3,0xc3,0xc3,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5, +0xdf5,0xdf5,0xdf5,0xdf5,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9, +0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9, +0xdb9,0xdb9,0xc6,0xdb6,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2, +0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2, +0xdc2,0xdc2,0xc9,0xc9,0xdbf,0xdbf,0xdbf,0xdbf,0xdbf,0xdbf,0xdbf,0xdbf,0xdbf,0xdbf,0xc9,0xc9, +0xc9,0xc9,0xc9,0xc9,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911, +0x1911,0x1911,0x1911,0x1911,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xcc,0xcc,0xdc5,0xcc,0xdc5,0xdc5, +0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5, +0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xcc,0xdc5,0xdc5,0xcc,0xcc,0xcc,0xdc5,0xcc,0xcc,0xdc5, +0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8, +0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf, +0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0x15cf,0x15cf,0x1887,0x1887,0xd5, +0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x1b72,0x126,0x126,0x126, +0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91, +0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe88,0xe88,0xe8e,0xe8e,0xe88,0xd8,0xd8,0xe8b,0xe8b, +0x11d9,0x11d9,0x11d9,0x11d9,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0x1d43, +0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0, +0xea3,0xea0,0xea3,0xea0,0xea0,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0x122a,0x1227,0x122a,0x1227,0x1221, +0x1224,0x1224,0x14be,0x14bb,0xde,0xde,0xde,0xde,0xde,0xe9d,0xe9a,0xe9a,0xe9a,0xe97,0xe9d,0xe9a, +0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6, +0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1, +0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xe1,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xe1, +0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xe1,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xe1, +0xeac,0xeac,0xeac,0xeac,0xeac,0xeac,0xeac,0xeac,0xeac,0xeac,0xeac,0xeac,0xeac,0xeac,0xeac,0xeac, +0xea9,0xea9,0xea9,0xea9,0xea9,0xea9,0xea9,0xea9,0xea9,0xea9,0xe4,0xe4,0xe4,0xe4,0xe4,0xe4, +0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xe7,0x14c1,0xe7,0xe7,0xe7,0xe7,0xe7,0x14c1,0xe7,0xe7, +0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09, +0xec7,0xebb,0xebb,0xebb,0xea,0xebb,0xebb,0xea,0xea,0xea,0xea,0xea,0xebb,0xebb,0xebb,0xebb, +0xec7,0xec7,0xec7,0xec7,0xea,0xec7,0xec7,0xec7,0xea,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7, +0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7, +0x19f2,0x19f2,0xea,0xea,0xeb8,0xeb8,0xeb8,0xea,0xea,0xea,0xea,0xebe,0xec1,0xec1,0xec1,0xec1, +0xec1,0xec1,0xec1,0xec1,0x19ef,0xea,0xea,0xea,0xea,0xea,0xea,0xea,0xec4,0xec4,0xec4,0xec4, +0xec4,0xec4,0xeca,0xeca,0xec1,0xea,0xea,0xea,0xea,0xea,0xea,0xea,0xed6,0xed6,0xed6,0xed6, +0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0x1230,0x1230,0xed,0xed,0xed,0xed,0xed6,0xed6,0xed6,0xed6, +0xed6,0xed9,0xed9,0xed9,0xed6,0xed6,0xed9,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6, +0xed6,0xed6,0xed,0xed,0xed,0xed,0xed,0xed,0xed3,0xed3,0xed3,0xed3,0xed3,0xed3,0xed3,0xed3, +0xed3,0xed3,0x122d,0xed,0xed,0xed,0xed0,0xed0,0xedf,0xedf,0xedf,0xedf,0xf0,0xf0,0xf0,0xf0, +0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedc,0xedf,0xedf,0xedf,0xedf,0xedf,0xf0,0xf0, +0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0x15de,0x15e4,0x15e1,0x1932,0x188d,0x1956,0x1956,0x1956, +0x1956,0x1956,0x19f8,0x19f5,0x19fb,0x19f5,0x19fb,0x1abe,0x1b60,0x1b60,0x1b60,0x1c29,0x1c29,0x1c23,0x1c20,0x1c23, +0x1c20,0x1c23,0x1c20,0x1c23,0x1c20,0x1c26,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3, +0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3, +0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf06,0xf06,0xf06,0xf03,0xf03,0xefa,0xefa,0xf03, +0xf00,0xf00,0xf00,0xf00,0x1b63,0xf6,0xf6,0xf6,0x1395,0x1395,0x1395,0x1398,0x1398,0x1398,0x139b,0x139b, +0x139e,0x139b,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0x14d0,0x14d0, +0xf9,0xf9,0xf9,0xf9,0xf9,0xf9,0xf9,0xf0c,0x1404,0xf9,0xf9,0xf9,0xf9,0xf9,0xf9,0xf9, +0xf9,0xf9,0xf9,0xf9,0xf9,0xf9,0xf9,0x1401,0xcc3,0xcc3,0xcc3,0xcc3,0xcc3,0xcc3,0xcc3,0xcc3, +0xcc3,0xcc3,0xcc3,0xcc3,0xcc3,0xcc3,0xcc3,0xcc3,0xf3c,0xf2d,0xf27,0xf39,0xf36,0xf30,0xf30,0xf3f, +0xf2a,0xf33,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc9,0xfc9,0xfb1,0xfc9,0xfcc,0xfcf,0xfcf,0xfcf, +0xfcf,0xfcf,0xfcf,0xfcf,0x1c2c,0x102,0x102,0x102,0xfc3,0xfc3,0xfc3,0xfc3,0xfc3,0xfc3,0xfc3,0xfc3, +0xfc3,0xfc3,0xfd5,0xfd5,0xfbd,0xfc0,0xfd5,0xfd5,0xfba,0xfbd,0xfbd,0xfbd,0xfbd,0xfbd,0xfbd,0xfbd, +0xfbd,0xfbd,0xfbd,0xfb7,0xfb7,0xfb7,0xfb7,0xfb7,0xfb7,0xfb7,0xfb7,0xfb7,0xfbd,0xfbd,0xfbd,0xfbd, +0xfbd,0xfbd,0xfbd,0xfbd,0xfbd,0x1c2f,0x1c2f,0x102,0x1c38,0x1c35,0x1aca,0x1ac7,0x1aca,0x1aca,0x1aca,0x1b6f, +0x1b6c,0x1b6f,0x1b6c,0x105,0x105,0x105,0x105,0x105,0x1c38,0x1c35,0x105,0x1c35,0x105,0x1c35,0x1c38,0x1c35, +0x1c38,0x1c35,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105, +0x105,0x105,0x105,0x105,0x105,0x105,0x1c32,0x1c32,0x1c32,0x1b69,0x1b66,0x15ed,0x14d9,0x14d9,0x140d,0x10ef, +0x10ef,0x10ef,0x10ef,0x10ef,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0, +0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xfed,0xfed,0xff3,0xff3,0x108,0x108,0x108,0x108, +0x108,0x108,0x108,0x108,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc, +0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xff6,0xff6,0xff6,0xff6,0x1239,0x1239, +0x10b,0x10b,0x10b,0xff9,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3, +0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x17df,0x10e,0x10e, +0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e, +0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e, +0x1005,0x1005,0x1005,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x111, +0x1002,0x1002,0x1002,0x1002,0x15f6,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111, +0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008, +0x1008,0x1008,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x114,0x114,0x114,0x114,0x114,0x114,0x114, +0x1125,0x1125,0x1125,0x1125,0x1122,0x1122,0x1122,0x1122,0x1122,0x1122,0x1122,0x1122,0x1113,0x1113,0x1113,0x1113, +0x1113,0x1113,0x1113,0x1113,0x1122,0x1122,0x1119,0x1116,0x117,0x117,0x117,0x1128,0x1128,0x111c,0x111c,0x111c, +0x111f,0x111f,0x111f,0x111f,0x111f,0x111f,0x111f,0x111f,0x111f,0x111f,0x117,0x117,0x117,0x1125,0x1125,0x1125, +0x112b,0x112b,0x112b,0x112b,0x112b,0x112b,0x112b,0x112b,0x112b,0x112b,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e, +0x1140,0x1140,0x1140,0x1140,0x1140,0x1140,0x1140,0x1140,0x1140,0x1140,0x1146,0x1146,0x11a,0x11a,0x11a,0x11a, +0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a, +0x1170,0x1170,0x1170,0x1170,0x116a,0x1893,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x1176,0x1176, +0x116d,0x116d,0x116d,0x116d,0x116d,0x116d,0x116d,0x116d,0x116d,0x116d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d, +0x1194,0x1194,0x1194,0x1194,0x1194,0x1194,0x1194,0x1188,0x1188,0x1188,0x1188,0x1188,0x1188,0x1188,0x1188,0x1188, +0x1188,0x1188,0x118e,0x1191,0x120,0x120,0x120,0x120,0x120,0x120,0x120,0x120,0x120,0x120,0x120,0x118b, +0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x1197,0x1197,0x1197,0x1197,0x1197,0x1197,0x11a0, +0x11a0,0x1197,0x1197,0x11a0,0x11a0,0x1197,0x1197,0x123,0x123,0x123,0x123,0x123,0x123,0x123,0x123,0x123, +0x11a3,0x11a3,0x11a3,0x1197,0x11a3,0x11a3,0x11a3,0x11a3,0x11a3,0x11a3,0x11a3,0x11a3,0x1197,0x11a0,0x123,0x123, +0x119d,0x119d,0x119d,0x119d,0x119d,0x119d,0x119d,0x119d,0x119d,0x119d,0x123,0x123,0x119a,0x11a9,0x11a9,0x11a9, +0x1605,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126, +0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126, +0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af, +0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11b2,0x129,0x129, +0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5, +0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x12c,0x12c,0x12c, +0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8, +0x11b8,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f, +0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be, +0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x132,0x132,0x132,0x132,0x132,0x11bb, +0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x135,0x135,0x135,0x135, +0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4, +0x11c4,0x11c4,0x11c4,0x11c4,0x138,0x138,0x138,0x138,0x138,0x138,0x138,0x138,0x138,0x138,0x138,0x138, +0x123f,0x123f,0x123f,0x123f,0x1248,0x123f,0x123f,0x123f,0x1248,0x123f,0x123f,0x123f,0x123f,0x123c,0x13b,0x13b, +0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x124b,0x1245,0x124b,0x1245,0x1245,0x1245,0x124b,0x124b,0x13b, +0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e, +0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x13e,0x13e,0x13e,0x13e,0x13e,0x13e,0x13e,0x13e,0x13e,0x13e, +0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269, +0x1269,0x1269,0x1269,0x1269,0x1269,0x1266,0x1251,0x1266,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x141, +0x125a,0x1263,0x1251,0x1263,0x1263,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1266,0x1266,0x1266, +0x1266,0x1266,0x1266,0x1251,0x1251,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x141,0x141,0x1254, +0x1260,0x1260,0x1260,0x1260,0x1260,0x1260,0x1260,0x1260,0x1260,0x1260,0x141,0x141,0x141,0x141,0x141,0x141, +0x1260,0x1260,0x1260,0x1260,0x1260,0x1260,0x1260,0x1260,0x1260,0x1260,0x141,0x141,0x141,0x141,0x141,0x141, +0x125d,0x125d,0x125d,0x125d,0x125d,0x125d,0x125d,0x126c,0x126f,0x126f,0x126f,0x126f,0x125d,0x125d,0x141,0x141, +0x1647,0x1647,0x1647,0x1647,0x1647,0x1647,0x1647,0x1647,0x1647,0x1647,0x1647,0x1647,0x1647,0x1647,0x1644,0x1b84, +0x13b0,0x1389,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x138f,0x138c,0x1383,0x1383,0x13ad,0x1383,0x1383, +0x1383,0x1383,0x1392,0x1578,0x157e,0x157b,0x157b,0x19d1,0x17a6,0x17a6,0x1b4b,0x144,0x144,0x144,0x144,0x144, +0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284, +0x127b,0x127b,0x127e,0x1287,0x1281,0x1281,0x1281,0x1287,0x147,0x147,0x147,0x147,0x147,0x147,0x147,0x147, +0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374, +0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x14d,0x14d,0x14d, +0x12a5,0x1299,0x1299,0x1299,0x1299,0x1299,0x1299,0x129c,0x12ab,0x12ab,0x1299,0x1299,0x1299,0x1299,0x150,0x13a4, +0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x150,0x150,0x150,0x150,0x1299,0x1299, +0x12c9,0x12bd,0x12c9,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153, +0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x12c6,0x12c6,0x12cc,0x12c0,0x12c3, +0x12e1,0x12e1,0x12e1,0x12db,0x12db,0x12d2,0x12db,0x12db,0x12d2,0x12db,0x12db,0x12e4,0x12de,0x12d5,0x156,0x156, +0x12d8,0x12d8,0x12d8,0x12d8,0x12d8,0x12d8,0x12d8,0x12d8,0x12d8,0x12d8,0x156,0x156,0x156,0x156,0x156,0x156, +0x12ea,0x12ea,0x12ea,0x12ea,0x12ea,0x12ea,0x12ea,0x159,0x159,0x159,0x159,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7, +0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7, +0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x159,0x159,0x159,0x159,0x12f3,0x12f3,0x12f3,0x12f3, +0x12f3,0x12f3,0x12f3,0x12f3,0x12f3,0x12f3,0x12f3,0x12f3,0x12f3,0x12f3,0x12f3,0x12f3,0x12f3,0x12f3,0x12f3,0x12f3, +0x12f3,0x12f3,0x15c,0x12f0,0x12ed,0x12ed,0x12ed,0x12ed,0x12ed,0x12ed,0x12ed,0x12ed,0x1302,0x1302,0x1302,0x1302, +0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302, +0x1302,0x1302,0x15f,0x15f,0x15f,0x12fc,0x12ff,0x12ff,0x12ff,0x12ff,0x12ff,0x12ff,0x1308,0x1308,0x1308,0x1308, +0x1308,0x1308,0x1308,0x1308,0x1308,0x1308,0x1308,0x1308,0x1308,0x1308,0x1308,0x1308,0x1308,0x1308,0x1308,0x1308, +0x1308,0x1308,0x162,0x162,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x130e,0x130e,0x130e,0x130e, +0x130e,0x130e,0x130e,0x130e,0x130e,0x130e,0x130e,0x130e,0x130e,0x130e,0x130e,0x130e,0x130e,0x130e,0x130e,0x165, +0x165,0x165,0x165,0x165,0x130b,0x130b,0x130b,0x130b,0x130b,0x130b,0x130b,0x130b,0x1314,0x1314,0x1314,0x1314, +0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314, +0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x16b,0x132c,0x132c,0x1c3b,0x16e, +0x16e,0x16e,0x16e,0x16e,0x16e,0x16e,0x16e,0x16e,0x16e,0x1a16,0x16e,0x16e,0x1557,0x1557,0x1557,0x1557, +0x1557,0x1557,0x1557,0x1557,0x1557,0x1557,0x1557,0x1557,0x1557,0x1557,0x1557,0x1557,0x1914,0x1914,0x1914,0x1914, +0x1914,0x1914,0x1914,0x1914,0x1914,0x1914,0x1914,0x1914,0x1914,0x1b75,0x171,0x171,0x171,0x171,0x171,0x171, +0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171, +0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x1419,0x1419, +0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419, +0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x137d,0x147f,0x147f,0x174,0x174,0x174,0x174,0x174, +0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x137a,0x137a,0x137a,0x137a,0x137a,0x137a,0x137a,0x137a, +0x137a,0x137a,0x137a,0x137a,0x137a,0x137a,0x137a,0x137a,0x137a,0x137a,0x147f,0x147f,0x147f,0x147f,0x147f,0x147f, +0x147f,0x147f,0x147f,0x1917,0x174,0x174,0x174,0x174,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377, +0x1377,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x14a3,0x14a3,0x174,0x174,0x174,0x174,0x174,0x174, +0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x19b6,0x19b6,0x19b6,0x19b6,0x19b6,0x19b6,0x174,0x174, 0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174, -0x174,0x174,0x174,0x174,0x174,0x174,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344, -0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344, -0x12ae,0x13a7,0x13a7,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177, -0x12ab,0x12ab,0x12ab,0x12ab,0x12ab,0x12ab,0x12ab,0x12ab,0x12ab,0x12ab,0x12ab,0x12ab,0x12ab,0x12ab,0x12ab,0x12ab, -0x12ab,0x12ab,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x182a,0x177,0x177,0x177,0x177, -0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x177,0x177,0x177,0x177,0x177,0x177,0x177, -0x13cb,0x13cb,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177, -0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177, -0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177, -0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d, -0x134d,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d, -0x134d,0x1347,0x1347,0x1347,0x17a,0x17a,0x134a,0x17a,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x1350,0x1359, -0x1353,0x1353,0x1359,0x1359,0x1359,0x1353,0x1359,0x1353,0x1353,0x1353,0x135c,0x135c,0x17d,0x17d,0x17d,0x17d, -0x17d,0x17d,0x17d,0x17d,0x1356,0x1356,0x1356,0x1356,0x180,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x180, -0x180,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x180,0x180,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x180, -0x180,0x180,0x180,0x180,0x180,0x180,0x180,0x180,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x180, -0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x180,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0, -0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1368,0x137a, -0x137a,0x136e,0x136e,0x136e,0x136e,0x136e,0x183,0x183,0x183,0x183,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b, -0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371, -0x1371,0x1371,0x1371,0x1371,0x1b42,0x1b45,0x1b45,0x1b3f,0x1b3f,0x1b45,0x183,0x183,0x183,0x183,0x183,0x183, -0x183,0x183,0x183,0x1533,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d, -0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x186,0x186,0x186, -0x186,0x186,0x186,0x186,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380, -0x1380,0x1380,0x1380,0x189,0x189,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380, -0x1380,0x1380,0x1380,0x1536,0x189,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380, -0x1380,0x1380,0x1380,0x13b0,0x189,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380, -0x1380,0x1380,0x1380,0x1380,0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x1536, -0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x189,0x189,0x189,0x189,0x189,0x189, -0x189,0x189,0x189,0x189,0x13c5,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542, -0x16b0,0x1542,0x1542,0x1542,0x1782,0x1833,0x1833,0x186c,0x186c,0x1a34,0x1adf,0x1adf,0x18c,0x18c,0x18c,0x18c, -0x1c2c,0x1bae,0x1bae,0x1bae,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x16ad, -0x16ad,0x18c,0x18c,0x18c,0x1542,0x1542,0x1542,0x1542,0x1833,0x1833,0x1833,0x18cf,0x18cf,0x19b0,0x1a34,0x1adf, -0x1adf,0x18c,0x18c,0x18c,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383, -0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1bd2,0x1bd2,0x1bd2,0x18f,0x18f,0x18f,0x18f,0x1bd2, -0x1bd2,0x1bd2,0x1bd2,0x1bd2,0x141f,0x141f,0x141f,0x141f,0x192,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f, -0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f, -0x141f,0x141f,0x141f,0x141f,0x192,0x141f,0x141f,0x192,0x141f,0x192,0x192,0x141f,0x192,0x141f,0x141f,0x141f, -0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x192,0x141f,0x141f,0x141f,0x141f,0x192,0x141f,0x192,0x141f, -0x192,0x192,0x192,0x192,0x192,0x192,0x141f,0x192,0x192,0x192,0x192,0x141f,0x192,0x141f,0x192,0x141f, -0x192,0x141f,0x141f,0x141f,0x192,0x141f,0x141f,0x192,0x141f,0x192,0x192,0x141f,0x192,0x141f,0x192,0x141f, -0x192,0x141f,0x192,0x141f,0x192,0x141f,0x141f,0x192,0x141f,0x192,0x192,0x141f,0x141f,0x141f,0x141f,0x192, -0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x192,0x141f,0x141f,0x141f,0x141f,0x192,0x141f,0x141f,0x141f, -0x141f,0x192,0x141f,0x192,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x192,0x141f, -0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f, -0x192,0x192,0x192,0x192,0x192,0x141f,0x141f,0x141f,0x192,0x141f,0x141f,0x141f,0x141f,0x141f,0x192,0x141f, -0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f, -0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192, -0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192, -0x141c,0x141c,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192, -0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1422,0x1422,0x1422,0x1422,0x1422,0x1431,0x1422,0x1425,0x1425, -0x1422,0x1422,0x1422,0x1428,0x1428,0x195,0x142e,0x142e,0x142e,0x142e,0x142e,0x142e,0x142e,0x142e,0x142e,0x142e, -0x142b,0x1437,0x1437,0x1437,0x1932,0x192f,0x192f,0x1a7c,0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195, -0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2, -0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1440,0x143a,0x143a,0x1440,0x1440, -0x1449,0x1449,0x1443,0x1446,0x1446,0x1440,0x143d,0x198,0x198,0x198,0x198,0x198,0x198,0x198,0x198,0x198, -0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c, -0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x19b,0x19b,0x19b,0x19b,0x1707,0x1707,0x144c,0x144c, +0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174, +0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422, +0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x141c,0x141c,0x141c,0x177,0x177,0x141f,0x177, +0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1425,0x142e,0x1428,0x1428,0x142e,0x142e,0x142e,0x1428,0x142e,0x1428, +0x1428,0x1428,0x1431,0x1431,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x142b,0x142b,0x142b,0x142b, +0x17d,0x1437,0x1437,0x1437,0x1437,0x1437,0x1437,0x17d,0x17d,0x1437,0x1437,0x1437,0x1437,0x1437,0x1437,0x17d, +0x17d,0x1437,0x1437,0x1437,0x1437,0x1437,0x1437,0x17d,0x17d,0x17d,0x17d,0x17d,0x17d,0x17d,0x17d,0x17d, +0x1437,0x1437,0x1437,0x1437,0x1437,0x1437,0x1437,0x17d,0x1437,0x1437,0x1437,0x1437,0x1437,0x1437,0x1437,0x17d, +0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa, +0x143a,0x143a,0x143a,0x143a,0x143a,0x143a,0x143d,0x1452,0x1452,0x1443,0x1443,0x1443,0x1443,0x1443,0x180,0x180, +0x180,0x180,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440, +0x1440,0x1440,0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,0x1c41,0x1c44,0x1c44,0x1c3e, +0x1c3e,0x1c44,0x180,0x180,0x180,0x180,0x180,0x180,0x180,0x180,0x180,0x1614,0x1455,0x1455,0x1455,0x1455, +0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455, +0x1455,0x1455,0x1455,0x1455,0x1455,0x183,0x183,0x183,0x183,0x183,0x183,0x183,0x1458,0x1458,0x1458,0x1458, +0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x186,0x186,0x1458,0x1458,0x1458, +0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1617,0x186,0x1458,0x1458,0x1458, +0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1488,0x186,0x1458,0x1458,0x1458, +0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1617,0x1617,0x1617,0x1617, +0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617, +0x1617,0x1617,0x186,0x186,0x186,0x186,0x186,0x186,0x186,0x186,0x186,0x186,0x149d,0x149a,0x149a,0x149a, +0x149a,0x149a,0x1623,0x1623,0x1623,0x1623,0x1623,0x1623,0x179d,0x1623,0x1623,0x1623,0x186f,0x1920,0x1920,0x1959, +0x1959,0x1b2d,0x1bde,0x1bde,0x189,0x189,0x189,0x189,0x1d2b,0x1cad,0x1cad,0x1cad,0x1623,0x1623,0x1623,0x1623, +0x1623,0x1623,0x1623,0x1623,0x1623,0x1623,0x1623,0x179a,0x179a,0x189,0x189,0x189,0x1623,0x1623,0x1623,0x1623, +0x1920,0x1920,0x1920,0x19bc,0x19bc,0x1aa3,0x1b2d,0x1bde,0x1bde,0x189,0x189,0x189,0x145b,0x145b,0x145b,0x145b, +0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b, +0x1cd1,0x1cd1,0x1cd1,0x18c,0x18c,0x18c,0x18c,0x1cd1,0x1cd1,0x1cd1,0x1cd1,0x1cd1,0x14fa,0x14fa,0x14fa,0x14fa, +0x18f,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa, +0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x18f,0x14fa,0x14fa,0x18f, +0x14fa,0x18f,0x18f,0x14fa,0x18f,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x18f, +0x14fa,0x14fa,0x14fa,0x14fa,0x18f,0x14fa,0x18f,0x14fa,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x14fa,0x18f, +0x18f,0x18f,0x18f,0x14fa,0x18f,0x14fa,0x18f,0x14fa,0x18f,0x14fa,0x14fa,0x14fa,0x18f,0x14fa,0x14fa,0x18f, +0x14fa,0x18f,0x18f,0x14fa,0x18f,0x14fa,0x18f,0x14fa,0x18f,0x14fa,0x18f,0x14fa,0x18f,0x14fa,0x14fa,0x18f, +0x14fa,0x18f,0x18f,0x14fa,0x14fa,0x14fa,0x14fa,0x18f,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x18f, +0x14fa,0x14fa,0x14fa,0x14fa,0x18f,0x14fa,0x14fa,0x14fa,0x14fa,0x18f,0x14fa,0x18f,0x14fa,0x14fa,0x14fa,0x14fa, +0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x18f,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa, +0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x18f,0x18f,0x18f,0x18f,0x18f,0x14fa,0x14fa,0x14fa, +0x18f,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x18f,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa, +0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f, +0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f, +0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x14f7,0x14f7,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f, +0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x14fd, +0x14fd,0x14fd,0x14fd,0x14fd,0x150c,0x14fd,0x1500,0x1500,0x14fd,0x14fd,0x14fd,0x1503,0x1503,0x192,0x1509,0x1509, +0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1506,0x1512,0x1512,0x1512,0x1a22,0x1a1f,0x1a1f,0x1b7b, +0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc, +0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x151e,0x151e,0x151e,0x151e,0x151e,0x151e,0x151e,0x151e, +0x151e,0x151e,0x151e,0x151b,0x1515,0x1515,0x151b,0x151b,0x1524,0x1524,0x151e,0x1521,0x1521,0x151b,0x1518,0x195, +0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527, +0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527, +0x198,0x198,0x198,0x198,0x17f4,0x17f4,0x1527,0x1527,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4, +0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x198,0x198,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4, +0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x1533,0x1533,0x1533,0x1533,0x1533,0x1ad6,0x1ad6,0x1ad6, +0x1ad6,0x1ad6,0x1ad6,0x19b,0x19b,0x19b,0x19b,0x1ad0,0x1533,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530, +0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1ad3,0x1ad3,0x1ad3,0x1ad3,0x1ad3,0x1ad3,0x1ad3,0x1ad3, +0x19b,0x19b,0x19b,0x19b,0x19b,0x19b,0x19b,0x152d,0x152d,0x152d,0x152d,0x1536,0x1536,0x1536,0x1536,0x1536, +0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x1557,0x1557,0x1557,0x1557,0x1557,0x1557,0x1557,0x1557, +0x1557,0x19e,0x19e,0x19e,0x19e,0x19e,0x19e,0x19e,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554, +0x1554,0x1554,0x19e,0x19e,0x19e,0x19e,0x19e,0x19e,0x155a,0x155a,0x155a,0x155a,0x155a,0x155a,0x155a,0x155a, +0x1a1,0x1a1,0x1a1,0x1a1,0x1a1,0x1a1,0x1a1,0x1a1,0x13aa,0x13a7,0x13aa,0x1386,0x13a7,0x13ad,0x13ad,0x13b0, +0x13ad,0x13b0,0x13b3,0x13a7,0x13b0,0x13b0,0x13a7,0x13a7,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c, +0x156c,0x156c,0x156c,0x155d,0x1566,0x155d,0x1566,0x1566,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x1569,0x1560, +0x1ad9,0x1c50,0x1a4,0x1a4,0x1a4,0x1a4,0x1a4,0x1a4,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638, +0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1a7,0x1a7,0x1635,0x1635,0x1635,0x1635,0x1635,0x163b,0x1a7,0x1a7, +0x1a7,0x1a7,0x1a7,0x1a7,0x1a7,0x1a7,0x1a7,0x1a7,0x1641,0x1641,0x1641,0x1641,0x1aa,0x1aa,0x1aa,0x1aa, +0x1aa,0x1aa,0x1aa,0x1aa,0x1aa,0x1aa,0x1aa,0x163e,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b, +0x1c9b,0x1c9b,0x1c9b,0x2af,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x17a9,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0, +0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0, +0x17a0,0x17a0,0x17a0,0x17a0,0x1ad,0x1ad,0x1ad,0x1ad,0x1b84,0x1c56,0x1c56,0x1c56,0x1c56,0x1c56,0x1c56,0x1c56, +0x1c56,0x1c56,0x1c56,0x1c56,0x1c53,0x1c53,0x1c53,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0, +0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0, +0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653, +0x1653,0x1653,0x1653,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653, +0x1653,0x1653,0x1653,0x1653,0x1653,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1653,0x1653,0x1653,0x1653, +0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1b3,0x1b3,0x1650,0x164a,0x164d,0x1656,0x1659,0x1659,0x1659,0x1659, +0x1659,0x1659,0x1659,0x1659,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x165c,0x165c,0x165c,0x165c, +0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c, +0x165c,0x1a25,0x1a25,0x1a25,0x1a25,0x1cd4,0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x1b30,0x1b30,0x1b30,0x1b30, +0x1b30,0x1b30,0x1b30,0x1b30,0x1b30,0x1b30,0x1b30,0x1b30,0x1b9,0x1b9,0x1b9,0x1b9,0x1cb0,0x1b9,0x1b9,0x1b9, +0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x1809,0x17ac,0x1665,0x17b2, +0x1bc,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1bc,0x1bc,0x1671,0x1671,0x1bc,0x1bc,0x1671, +0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1bc,0x1671,0x1671, +0x1671,0x1671,0x1671,0x1671,0x1671,0x1bc,0x1671,0x1671,0x1bc,0x1671,0x1671,0x1671,0x1671,0x1671,0x1bc,0x1aaf, +0x17af,0x166e,0x165f,0x1665,0x165f,0x1665,0x1665,0x1665,0x1665,0x1bc,0x1bc,0x1665,0x1665,0x1bc,0x1bc,0x1668, +0x1668,0x166b,0x1bc,0x1bc,0x180c,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x165f,0x1bc,0x1bc,0x1bc,0x1bc, +0x1bc,0x1677,0x1674,0x1674,0x1671,0x1671,0x1665,0x1665,0x1bc,0x1bc,0x1662,0x1662,0x1662,0x1662,0x1662,0x1662, +0x1662,0x1bc,0x1bc,0x1bc,0x1662,0x1662,0x1662,0x1662,0x1662,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc, +0x1bc,0x1bc,0x1bc,0x1bc,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c, +0x168c,0x168c,0x168c,0x168c,0x168c,0x168c,0x1bf,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c, +0x168c,0x168c,0x168c,0x168c,0x169e,0x169e,0x169e,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1695,0x1698,0x1c2, +0x1c2,0x1c2,0x1c2,0x1c2,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x1c2,0x1c2, +0x1c2,0x1c2,0x1c2,0x1c2,0x180f,0x180f,0x180f,0x180f,0x16aa,0x16a7,0x1adc,0x1adc,0x1b8a,0x1b8d,0x1b87,0x1b87, +0x1c5,0x1c5,0x1c5,0x1c5,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c, +0x183c,0x183c,0x183c,0x183c,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0, +0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8, +0x1c8,0x1c8,0x1c8,0x1c8,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0, +0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8, +0x1c8,0x1c8,0x1c8,0x1c8,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x1c8,0x1c8,0x1c8,0x1c8, +0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8, +0x1c8,0x1c8,0x1c8,0x1c8,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc, +0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16b3,0x16b6,0x16b9,0x16bc,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb, +0x1cb,0x1cb,0x1cb,0x1cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16bf,0x16bf,0x1ce,0x1ce,0x1ce,0x1ce,0x16c2, +0x16c2,0x16c2,0x16c2,0x16c2,0x16c8,0x16c8,0x17b5,0x16c8,0x16c8,0x16c8,0x16c5,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce, +0x1ce,0x1ce,0x1ce,0x1ce,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x1d1,0x1d1,0x16d1,0x16d1,0x16d1,0x16d1,0x16d1, +0x16d1,0x16d1,0x16d1,0x16d1,0x16ce,0x16ce,0x16ce,0x16ce,0x16ce,0x16ce,0x16ce,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1, +0x1d1,0x1d1,0x1d1,0x1d1,0x16d7,0x16e9,0x16e9,0x16dd,0x16e6,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4, +0x1d4,0x1d4,0x1d4,0x1d4,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x1d4,0x1d4, +0x1d4,0x1d4,0x1d4,0x1d4,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef, +0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef, +0x16ef,0x16ef,0x16ef,0x1d7,0x16ec,0x16ec,0x16ec,0x16ec,0x16ec,0x16ec,0x16ec,0x16ec,0x16ec,0x16ec,0x1d7,0x1d7, +0x1d7,0x1d7,0x16f2,0x16f2,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c, +0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x16fb,0x16fb,0x16fb,0x16fb,0x16fb,0x16f5,0x1701,0x16fe,0x16fe,0x16fe,0x16fe,0x16fe, +0x16fe,0x16fe,0x16fe,0x16fe,0x16f8,0x16f8,0x16f8,0x16f8,0x16f8,0x16f8,0x16f8,0x16f8,0x16f8,0x16f8,0x16fe,0x16fe, +0x16fe,0x16fe,0x16fe,0x1da,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707, 0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707, -0x19b,0x19b,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707, -0x1458,0x1458,0x1458,0x1458,0x1458,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19e,0x19e,0x19e,0x19e,0x19d7, -0x1458,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455, -0x19da,0x19da,0x19da,0x19da,0x19da,0x19da,0x19da,0x19da,0x19e,0x19e,0x19e,0x19e,0x19e,0x19e,0x19e,0x1452, -0x1452,0x1452,0x1452,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b, -0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x1a1,0x1a1,0x1a1,0x1a1,0x1a1,0x1a1,0x1a1, -0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1a1,0x1a1,0x1a1,0x1a1,0x1a1,0x1a1, -0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x1a4,0x1a4,0x1a4,0x1a4,0x1a4,0x1a4,0x1a4,0x1a4, -0x12db,0x12d8,0x12db,0x12b7,0x12d8,0x12de,0x12de,0x12e1,0x12de,0x12e1,0x12e4,0x12d8,0x12e1,0x12e1,0x12d8,0x12d8, -0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1482,0x148b,0x1482,0x148b,0x148b, -0x1482,0x1482,0x1482,0x1482,0x1482,0x1482,0x148e,0x1485,0x19e0,0x1b51,0x1a7,0x1a7,0x1a7,0x1a7,0x1a7,0x1a7, -0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1aa,0x1aa, -0x1551,0x1551,0x1551,0x1551,0x1551,0x1557,0x1aa,0x1aa,0x1aa,0x1aa,0x1aa,0x1aa,0x1aa,0x1aa,0x1aa,0x1aa, -0x155d,0x155d,0x155d,0x155d,0x1ad,0x1ad,0x1ad,0x1ad,0x1ad,0x1ad,0x1ad,0x1ad,0x1ad,0x1ad,0x1ad,0x155a, -0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x2b2,0x1b9c,0x1b9c,0x1b9c,0x1b9c, -0x16bc,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3, -0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x1b0,0x1b0,0x1b0,0x1b0, -0x1a85,0x1b57,0x1b57,0x1b57,0x1b57,0x1b57,0x1b57,0x1b57,0x1b57,0x1b57,0x1b57,0x1b57,0x1b54,0x1b54,0x1b54,0x1b3, -0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3, -0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3, -0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6, -0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x1b6,0x1b6,0x1b6, -0x1b6,0x1b6,0x1b6,0x1b6,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x1b6,0x1b6, -0x156c,0x1566,0x1569,0x1572,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1b9,0x1b9,0x1b9,0x1b9, -0x1b9,0x1b9,0x1b9,0x1b9,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d, -0x155d,0x155d,0x155d,0x155d,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578, -0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1935,0x1935,0x1935,0x1935,0x1bd5,0x1bc,0x1bc, -0x1bc,0x1bc,0x1bc,0x1bc,0x1a37,0x1a37,0x1a37,0x1a37,0x1a37,0x1a37,0x1a37,0x1a37,0x1a37,0x1a37,0x1a37,0x1a37, -0x1bc,0x1bc,0x1bc,0x1bc,0x1bb1,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc, -0x1bc,0x1bc,0x1bc,0x1bc,0x171c,0x16bf,0x1581,0x16c5,0x1bf,0x158a,0x158a,0x158a,0x158a,0x158a,0x158a,0x158a, -0x158a,0x1bf,0x1bf,0x158a,0x158a,0x1bf,0x1bf,0x158a,0x158a,0x158a,0x158a,0x158a,0x158a,0x158a,0x158a,0x158a, -0x158a,0x158a,0x158a,0x158a,0x158a,0x1bf,0x158a,0x158a,0x158a,0x158a,0x158a,0x158a,0x158a,0x1bf,0x158a,0x158a, -0x1bf,0x158a,0x158a,0x158a,0x158a,0x158a,0x1bf,0x19bc,0x16c2,0x158a,0x157b,0x1581,0x157b,0x1581,0x1581,0x1581, -0x1581,0x1bf,0x1bf,0x1581,0x1581,0x1bf,0x1bf,0x1584,0x1584,0x1587,0x1bf,0x1bf,0x171f,0x1bf,0x1bf,0x1bf, -0x1bf,0x1bf,0x1bf,0x157b,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x158d,0x158a,0x158a,0x158a,0x158a,0x1581,0x1581, -0x1bf,0x1bf,0x157e,0x157e,0x157e,0x157e,0x157e,0x157e,0x157e,0x1bf,0x1bf,0x1bf,0x157e,0x157e,0x157e,0x157e, -0x157e,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x15a2,0x15a2,0x15a2,0x15a2, -0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x1c2,0x15a2, -0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15b4,0x15b4,0x15b4,0x15a8, -0x15a8,0x15a8,0x15a8,0x15a8,0x15a8,0x15ab,0x15ae,0x1c5,0x1c5,0x1c5,0x1c5,0x1c5,0x15b1,0x15b1,0x15b1,0x15b1, -0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x1c5,0x1c5,0x1c5,0x1c5,0x1c5,0x1c5,0x1722,0x1722,0x1722,0x1722, -0x15c0,0x15bd,0x19e3,0x19e3,0x1a8b,0x1a8e,0x1a88,0x1a88,0x1c8,0x1c8,0x1c8,0x1c8,0x174f,0x174f,0x174f,0x174f, -0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x15c6,0x15c6,0x15c6,0x15c6, -0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6, -0x15c6,0x15c6,0x15c6,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x15c6,0x15c6,0x15c6,0x15c6, -0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6, -0x15c6,0x15c6,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x15c6,0x15c6,0x15c6,0x15c6, -0x15c6,0x15c6,0x15c6,0x15c6,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb, -0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x15d2,0x15d2,0x15d2,0x15d2, -0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15c9, -0x15cc,0x15cf,0x15d2,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x15e1,0x15e1,0x15e1,0x15e1, -0x15e1,0x15d5,0x15d5,0x1d1,0x1d1,0x1d1,0x1d1,0x15d8,0x15d8,0x15d8,0x15d8,0x15d8,0x15de,0x15de,0x16c8,0x15de, -0x15de,0x15de,0x15db,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x15ea,0x15ea,0x15ea,0x15ea, -0x15ea,0x1d4,0x1d4,0x15e7,0x15e7,0x15e7,0x15e7,0x15e7,0x15e7,0x15e7,0x15e7,0x15e7,0x15e4,0x15e4,0x15e4,0x15e4, -0x15e4,0x15e4,0x15e4,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4,0x15ed,0x15ff,0x15ff,0x15f3, -0x15fc,0x1d7,0x1d7,0x1d7,0x1d7,0x1d7,0x1d7,0x1d7,0x1d7,0x1d7,0x1d7,0x1d7,0x15f6,0x15f6,0x15f6,0x15f6, -0x15f6,0x15f6,0x15f6,0x15f6,0x15f6,0x15f6,0x1d7,0x1d7,0x1d7,0x1d7,0x1d7,0x1d7,0x1605,0x1605,0x1605,0x1605, -0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605, -0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1da,0x1602,0x1602,0x1602,0x1602, -0x1602,0x1602,0x1602,0x1602,0x1602,0x1602,0x1da,0x1da,0x1da,0x1da,0x1608,0x1608,0x1b8d,0x1b8d,0x1b8d,0x1b8d, -0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1611,0x1611,0x1611,0x1611, -0x1611,0x160b,0x1614,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x160e,0x160e,0x160e,0x160e, -0x160e,0x160e,0x160e,0x160e,0x160e,0x160e,0x1611,0x1611,0x1611,0x1611,0x1611,0x1dd,0x161a,0x161a,0x161a,0x161a, -0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a, -0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x1e0,0x1626,0x1626,0x1626,0x1626, -0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626, -0x1626,0x1626,0x1623,0x1623,0x1623,0x1623,0x1623,0x1e3,0x1e3,0x1e3,0x1e3,0x1e3,0x163e,0x163e,0x1641,0x1641, -0x1644,0x1635,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x163b,0x163b,0x163b,0x163b, -0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x1e6,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1e6,0x163e, -0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e, -0x163e,0x163e,0x163e,0x163e,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x163e,0x163e,0x163e,0x164d,0x164d,0x164d,0x164d, -0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d, -0x164d,0x164d,0x164d,0x164d,0x164d,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1656,0x1656,0x1656,0x1656, -0x1656,0x1656,0x1656,0x1656,0x1656,0x1656,0x1656,0x1656,0x1656,0x1656,0x1656,0x1656,0x1656,0x1656,0x1ec,0x1ec, -0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1653,0x1653,0x1653,0x1653,0x1ec,0x1ec,0x1ec,0x1671,0x1671,0x1671,0x1671, -0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1659,0x166b,0x166b,0x1659,0x1659, -0x1659,0x1659,0x1f2,0x1f2,0x166b,0x166b,0x166e,0x166e,0x1659,0x1659,0x166b,0x165f,0x165c,0x1662,0x1674,0x1674, -0x1665,0x1665,0x1668,0x1668,0x1668,0x1674,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b, -0x172b,0x172b,0x172b,0x172b,0x1728,0x1728,0x1728,0x1728,0x1725,0x1725,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2, -0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2, -0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f5,0x1677,0x1677,0x1677, -0x1677,0x1677,0x1677,0x1677,0x1677,0x1677,0x1677,0x1677,0x1677,0x1677,0x1677,0x1677,0x1677,0x1677,0x1677,0x1677, -0x1677,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x167a,0x167a,0x167a,0x167a, -0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x1f8,0x1f8,0x1f8,0x1f8,0x167a,0x167a,0x167a,0x167a, -0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x1f8,0x1f8,0x1f8,0x1f8, -0x1f8,0x1f8,0x1f8,0x1f8,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x1f8,0x1f8, -0x1f8,0x1f8,0x1f8,0x1f8,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x1f8,0x1f8,0x1f8,0x1f8, -0x1f8,0x1f8,0x1f8,0x1f8,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a, -0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x1f8,0x1f8,0x1a91,0x1a91,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8, -0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8, -0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x167d,0x168c,0x1683,0x1680, -0x1692,0x1692,0x1686,0x1692,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1689,0x1689,0x1689,0x1689, -0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1698,0x1698,0x1698,0x1698, -0x1698,0x1698,0x1698,0x1698,0x1698,0x1698,0x1695,0x1695,0x1695,0x1695,0x1695,0x1695,0x1695,0x1695,0x1695,0x1fe, -0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x169e,0x1740,0x1740,0x1740,0x1740, -0x1740,0x1740,0x1740,0x1740,0x1740,0x1740,0x1740,0x1740,0x1740,0x1740,0x1740,0x1740,0x1740,0x1740,0x1740,0x1740, -0x1740,0x1740,0x1740,0x1740,0x1740,0x1740,0x1938,0x201,0x201,0x172e,0x172e,0x172e,0x173a,0x173a,0x172e,0x172e, -0x172e,0x172e,0x173d,0x172e,0x172e,0x172e,0x172e,0x1731,0x201,0x201,0x201,0x201,0x1737,0x1737,0x1737,0x1737, -0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1734,0x1734,0x1743,0x1743,0x1743,0x1734,0x1746,0x1746,0x1746,0x1746, -0x1746,0x1746,0x1746,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204, -0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204, -0x204,0x204,0x204,0x204,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758, -0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x20a,0x1758,0x1758,0x20a,0x20a,0x20a,0x20a,0x20a,0x1755, -0x1755,0x1755,0x1755,0x1755,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x20d,0x175b,0x20d,0x175b,0x175b, -0x175b,0x175b,0x20d,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b, -0x175b,0x175b,0x20d,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175e,0x20d,0x20d, -0x20d,0x20d,0x20d,0x20d,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7, -0x15b7,0x15b7,0x15b7,0x15b7,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, -0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x210,0x210,0x210,0x210,0x210,0x210,0x210,0x210,0x210, -0x210,0x210,0x210,0x210,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764, -0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x210,0x210,0x210,0x210,0x210,0x210,0x210,0x1761,0x1761, -0x1761,0x1761,0x1761,0x1761,0x176d,0x176d,0x176d,0x176d,0x176a,0x176d,0x176d,0x1770,0x1773,0x1770,0x1770,0x176d, -0x213,0x213,0x213,0x213,0x213,0x213,0x213,0x213,0x213,0x213,0x213,0x213,0x213,0x213,0x213,0x176a, -0x176a,0x176a,0x176a,0x176a,0x17ca,0x17ca,0x17ca,0x17ca,0x17c1,0x17c1,0x17c1,0x17bb,0x17be,0x17be,0x17be,0x19e6, -0x216,0x216,0x216,0x216,0x17c7,0x17c7,0x17c7,0x17c7,0x17c7,0x17c7,0x17c7,0x17c7,0x17c7,0x17c7,0x216,0x216, -0x216,0x216,0x17c4,0x17c4,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x219,0x17e5,0x17e5, -0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5, -0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e2,0x17d0,0x17d0,0x17d0,0x17d0,0x17d0,0x17d0,0x17d0,0x219, -0x17d0,0x17d0,0x17d0,0x17d0,0x17d0,0x17d0,0x17e2,0x17d3,0x17e5,0x17e8,0x17e8,0x17dc,0x17d9,0x17d9,0x219,0x219, -0x219,0x219,0x219,0x219,0x219,0x219,0x219,0x219,0x17df,0x17df,0x17df,0x17df,0x17df,0x17df,0x17df,0x17df, -0x17df,0x17df,0x17d6,0x17d6,0x17d6,0x17d6,0x17d6,0x17d6,0x17d6,0x17d6,0x17d6,0x17d6,0x17d6,0x17d6,0x17d6,0x17d6, -0x17d6,0x219,0x219,0x219,0x17f4,0x17f7,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd, -0x17fd,0x17fd,0x17fd,0x17fd,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x21c,0x21c,0x21c, -0x21c,0x21c,0x21c,0x21c,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956, -0x1956,0x1956,0x1956,0x1956,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x21f,0x17ee,0x17ee,0x17ee,0x17ee, -0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x21f,0x21f,0x17ee, -0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x21f,0x17ee,0x17ee,0x21f,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x21f, -0x21f,0x21f,0x21f,0x21f,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc, -0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x183c,0x18d8,0x1a40,0x1a43,0x1aeb,0x222,0x222,0x222,0x222,0x222,0x222,0x222, -0x222,0x222,0x222,0x222,0x1ae8,0x1ae8,0x222,0x222,0x222,0x222,0x222,0x222,0x222,0x222,0x222,0x222, -0x222,0x222,0x222,0x222,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd, -0x17fd,0x17fd,0x17fd,0x17fd,0x225,0x225,0x17f1,0x17f1,0x17f1,0x17f1,0x17f1,0x17f1,0x17f1,0x17f1,0x17f1,0x17f1, -0x17f1,0x17f1,0x17f1,0x17f1,0x225,0x17fa,0x17f1,0x17f1,0x17f1,0x17f1,0x17f1,0x17f1,0x17f1,0x17fa,0x17f1,0x17f1, -0x17fa,0x17f1,0x17f1,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x1800,0x1800,0x1800,0x1800, -0x1800,0x1800,0x1800,0x1800,0x1800,0x1800,0x1800,0x1800,0x1800,0x228,0x228,0x228,0x228,0x228,0x228,0x228, -0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x1818,0x1818,0x1809,0x1803, -0x1803,0x1818,0x1806,0x181b,0x181b,0x181b,0x181b,0x181e,0x181e,0x1812,0x180f,0x180c,0x1815,0x1815,0x1815,0x1815, -0x1815,0x1815,0x1815,0x1815,0x1815,0x1815,0x1a94,0x1812,0x22b,0x180c,0x193b,0x19e9,0x1a97,0x1a97,0x22b,0x22b, -0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b, -0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x1824,0x1824,0x1824,0x1824, -0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824, -0x22e,0x22e,0x22e,0x22e,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821, -0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821, -0x22e,0x22e,0x22e,0x22e,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f, -0x183f,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x231,0x231,0x231,0x231, -0x231,0x231,0x231,0x231,0x1bba,0x1bba,0x1bba,0x234,0x234,0x234,0x234,0x234,0x234,0x234,0x234,0x234, -0x234,0x234,0x234,0x234,0x276,0x276,0x1c2f,0x276,0x276,0x276,0x276,0x276,0x276,0x276,0x276,0x276, -0x276,0x276,0x276,0x276,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x237,0x187e,0x187e,0x237,0x187e, -0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e, -0x187e,0x187e,0x187e,0x187e,0x187e,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x237,0x237,0x237,0x1872,0x237, -0x1872,0x1872,0x237,0x1872,0x1872,0x1872,0x1875,0x1872,0x1878,0x1878,0x1881,0x1872,0x237,0x237,0x237,0x237, -0x237,0x237,0x237,0x237,0x187b,0x187b,0x187b,0x187b,0x187b,0x187b,0x187b,0x187b,0x187b,0x187b,0x237,0x237, -0x237,0x237,0x237,0x237,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1, -0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1, -0x23a,0x23a,0x23a,0x23a,0x1890,0x1893,0x1893,0x23d,0x23d,0x23d,0x23d,0x23d,0x23d,0x23d,0x23d,0x23d, -0x23d,0x23d,0x23d,0x23d,0x1b96,0x1b96,0x1b96,0x1b96,0x1b96,0x1b96,0x1b96,0x1b96,0x1b96,0x1b96,0x1b96,0x1b96, -0x1b96,0x1b96,0x1b96,0x1b96,0x18a2,0x18a2,0x18a2,0x18a2,0x18a2,0x18a2,0x18a2,0x18a2,0x18a2,0x18a2,0x18a2,0x240, -0x240,0x240,0x240,0x240,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63, -0x1b63,0x1b63,0x1b63,0x1b63,0x18ae,0x18b1,0x18c0,0x18c0,0x18b1,0x18b4,0x18ae,0x18ab,0x243,0x243,0x243,0x243, -0x243,0x243,0x243,0x243,0x1899,0x1884,0x1884,0x1884,0x1884,0x1884,0x1884,0x1896,0x1896,0x1884,0x1884,0x1884, -0x1899,0x1899,0x1899,0x1899,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef, -0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x246,0x246,0x246,0x246,0x246,0x246,0x246,0x246, -0x246,0x246,0x246,0x246,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941, -0x1941,0x1941,0x246,0x246,0x1a4f,0x1a4f,0x1a4f,0x1a4f,0x1af1,0x1c35,0x1c35,0x1c35,0x1a4f,0x1a4f,0x1a4f,0x1bbd, -0x1bbd,0x279,0x279,0x279,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953, -0x1950,0x1950,0x1950,0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,0x1950,0x194a,0x1947,0x194d, -0x249,0x249,0x249,0x249,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956, -0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x24c, -0x24c,0x1956,0x1956,0x1956,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x24f,0x1965,0x1965,0x24f,0x1965,0x1965, -0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965, -0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1962,0x1962,0x1962,0x1962,0x1962,0x24f,0x1959,0x1959,0x24f,0x1962, -0x1962,0x1959,0x1962,0x195c,0x1965,0x24f,0x24f,0x24f,0x24f,0x24f,0x24f,0x24f,0x196e,0x196e,0x1971,0x1971, -0x1968,0x1968,0x1968,0x1968,0x252,0x252,0x252,0x252,0x252,0x252,0x252,0x252,0x196b,0x196b,0x196b,0x196b, -0x196b,0x196b,0x196b,0x196b,0x196b,0x196b,0x252,0x252,0x252,0x252,0x252,0x252,0x1974,0x1974,0x1974,0x1974, -0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1977,0x1974,0x1974,0x1974,0x1977,0x1974,0x1974,0x1974, -0x1974,0x255,0x255,0x255,0x255,0x255,0x255,0x255,0x255,0x255,0x255,0x255,0x1980,0x1980,0x1980,0x1980, -0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x197a, -0x197a,0x197d,0x197d,0x1983,0x1983,0x258,0x258,0x258,0x258,0x258,0x258,0x258,0x1986,0x1986,0x1986,0x1986, -0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986, -0x25b,0x25b,0x25b,0x25b,0x25b,0x25b,0x25b,0x25b,0x25b,0x25b,0x25b,0x25b,0x1989,0x1989,0x1989,0x1989, -0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989, -0x1989,0x1989,0x1989,0x198c,0x1995,0x1989,0x1989,0x25e,0x25e,0x25e,0x25e,0x25e,0x1998,0x1998,0x1998,0x1998, -0x1998,0x1998,0x1998,0x199b,0x261,0x261,0x261,0x261,0x261,0x261,0x261,0x261,0x19a4,0x19a4,0x19a4,0x19a4, -0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x199e,0x199e, -0x199e,0x199e,0x199e,0x199e,0x199e,0x199e,0x199e,0x199e,0x199e,0x19a1,0x19a1,0x19a1,0x19a1,0x19a7,0x19a7,0x19a7, -0x19a7,0x19a7,0x264,0x264,0x264,0x264,0x264,0x264,0x264,0x264,0x264,0x264,0x264,0x264,0x264,0x264, -0x264,0x264,0x264,0x264,0x1b84,0x1b84,0x1b84,0x1b84,0x1b84,0x1b84,0x1b84,0x1b84,0x1b84,0x1b84,0x1b84,0x1b84, -0x1b84,0x1b84,0x1b84,0x1b84,0x1be7,0x1bed,0x1bed,0x1bed,0x1bed,0x1bed,0x1bed,0x1bea,0x1bea,0x1bea,0x1bea,0x1bea, -0x1bea,0x1bea,0x1bea,0x1bea,0x1bea,0x1bea,0x1bea,0x1bea,0x1bea,0x1bea,0x267,0x267,0x267,0x267,0x267,0x267, -0x267,0x267,0x267,0x267,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb, -0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x26a,0x26a,0x26a,0x26a,0x26a, -0x26a,0x26a,0x26a,0x26a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x26d,0x26d,0x1a0a,0x1a0a, -0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a, -0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a07,0x1a07,0x1a07,0x19fe,0x19fe,0x19fe,0x19fe,0x26d,0x26d,0x19fe,0x19fe, -0x1a07,0x1a07,0x1a07,0x1a07,0x1a01,0x1a0a,0x1a04,0x1a0a,0x1a07,0x26d,0x26d,0x26d,0x26d,0x26d,0x26d,0x26d, -0x26d,0x26d,0x26d,0x26d,0x26d,0x26d,0x26d,0x26d,0x26d,0x26d,0x26d,0x26d,0x26d,0x26d,0x26d,0x26d, -0x26d,0x26d,0x26d,0x26d,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16, -0x1a16,0x270,0x270,0x270,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16, -0x1a19,0x1a19,0x270,0x270,0x273,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c, -0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c, -0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x273,0x273,0x276,0x276,0x276,0x276,0x276,0x276,0x276,0x276, -0x276,0x276,0x276,0x276,0x276,0x276,0x276,0x276,0x1a49,0x1a49,0x1a49,0x276,0x276,0x1c32,0x276,0x276, -0x276,0x276,0x276,0x276,0x276,0x276,0x276,0x276,0x1a4c,0x1a4c,0x1a4c,0x1a4c,0x276,0x276,0x276,0x276, -0x276,0x276,0x276,0x276,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1, -0x18e1,0x18e1,0x18e1,0x18e1,0x1a4f,0x1a4f,0x1a4f,0x1af1,0x1af1,0x1af1,0x1af1,0x1c35,0x1c35,0x279,0x279,0x279, -0x279,0x279,0x279,0x279,0x1a4f,0x1a4f,0x1a4f,0x1a4f,0x1a4f,0x1a4f,0x1af1,0x1af1,0x1af1,0x1af1,0x1af1,0x1af1, -0x1af1,0x1af1,0x1af1,0x1af1,0x1af1,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1c35,0x1c35,0x1c35,0x1af1,0x1af1,0x1af1,0x1af1, -0x1af1,0x1af1,0x1af1,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1c35,0x1c35,0x1c35,0x279,0x1c35,0x1af1,0x1af1,0x1af1,0x1bc0, -0x1bc0,0x1bc0,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x1c35,0x1c35,0x1af1,0x1af1,0x1af1,0x1af1, -0x1af1,0x1af1,0x1af1,0x1bbd,0x1bbd,0x1bbd,0x1c35,0x1c35,0x279,0x279,0x279,0x279,0x1bbd,0x1bbd,0x1bbd,0x1bbd, -0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1c35,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x1bc0,0x1bc0,0x1bc0,0x1bc0, -0x1bc0,0x1bc0,0x1bc0,0x1c38,0x1c38,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x1a25,0x1a1f,0x1a1f,0x1a1f, -0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x27c,0x27c, -0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,0x1a22,0x1a31,0x1a31,0x1a31,0x1a31, -0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a28,0x1a28,0x1a28,0x1a28,0x1a2e,0x1a2e,0x1a2e,0x1a2e, -0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x27f,0x27f,0x27f,0x27f,0x27f,0x1a2b,0x1a9d,0x1a9d,0x1a9d,0x1a9d, -0x1a9d,0x1a9a,0x1a9a,0x1a9a,0x1a9a,0x1a9a,0x1a9a,0x1a9a,0x282,0x282,0x282,0x282,0x282,0x282,0x282,0x282, -0x282,0x282,0x282,0x282,0x282,0x282,0x282,0x282,0x282,0x282,0x282,0x282,0x1ab8,0x1ab8,0x1ab8,0x1ab8, -0x1ab8,0x1ab8,0x1ab8,0x285,0x285,0x1ab8,0x285,0x285,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8, -0x285,0x1ab8,0x1ab8,0x285,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8, -0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1aa0,0x1aaf,0x1aaf,0x1aaf,0x1aaf,0x1aaf,0x285,0x1aaf,0x1ab2,0x285,0x285,0x1aa0, -0x1aa0,0x1ab5,0x1aa6,0x1abb,0x1aaf,0x1abb,0x1aaf,0x1aa3,0x1abe,0x1aa9,0x1abe,0x285,0x285,0x285,0x285,0x285, -0x285,0x285,0x285,0x285,0x1aac,0x1aac,0x1aac,0x1aac,0x1aac,0x1aac,0x1aac,0x1aac,0x1aac,0x1aac,0x285,0x285, -0x285,0x285,0x285,0x285,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7, -0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x288,0x288,0x288,0x288,0x288,0x288, -0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288, -0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x1ac4,0x1ac4,0x1ac4,0x1ac4, -0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x28e, -0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x28e, +0x1707,0x1707,0x1707,0x1dd,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713, +0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1710,0x1710,0x1710,0x1710,0x1710,0x1e0, +0x1e0,0x1e0,0x1e0,0x1e0,0x172b,0x172b,0x172e,0x172e,0x1731,0x1722,0x1e3,0x1e3,0x1e3,0x1e3,0x1e3,0x1e3, +0x1e3,0x1e3,0x1e3,0x1e3,0x1728,0x1728,0x1728,0x1728,0x1728,0x1728,0x1728,0x1728,0x1728,0x1728,0x1e3,0x1722, +0x1722,0x1722,0x1722,0x1722,0x1722,0x1722,0x1e3,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b, +0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x1e3,0x1e3,0x1e3,0x1e3, +0x1e3,0x172b,0x172b,0x172b,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a, +0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x1e6,0x1e6,0x1e6, +0x1e6,0x1e6,0x1e6,0x1e6,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743, +0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1740,0x1740,0x1740, +0x1740,0x1e9,0x1e9,0x1e9,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e, +0x175e,0x175e,0x175e,0x1746,0x1758,0x1758,0x1746,0x1746,0x1746,0x1746,0x1ef,0x1ef,0x1758,0x1758,0x175b,0x175b, +0x1746,0x1746,0x1758,0x174c,0x1749,0x174f,0x1761,0x1761,0x1752,0x1752,0x1755,0x1755,0x1755,0x1761,0x1818,0x1818, +0x1818,0x1818,0x1818,0x1818,0x1818,0x1818,0x1818,0x1818,0x1818,0x1818,0x1818,0x1818,0x1815,0x1815,0x1815,0x1815, +0x1812,0x1812,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef, +0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef, +0x1ef,0x1ef,0x1ef,0x1ef,0x1f2,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764, +0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2, +0x1f2,0x1f2,0x1f2,0x1f2,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, +0x1f5,0x1f5,0x1f5,0x1f5,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, +0x1767,0x1767,0x1767,0x1767,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1767,0x1767,0x1767,0x1767, +0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1767,0x1767,0x1767,0x1767, +0x1767,0x1767,0x1767,0x1767,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1767,0x1767,0x1767,0x1767, +0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1f5,0x1f5, +0x1b90,0x1b90,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5, +0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5, +0x1f5,0x1f5,0x1f5,0x1f5,0x176a,0x1779,0x1770,0x176d,0x177f,0x177f,0x1773,0x177f,0x1f8,0x1f8,0x1f8,0x1f8, +0x1f8,0x1f8,0x1f8,0x1f8,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1f8,0x1f8, +0x1f8,0x1f8,0x1f8,0x1f8,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1782,0x1782, +0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb, +0x1fb,0x1fb,0x1fb,0x178b,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d, +0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x1a28,0x1fe, +0x1fe,0x181b,0x181b,0x181b,0x1827,0x1827,0x181b,0x181b,0x181b,0x181b,0x182a,0x181b,0x181b,0x181b,0x181b,0x181e, +0x1fe,0x1fe,0x1fe,0x1fe,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1821,0x1821, +0x1830,0x1830,0x1830,0x1821,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x201,0x201,0x201,0x201,0x201, +0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201, +0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x1845,0x1845,0x1845,0x1845, +0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x207, +0x1845,0x1845,0x207,0x207,0x207,0x207,0x207,0x1842,0x1842,0x1842,0x1842,0x1842,0x1848,0x1848,0x1848,0x1848, +0x1848,0x1848,0x1848,0x20a,0x1848,0x20a,0x1848,0x1848,0x1848,0x1848,0x20a,0x1848,0x1848,0x1848,0x1848,0x1848, +0x1848,0x1848,0x1848,0x1848,0x1848,0x1848,0x1848,0x1848,0x1848,0x1848,0x20a,0x1848,0x1848,0x1848,0x1848,0x1848, +0x1848,0x1848,0x1848,0x1848,0x1848,0x184b,0x20a,0x20a,0x20a,0x20a,0x20a,0x20a,0x16a1,0x16a1,0x16a1,0x16a1, +0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x1854,0x1854,0x1854,0x1854, +0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x20d, +0x20d,0x20d,0x20d,0x20d,0x20d,0x20d,0x20d,0x20d,0x20d,0x20d,0x20d,0x20d,0x1851,0x1851,0x1851,0x1851, +0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x20d, +0x20d,0x20d,0x20d,0x20d,0x20d,0x20d,0x184e,0x184e,0x184e,0x184e,0x184e,0x184e,0x185a,0x185a,0x185a,0x185a, +0x1857,0x185a,0x185a,0x185d,0x1860,0x185d,0x185d,0x185a,0x210,0x210,0x210,0x210,0x210,0x210,0x210,0x210, +0x210,0x210,0x210,0x210,0x210,0x210,0x210,0x1857,0x1857,0x1857,0x1857,0x1857,0x18b7,0x18b7,0x18b7,0x18b7, +0x18ae,0x18ae,0x18ae,0x18a8,0x18ab,0x18ab,0x18ab,0x1adf,0x213,0x213,0x213,0x213,0x18b4,0x18b4,0x18b4,0x18b4, +0x18b4,0x18b4,0x18b4,0x18b4,0x18b4,0x18b4,0x213,0x213,0x213,0x213,0x18b1,0x18b1,0x18d2,0x18d2,0x18d2,0x18d2, +0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x216,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2, +0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18cf, +0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x216,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18cf,0x18c0, +0x18d2,0x18d5,0x18d5,0x18c9,0x18c6,0x18c6,0x216,0x216,0x216,0x216,0x216,0x216,0x216,0x216,0x216,0x216, +0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3, +0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x216,0x216,0x216,0x18e1,0x18e4,0x18ea,0x18ea, +0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18d8,0x18d8,0x18d8,0x18d8, +0x18d8,0x18d8,0x18d8,0x18d8,0x18d8,0x219,0x219,0x219,0x219,0x219,0x219,0x219,0x1a46,0x1a46,0x1a46,0x1a46, +0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x18db,0x18db,0x18db,0x18db, +0x18db,0x18db,0x18db,0x21c,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db, +0x18db,0x18db,0x18db,0x18db,0x18db,0x21c,0x21c,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x21c,0x18db, +0x18db,0x21c,0x18db,0x18db,0x18db,0x18db,0x18db,0x21c,0x21c,0x21c,0x21c,0x21c,0x1cfb,0x1cfb,0x1cfb,0x1cfb, +0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1929,0x19c5,0x1b39,0x1b3c, +0x1bea,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x1be7,0x1be7,0x21f,0x21f, +0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x18ea,0x18ea,0x18ea,0x18ea, +0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x222,0x222,0x18de,0x18de, +0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x222,0x18e7,0x18de,0x18de, +0x18de,0x18de,0x18de,0x18de,0x18de,0x18e7,0x18de,0x18de,0x18e7,0x18de,0x18de,0x222,0x222,0x222,0x222,0x222, +0x222,0x222,0x222,0x222,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed, +0x18ed,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225, +0x225,0x225,0x225,0x225,0x1905,0x1905,0x18f6,0x18f0,0x18f0,0x1905,0x18f3,0x1908,0x1908,0x1908,0x1908,0x190b, +0x190b,0x18ff,0x18fc,0x18f9,0x1902,0x1902,0x1902,0x1902,0x1902,0x1902,0x1902,0x1902,0x1902,0x1902,0x1b93,0x18ff, +0x228,0x18f9,0x1a2b,0x1ae2,0x1b96,0x1b96,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228, +0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228, +0x228,0x228,0x228,0x228,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911, +0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x22b,0x22b,0x22b,0x22b,0x190e,0x190e,0x190e,0x190e, +0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e, +0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x22b,0x22b,0x22b,0x22b,0x192c,0x192c,0x192c,0x192c, +0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x1aac,0x1aac,0x1aac,0x1aac,0x1aac,0x1b3f,0x1b3f, +0x1b3f,0x1b3f,0x1b3f,0x1b3f,0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,0x1cb9,0x1cb9,0x1cb9,0x231, +0x231,0x231,0x231,0x231,0x231,0x231,0x231,0x231,0x231,0x231,0x231,0x231,0x273,0x273,0x1d2e,0x273, +0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x196b,0x196b,0x196b,0x196b, +0x196b,0x196b,0x196b,0x234,0x196b,0x196b,0x234,0x196b,0x196b,0x196b,0x196b,0x196b,0x196b,0x196b,0x196b,0x196b, +0x196b,0x196b,0x196b,0x196b,0x196b,0x196b,0x196b,0x196b,0x196b,0x196b,0x196b,0x196b,0x196b,0x195f,0x195f,0x195f, +0x195f,0x195f,0x195f,0x234,0x234,0x234,0x195f,0x234,0x195f,0x195f,0x234,0x195f,0x195f,0x195f,0x1962,0x195f, +0x1965,0x1965,0x196e,0x195f,0x234,0x234,0x234,0x234,0x234,0x234,0x234,0x234,0x1968,0x1968,0x1968,0x1968, +0x1968,0x1968,0x1968,0x1968,0x1968,0x1968,0x234,0x234,0x234,0x234,0x234,0x234,0x19ce,0x19ce,0x19ce,0x19ce, +0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce, +0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x237,0x237,0x237,0x237,0x197d,0x1980,0x1980,0x23a, +0x23a,0x23a,0x23a,0x23a,0x23a,0x23a,0x23a,0x23a,0x23a,0x23a,0x23a,0x23a,0x1c95,0x1c95,0x1c95,0x1c95, +0x1c95,0x1c95,0x1c95,0x1c95,0x1c95,0x1c95,0x1c95,0x1c95,0x1c95,0x1c95,0x1c95,0x1c95,0x198f,0x198f,0x198f,0x198f, +0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x23d,0x23d,0x23d,0x23d,0x23d,0x1c62,0x1c62,0x1c62,0x1c62, +0x1c62,0x1c62,0x1c62,0x1c62,0x1c62,0x1c62,0x1c62,0x1c62,0x1c62,0x1c62,0x1c62,0x1c62,0x199b,0x199e,0x19ad,0x19ad, +0x199e,0x19a1,0x199b,0x1998,0x240,0x240,0x240,0x240,0x240,0x240,0x240,0x240,0x1986,0x1971,0x1971,0x1971, +0x1971,0x1971,0x1971,0x1983,0x1983,0x1971,0x1971,0x1971,0x1986,0x1986,0x1986,0x1986,0x1ae8,0x1ae8,0x1ae8,0x1ae8, +0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8, +0x243,0x243,0x243,0x243,0x243,0x243,0x243,0x243,0x243,0x243,0x243,0x243,0x1a31,0x1a31,0x1a31,0x1a31, +0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x243,0x243,0x1b48,0x1b48,0x1b48,0x1b48, +0x1bf0,0x1d34,0x1d34,0x1d34,0x1b48,0x1b48,0x1b48,0x1cbc,0x1cbc,0x276,0x276,0x276,0x1a43,0x1a43,0x1a43,0x1a43, +0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a40,0x1a40,0x1a40,0x1a34,0x1a34,0x1a34,0x1a34,0x1a34, +0x1a34,0x1a34,0x1a34,0x1a34,0x1a40,0x1a3a,0x1a37,0x1a3d,0x246,0x246,0x246,0x246,0x1a46,0x1a46,0x1a46,0x1a46, +0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46, +0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x249,0x249,0x1a46,0x1a46,0x1a46,0x1a55,0x1a55,0x1a55,0x1a55, +0x1a55,0x1a55,0x24c,0x1a55,0x1a55,0x24c,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55, +0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a52,0x1a52, +0x1a52,0x1a52,0x1a52,0x24c,0x1a49,0x1a49,0x24c,0x1a52,0x1a52,0x1a49,0x1a52,0x1a4c,0x1a55,0x24c,0x24c,0x24c, +0x24c,0x24c,0x24c,0x24c,0x1a5e,0x1a5e,0x1a61,0x1a61,0x1a58,0x1a58,0x1a58,0x1a58,0x24f,0x24f,0x24f,0x24f, +0x24f,0x24f,0x24f,0x24f,0x1a5b,0x1a5b,0x1a5b,0x1a5b,0x1a5b,0x1a5b,0x1a5b,0x1a5b,0x1a5b,0x1a5b,0x24f,0x24f, +0x24f,0x24f,0x24f,0x24f,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64, +0x1a67,0x1a64,0x1a64,0x1a64,0x1a67,0x1a64,0x1a64,0x1a64,0x1a64,0x252,0x252,0x252,0x252,0x252,0x252,0x252, +0x252,0x252,0x252,0x252,0x1a73,0x1a73,0x1a73,0x1a73,0x1a73,0x1a73,0x1a73,0x1a73,0x1a73,0x1a73,0x1a73,0x1a73, +0x1a73,0x1a73,0x1a73,0x1a73,0x1a73,0x1a73,0x1a70,0x1a6a,0x1a6a,0x1a6d,0x1a6d,0x1a76,0x1a76,0x255,0x255,0x255, +0x255,0x255,0x255,0x255,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79, +0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x258,0x258,0x258,0x258,0x258,0x258,0x258,0x258, +0x258,0x258,0x258,0x258,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c, +0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7f,0x1a88,0x1a7c,0x1a7c,0x25b, +0x25b,0x25b,0x25b,0x25b,0x1a8b,0x1a8b,0x1a8b,0x1a8b,0x1a8b,0x1a8b,0x1a8b,0x1a8e,0x25e,0x25e,0x25e,0x25e, +0x25e,0x25e,0x25e,0x25e,0x1a97,0x1a97,0x1a97,0x1a97,0x1a97,0x1a97,0x1a97,0x1a97,0x1a97,0x1a97,0x1a97,0x1a97, +0x1a97,0x1a97,0x1a97,0x1a97,0x1a97,0x1a97,0x1a91,0x1a91,0x1a91,0x1a91,0x1a91,0x1a91,0x1a91,0x1a91,0x1a91,0x1a91, +0x1a91,0x1a94,0x1a94,0x1a94,0x1a94,0x1a9a,0x1a9a,0x1a9a,0x1a9a,0x1a9a,0x261,0x261,0x261,0x261,0x261,0x261, +0x261,0x261,0x261,0x261,0x261,0x261,0x261,0x261,0x261,0x261,0x261,0x261,0x1c83,0x1c83,0x1c83,0x1c83, +0x1c83,0x1c83,0x1c83,0x1c83,0x1c83,0x1c83,0x1c83,0x1c83,0x1c83,0x1c83,0x1c83,0x1c83,0x1ce6,0x1cec,0x1cec,0x1cec, +0x1cec,0x1cec,0x1cec,0x1ce9,0x1ce9,0x1ce9,0x1ce9,0x1ce9,0x1ce9,0x1ce9,0x1ce9,0x1ce9,0x1ce9,0x1ce9,0x1ce9,0x1ce9, +0x1ce9,0x1ce9,0x264,0x264,0x264,0x264,0x264,0x264,0x264,0x264,0x264,0x264,0x1af4,0x1af4,0x1af4,0x1af4, +0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4, +0x1af4,0x1af4,0x1af4,0x267,0x267,0x267,0x267,0x267,0x267,0x267,0x267,0x267,0x1b03,0x1b03,0x1b03,0x1b03, +0x1b03,0x1b03,0x1b03,0x1b03,0x26a,0x26a,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03, +0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b00,0x1b00,0x1b00, +0x1af7,0x1af7,0x1af7,0x1af7,0x26a,0x26a,0x1af7,0x1af7,0x1b00,0x1b00,0x1b00,0x1b00,0x1afa,0x1b03,0x1afd,0x1b03, +0x1b00,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a, +0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x1b0f,0x1b0f,0x1b0f,0x1b0f, +0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x26d,0x26d,0x26d,0x1b06,0x1b06,0x1b06,0x1b06, +0x1b06,0x1b06,0x1b06,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b12,0x1b12,0x26d,0x26d,0x270,0x1b15,0x1b15,0x1b15, +0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15, +0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x270,0x270, +0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273, +0x1b42,0x1b42,0x1b42,0x273,0x273,0x1d31,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273, +0x1b45,0x1b45,0x1b45,0x1b45,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x19ce,0x19ce,0x19ce,0x19ce, +0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x1b48,0x1b48,0x1b48,0x1bf0, +0x1bf0,0x1bf0,0x1bf0,0x1d34,0x1d34,0x276,0x276,0x276,0x276,0x276,0x276,0x276,0x1b48,0x1b48,0x1b48,0x1b48, +0x1b48,0x1b48,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1cbc,0x1cbc,0x1cbc, +0x1cbc,0x1d34,0x1d34,0x1d34,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1cbc,0x1cbc,0x1cbc,0x1cbc,0x1d34, +0x1d34,0x1d34,0x276,0x1d34,0x1bf0,0x1bf0,0x1bf0,0x1cbf,0x1cbf,0x1cbf,0x276,0x276,0x276,0x276,0x276,0x276, +0x276,0x276,0x1d34,0x1d34,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1cbc,0x1cbc,0x1cbc,0x1d34,0x1d34, +0x276,0x276,0x276,0x276,0x1cbc,0x1cbc,0x1cbc,0x1cbc,0x1cbc,0x1cbc,0x1cbc,0x1cbc,0x1d34,0x276,0x276,0x276, +0x276,0x276,0x276,0x276,0x1cbf,0x1cbf,0x1cbf,0x1cbf,0x1cbf,0x1cbf,0x1cbf,0x1d37,0x1d37,0x276,0x276,0x276, +0x276,0x276,0x276,0x276,0x1b1e,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18, +0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279, +0x279,0x279,0x279,0x1b1b,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a, +0x1b21,0x1b21,0x1b21,0x1b21,0x1b27,0x1b27,0x1b27,0x1b27,0x1b27,0x1b27,0x1b27,0x1b27,0x1b27,0x1b27,0x27c,0x27c, +0x27c,0x27c,0x27c,0x1b24,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99, +0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f, +0x27f,0x27f,0x27f,0x27f,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x282,0x282,0x1bb7,0x282,0x282, +0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x282,0x1bb7,0x1bb7,0x282,0x1bb7,0x1bb7,0x1bb7,0x1bb7, +0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1b9f,0x1bae,0x1bae,0x1bae, +0x1bae,0x1bae,0x282,0x1bae,0x1bb1,0x282,0x282,0x1b9f,0x1b9f,0x1bb4,0x1ba5,0x1bba,0x1bae,0x1bba,0x1bae,0x1ba2, +0x1bbd,0x1ba8,0x1bbd,0x282,0x282,0x282,0x282,0x282,0x282,0x282,0x282,0x282,0x1bab,0x1bab,0x1bab,0x1bab, +0x1bab,0x1bab,0x1bab,0x1bab,0x1bab,0x1bab,0x282,0x282,0x282,0x282,0x282,0x282,0x1bf6,0x1bf6,0x1bf6,0x1bf6, +0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6, +0x1bf6,0x1bf6,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285, +0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285, +0x285,0x285,0x285,0x285,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3, +0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x28b,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3, +0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b, +0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x1bc6,0x1bc6,0x1bc6,0x1bc6, +0x1bc6,0x1bc6,0x1bc6,0x1bc6,0x1bc6,0x1bc6,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x1bf9,0x1bf9,0x1bf9,0x1bf9, +0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e, 0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e, -0x28e,0x28e,0x28e,0x28e,0x1ac7,0x1ac7,0x1ac7,0x1ac7,0x1ac7,0x1ac7,0x1ac7,0x1ac7,0x1ac7,0x1ac7,0x28e,0x28e, -0x28e,0x28e,0x28e,0x28e,0x1afa,0x1afa,0x1afa,0x1afa,0x1afa,0x1afa,0x1afa,0x1afa,0x1afa,0x291,0x291,0x291, -0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291, -0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291, -0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x294,0x1aca,0x1aca,0x1acd,0x294,0x294, -0x1ad0,0x1ad0,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294, -0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b60,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x297, -0x1b66,0x1b66,0x297,0x297,0x297,0x297,0x297,0x297,0x1b5d,0x1b5d,0x1b5d,0x1b5d,0x1b5d,0x1b5d,0x1b5d,0x1b5d, -0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c, -0x1b6c,0x1b69,0x1b69,0x29a,0x29a,0x29a,0x29a,0x29a,0x29a,0x29a,0x29a,0x29a,0x29a,0x29a,0x29a,0x29a, -0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x29d,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x29d,0x1b6f,0x1b6f,0x29d, -0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x29d, -0x1b72,0x1b78,0x1b78,0x1b75,0x1b75,0x1b75,0x2a3,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75, -0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75, -0x1b75,0x2a3,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3, -0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7e,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b, -0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x2a6, -0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6, +0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf, +0x1bcf,0x1bcf,0x291,0x1bc9,0x1bc9,0x1bcc,0x291,0x291,0x1bcf,0x1bcf,0x291,0x291,0x291,0x291,0x291,0x291, +0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x1c62,0x1c62,0x1c62,0x1c62,0x1c62,0x1c62,0x1c62,0x1c62, +0x1c5f,0x1c62,0x1c62,0x1c62,0x1c62,0x1c62,0x1c62,0x294,0x1c65,0x1c65,0x294,0x294,0x294,0x294,0x294,0x294, +0x1c5c,0x1c5c,0x1c5c,0x1c5c,0x1c5c,0x1c5c,0x1c5c,0x1c5c,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b, +0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c68,0x1c68,0x297,0x297,0x297,0x297,0x297, +0x297,0x297,0x297,0x297,0x297,0x297,0x297,0x297,0x1c6e,0x1c6e,0x1c6e,0x1c6e,0x1c6e,0x1c6e,0x1c6e,0x29a, +0x1c6e,0x1c6e,0x1c6e,0x1c6e,0x29a,0x1c6e,0x1c6e,0x29a,0x1c6e,0x1c6e,0x1c6e,0x1c6e,0x1c6e,0x1c6e,0x1c6e,0x1c6e, +0x1c6e,0x1c6e,0x1c6e,0x1c6e,0x1c6e,0x1c6e,0x1c6e,0x29a,0x1c71,0x1c77,0x1c77,0x1c74,0x1c74,0x1c74,0x2a0,0x1c74, +0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74, +0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x2a0,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74, +0x1c74,0x1c74,0x1c74,0x2a0,0x2a0,0x2a0,0x2a0,0x2a0,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a, +0x1c7a,0x1c7a,0x1c7d,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a, +0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x1cef,0x1cef,0x1cef, +0x1cef,0x1cef,0x1cef,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3, +0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3, +0x2a3,0x2a3,0x2a3,0x2a3,0x1c83,0x1c83,0x1c80,0x1c80,0x1c80,0x1c80,0x1c86,0x1c86,0x1c86,0x1c86,0x2a6,0x2a6, 0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6, -0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x1b84,0x1b84,0x1b81,0x1b81, -0x1b81,0x1b81,0x1b87,0x1b87,0x1b87,0x1b87,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9, -0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x1a9d,0x1a9d,0x1a9d,0x1a9d, -0x1a9d,0x1a9d,0x1a9d,0x1a9d,0x1a9d,0x1a9d,0x1a9d,0x1a9d,0x1a9d,0x1a9d,0x1a9d,0x1a9d,0x1b8d,0x1b8d,0x1b8d,0x1b8d, -0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d, -0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x2ac,0x1b8a,0x1b8a,0x1b8a,0x1b8a, -0x1b8a,0x1b8a,0x1b8a,0x1b8a,0x1b8a,0x1b8a,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x1554,0x1554,0x1554,0x1554, -0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1b93,0x1b93,0x1b93,0x1b93, -0x1b93,0x1b93,0x1b93,0x1b93,0x1b93,0x1b93,0x1b93,0x1b93,0x1b93,0x1b93,0x1b90,0x2af,0x2af,0x2af,0x2af,0x2af, -0x2af,0x2af,0x2af,0x2af,0x2af,0x2af,0x2af,0x2af,0x2af,0x2af,0x2af,0x2af,0x1b9c,0x1b9c,0x1b9c,0x1b9c, -0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x2b2,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x2b2, -0x1b9c,0x1b9c,0x2b2,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x2b2,0x1b99, -0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x2b2,0x1b99, -0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x2b2,0x1b99,0x1b99,0x2b2,0x2b2,0x2b2,0x1ba2,0x1ba2,0x1ba2,0x1ba2, -0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x2b5,0x2b5,0x1ba2,0x1ba2,0x1ba2,0x1ba2, -0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x2b5, -0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f, -0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8, -0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8, -0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x1bf3,0x1bf3,0x1bf3,0x1bf9,0x1bf9,0x1bf9,0x1bf9, -0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bfc,0x1bfc,0x1bfc,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb, -0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x1bff,0x1bff,0x1bff,0x1bff, -0x1bff,0x1bff,0x1bff,0x1bff,0x1bff,0x1bff,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be, -0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be, -0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x1c02,0x1c02,0x1c02,0x1c02,0x1c02,0x1c02,0x1c02,0x1c02, -0x1c02,0x1c02,0x1c02,0x1c02,0x1c02,0x1c02,0x1c02,0x1c02,0x1c02,0x1c02,0x1c02,0x1c02,0x2c1,0x2c1,0x2c1,0x2c1, -0x2c1,0x2c1,0x2c1,0x2c1,0x2c1,0x2c1,0x2c1,0x2c1,0x1c05,0x1c05,0x1c1a,0x1c11,0x1c17,0x1c17,0x1c17,0x1c17, -0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x2c4,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17, -0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17, -0x1c11,0x1c11,0x1c05,0x1c05,0x1c05,0x1c05,0x1c05,0x2c4,0x2c4,0x2c4,0x1c11,0x1c11,0x1c05,0x1c14,0x1c08,0x1c1d, -0x1c1d,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0e,0x1c0e,0x1c0e,0x1c0e, -0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x2c4,0x2c4,0x2c4,0x2c4,0x2c4,0x2c4,0x1c26,0x1c26,0x1c26,0x1c26, -0x1c26,0x1c26,0x1c26,0x1c26,0x1c26,0x1c26,0x1c26,0x1c26,0x1c20,0x1c20,0x1c20,0x1c20,0x1c23,0x1c23,0x1c23,0x1c23, -0x1c23,0x1c23,0x1c23,0x1c23,0x1c23,0x1c23,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2ca,0x2ca,0x2ca,0x2ca, -0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca, -0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x18db,0x2dc,0x2dc,0x2dc, -0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2ca,0x2ca,0x2ca,0x2ca, +0x2a6,0x2a6,0x2a6,0x2a6,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c, +0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c, +0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c, +0x1c8c,0x1c8c,0x1c8c,0x2a9,0x1c89,0x1c89,0x1c89,0x1c89,0x1c89,0x1c89,0x1c89,0x1c89,0x1c89,0x1c89,0x2a9,0x2a9, +0x2a9,0x2a9,0x2a9,0x2a9,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638, +0x1638,0x1638,0x1638,0x1638,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92, +0x1c92,0x1c92,0x1c8f,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac, +0x2ac,0x2ac,0x2ac,0x2ac,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x2af, +0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x2af,0x1c9b,0x1c9b,0x2af,0x1c98,0x1c98,0x1c98,0x1c98,0x1c98, +0x1c98,0x1c98,0x1c98,0x1c98,0x1c98,0x1c98,0x2af,0x1c98,0x1c98,0x1c98,0x1c98,0x1c98,0x1c98,0x1c98,0x1c98,0x1c98, +0x1c98,0x1c98,0x1c98,0x1c98,0x1c98,0x1c98,0x2af,0x1c98,0x1c98,0x1c98,0x1c98,0x1c98,0x1c98,0x1c98,0x2af,0x1c98, +0x1c98,0x2af,0x2af,0x2af,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1, +0x1ca1,0x1ca1,0x2b2,0x2b2,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1, +0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2, +0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e, +0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5, +0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5, +0x2b5,0x1cf2,0x1cf2,0x1cf2,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cfb, +0x1cfb,0x1cfb,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8, +0x2b8,0x2b8,0x2b8,0x2b8,0x1cfe,0x1cfe,0x1cfe,0x1cfe,0x1cfe,0x1cfe,0x1cfe,0x1cfe,0x1cfe,0x1cfe,0x2bb,0x2bb, +0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb, +0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb, +0x1d01,0x1d01,0x1d01,0x1d01,0x1d01,0x1d01,0x1d01,0x1d01,0x1d01,0x1d01,0x1d01,0x1d01,0x1d01,0x1d01,0x1d01,0x1d01, +0x1d01,0x1d01,0x1d01,0x1d01,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be, +0x1d04,0x1d04,0x1d19,0x1d10,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16, +0x1d16,0x2c1,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16, +0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d10,0x1d10,0x1d04,0x1d04,0x1d04,0x1d04,0x1d04,0x2c1, +0x2c1,0x2c1,0x1d10,0x1d10,0x1d04,0x1d13,0x1d07,0x1d1c,0x1d1c,0x1d0a,0x1d0a,0x1d0a,0x1d0a,0x1d0a,0x1d0a,0x1d0a, +0x1d0a,0x1d0a,0x1d0a,0x1d0a,0x1d0d,0x1d0d,0x1d0d,0x1d0d,0x1d0d,0x1d0d,0x1d0d,0x1d0d,0x1d0d,0x1d0d,0x2c1,0x2c1, +0x2c1,0x2c1,0x2c1,0x2c1,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25, +0x1d1f,0x1d1f,0x1d1f,0x1d1f,0x1d22,0x1d22,0x1d22,0x1d22,0x1d22,0x1d22,0x1d22,0x1d22,0x1d22,0x1d22,0x2c4,0x2c4, +0x2c4,0x2c4,0x2c4,0x2c4,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7, +0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7, +0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x9b1,0x9b1,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a, +0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7, +0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced, +0xced,0xced,0xced,0x136e,0x136e,0x136e,0x2ca,0x2ca,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24, +0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24, +0xf24,0xf24,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca, 0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca, -0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x95d,0x95d,0x1c3b,0x1c3b,0x1c3b,0x1c3b, -0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x2ca,0x2ca,0x2ca,0x2ca, -0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0xc6c,0xc6c,0xc6c,0xc6c, -0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0x129f,0x129f,0x129f,0x2cd,0x2cd,0xe94,0xe94,0xe94,0xe94, -0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94, -0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd, -0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd, -0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88, -0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88, -0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0x2d0,0x2d0,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1, -0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x1bab,0x1bab,0x1bab, -0x1bab,0x1c29,0x2d3,0x2d3,0x2d3,0x2d3,0x2d3,0x2d3,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8, -0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8, -0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x2d6,0x2d6,0x1785,0x1785,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9, -0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db, -0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4, -0x1af4,0x1af4,0x1af4,0x2df,0x2df,0x2df,0x2df,0x2df,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b, -0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x3e7,0x3db,0x3db,0x3db,0x3db,0x3db,0x3db,0x3db, -0x3db,0x3e7,0x3e7,0x3e7,0x3e7,0x3e1,0x111f,0x12f6,0x3ea,0x927,0x92a,0x3d8,0x3d8,0x111c,0x12f3,0x12f3, -0x3ed,0x3ed,0x3ed,0x3ed,0x3ed,0x3ed,0x3ed,0x3ed,0x111c,0x3db,0x3db,0x3e7,0xcae,0x3ea,0x3ea,0x3ea, -0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea, -0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3db,0x3db,0x8af,0x8b2,0x945,0x945, -0x945,0x945,0x945,0x945,0x945,0x945,0x945,0x945,0x3e4,0xf7e,0xf7b,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9, -0x14b8,0x1122,0x1122,0xed0,0xed0,0xda1,0xed0,0xed0,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea, -0x3ea,0x3ed,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ed,0x3ea,0x3ea,0x3ed,0x3ea,0x3ea,0x3ea, -0x3ea,0x3ea,0x12f3,0x12f6,0x3de,0x3ea,0x3e7,0x3e7,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489, -0x489,0x12ff,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489, -0x489,0x489,0x12ff,0x1857,0x1857,0xf9c,0x47a,0x483,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5, -0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0xba3, -0xba3,0xdb0,0xdb0,0x8b5,0xdad,0x13da,0x13da,0x13da,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8, -0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8, -0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4ce,0x4ce,0x4ce,0x1137,0x1137,0x1137,0x1137,0x1137, -0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb, -0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb, -0x4cb,0x4cb,0x1134,0x1134,0x1134,0x1134,0x1134,0x1134,0x4d1,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce, -0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce, -0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4da,0x4d4,0x4da,0x4d4, -0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4, -0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4d4,0x4d4, -0x4d4,0x4d4,0x4d7,0x9a2,0xfc9,0xfc9,0xfcc,0xfc9,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4, -0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4, -0x4da,0x4d4,0xfcc,0xfc9,0xfcc,0xfc9,0xfcc,0xfc9,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6, -0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6, -0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x6a5,0x6a5,0x6a8,0x504,0x6b4,0x6b1,0x6b1,0x6ae, -0x52e,0x52e,0x4ec,0x4ec,0x4ec,0x4ec,0x4ec,0xb34,0x6b7,0x510,0x6cf,0x6d2,0x525,0x6b7,0x513,0x513, -0x504,0x51f,0x51f,0x6a5,0x52b,0x528,0x6ab,0x4fe,0x4f5,0x4f5,0x4f8,0x4f8,0x4f8,0x4f8,0x4f8,0x4fb, -0x4f8,0x4f8,0x4f8,0x4ef,0x537,0x534,0x531,0x531,0x6c3,0x519,0x516,0x6c0,0x6bd,0x6ba,0x6cc,0x507, -0x6c9,0x6c9,0x51c,0x51f,0x6c6,0x6c6,0x51c,0x51f,0x501,0x504,0x504,0x504,0x522,0x50d,0x50a,0xbb8, -0xad7,0xad7,0xad4,0xad4,0xad4,0xad4,0xbaf,0xbaf,0xbaf,0xbaf,0xbb5,0xcdb,0xcd8,0xdbc,0xdbf,0xbb2, -0xdbf,0xdbf,0xdbf,0xdbf,0xdbc,0xdbf,0xdbf,0xbac,0x55b,0x55b,0x55b,0x55b,0x55b,0x55b,0x55b,0x558, -0x55e,0x73e,0x55b,0x9a5,0x9c6,0xada,0xada,0xada,0xbbe,0xbbe,0xdc5,0xdc5,0xdc5,0xdc5,0x1140,0x1143, -0x1143,0x1314,0x14a6,0x14d0,0x14d3,0x14d3,0x16da,0x185a,0x56a,0x56a,0x582,0x6e4,0x567,0x6de,0x56a,0x57f, -0x567,0x6e4,0x579,0x582,0x582,0x582,0x579,0x579,0x582,0x582,0x582,0x6ea,0x567,0x582,0x6e7,0x567, -0x576,0x582,0x582,0x582,0x582,0x582,0x567,0x567,0x56d,0x6de,0x6e1,0x567,0x582,0x567,0x6ed,0x567, -0x582,0x570,0x588,0x6f0,0x582,0x582,0x573,0x579,0x582,0x582,0x585,0x582,0x579,0x57c,0x57c,0x57c, -0x57c,0xae3,0xae0,0xcde,0xdce,0xbd3,0xbd6,0xbd6,0xbd0,0xbcd,0xbcd,0xbcd,0xbcd,0xbd6,0xbd3,0xbd3, -0xbd3,0xbd3,0xbca,0xbcd,0xdcb,0xedc,0xedf,0xfd2,0x1146,0x1146,0x1146,0x6f6,0x6f3,0x58b,0x58e,0x58e, -0x58e,0x58e,0x58e,0x6f3,0x6f6,0x6f6,0x6f3,0x58e,0x6fc,0x6fc,0x6fc,0x6fc,0x6fc,0x6fc,0x6fc,0x6fc, -0x6fc,0x6fc,0x6fc,0x6fc,0x597,0x597,0x597,0x597,0x6f9,0x6f9,0x6f9,0x6f9,0x6f9,0x6f9,0x6f9,0x6f9, -0x6f9,0x6f9,0x591,0x591,0x591,0x591,0x591,0x591,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d, -0x59a,0x59d,0x59d,0x59d,0x59d,0x59d,0x5a0,0x59a,0x59d,0x59d,0x59a,0x59a,0x59a,0x59a,0x59d,0x59d, -0x6ff,0x6ff,0x59a,0x59a,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d, -0x59d,0x5a0,0x5a0,0x5a0,0x59d,0x59d,0x702,0x59d,0x702,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d, -0x59a,0x59d,0x59a,0x59a,0x59a,0x59a,0x59a,0x59a,0x59d,0x59d,0x59a,0x6ff,0x59a,0x59a,0x59a,0xae9, -0xae9,0xae9,0xae9,0xae9,0xae9,0xae9,0xae9,0xae9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9, -0xbd9,0xbd9,0xbd9,0xbd9,0x705,0x5a3,0x705,0x705,0x5a6,0x5a3,0x5a3,0x705,0x705,0x5a6,0x5a3,0x705, -0x5a6,0x5a3,0x5a3,0x705,0x5a3,0x705,0x5b2,0x5af,0x5a3,0x705,0x5a3,0x5a3,0x5a3,0x5a3,0x705,0x5a3, -0x5a3,0x705,0x705,0x705,0x705,0x5a3,0x5a3,0x705,0x5a6,0x705,0x5a6,0x705,0x705,0x705,0x705,0x705, -0x70b,0x5a9,0x705,0x5a9,0x5a9,0x5a3,0x5a3,0x5a3,0x705,0x705,0x705,0x705,0x5a3,0x5a3,0x5a3,0x5a3, -0x705,0x705,0x5a3,0x5a3,0x5a3,0x5a6,0x5a3,0x5a3,0x5a6,0x5a3,0x5a3,0x5a6,0x705,0x5a6,0x5a3,0x5a3, -0x705,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x705,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, -0x5a3,0x5a3,0x5a3,0x5a3,0x708,0x705,0x5a6,0x5a3,0x705,0x705,0x705,0x705,0x5a3,0x5a3,0x705,0x705, -0x5a3,0x5a6,0x708,0x708,0x5a6,0x5a6,0x5a3,0x5a3,0x5a6,0x5a6,0x5a3,0x5a3,0x5a6,0x5a6,0x5a3,0x5a3, -0x5a3,0x5a3,0x5a3,0x5a3,0x5a6,0x5a6,0x705,0x705,0x5a6,0x5a6,0x705,0x705,0x5a6,0x5a6,0x5a3,0x5a3, -0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x705,0x5a3,0x5a3,0x5a3,0x705,0x5a3,0x5a3, -0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x705,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a6,0x5a6,0x5a6,0x5a6, -0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x705, -0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, -0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, -0x5a6,0x5a6,0x5a6,0x5a6,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a6,0x5a6,0x5a6,0x5a6,0x5a3,0x5ac, -0x5a3,0x5a3,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc, -0x5b5,0xaec,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5be,0x5bb,0x5be,0x5bb,0x5b5,0x5b5,0x5b5,0x5b5, -0x5b5,0x5b5,0x70e,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x7fe,0x7fe,0x5b5,0x5b5,0x5b5,0x5b5, -0x5b8,0x5b8,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x804,0x801,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5, -0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5, -0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0xaec, -0xbe2,0xaec,0xaec,0xaec,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1, -0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1, -0x5c1,0x5c1,0x5c1,0x5c1,0x717,0x717,0x717,0x717,0x717,0x717,0x717,0x717,0x717,0x717,0x5c7,0xc3f, -0xc3f,0xc3f,0xc3f,0xc3f,0xc3f,0xc3f,0xc3f,0xc3f,0xc3f,0xc3f,0xc3f,0xc3f,0xc3f,0xc3f,0xc3f,0xc3f, -0xc3f,0xc3f,0xc3f,0xd4d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d, -0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x5ca,0x5cd,0x5cd,0x5cd,0x5cd,0x5cd,0x5cd,0x5cd, -0x5cd,0x5cd,0x5cd,0x5cd,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d, -0x5cd,0x5cd,0x5cd,0x5cd,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d, -0x71d,0x71d,0x71d,0x71d,0x720,0x720,0x720,0x720,0x720,0x720,0x720,0x720,0x720,0x720,0x720,0x720, -0x720,0x720,0x720,0x720,0x5d0,0x5d0,0x720,0x720,0x720,0x720,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5, -0xbe5,0xbe5,0xbe5,0xbe5,0x726,0x726,0x5d3,0x723,0x723,0x723,0x723,0x723,0x723,0x723,0x5d3,0x5d3, -0x5d3,0x5d3,0x5d6,0x5d6,0x5d6,0x5d6,0x726,0x726,0x5d6,0x5d6,0x726,0x726,0x5d3,0x5d3,0x5d3,0x5d3, -0x726,0x726,0x5d6,0x5d6,0x726,0x726,0x5d3,0x5d3,0x5d3,0x5d3,0x726,0x726,0x723,0x5d3,0x5d6,0x726, -0x5d3,0x5d3,0x723,0x726,0x726,0x726,0x5d6,0x5d6,0x5d3,0x5d3,0x5d3,0x5d3,0x5d3,0x5d3,0x5d3,0x5d3, -0x5d3,0x5d3,0x5d3,0x5d3,0x5d3,0x5d3,0x726,0x723,0x726,0x723,0x5d3,0x5d6,0x5d6,0x5d6,0x5d6,0x5d6, -0x5d6,0x5d3,0x5d3,0x723,0xaf2,0xaf2,0xaf2,0xaf2,0xaf2,0xaf2,0xaf2,0xaf2,0xbe8,0xbe8,0xbe8,0xbe8, -0xbe8,0xc57,0xc57,0xbe8,0x5dc,0x5dc,0x5dc,0x5dc,0x5d9,0x72f,0x72f,0x5d9,0x5d9,0x729,0x5d9,0x5d9, -0x5d9,0x5d9,0x729,0x729,0x5d9,0x5d9,0x5d9,0x5d9,0xd56,0xd56,0xbeb,0xbeb,0xdd7,0xaf5,0x5dc,0x5dc, -0x72c,0x5df,0x72c,0x5dc,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9, -0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5dc,0x5dc,0x5dc, -0x5d9,0x5d9,0x5d9,0x5d9,0x72f,0x5d9,0x72f,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x807,0x807,0x807,0x807, -0x807,0x807,0x807,0x807,0x807,0x807,0x807,0x807,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9, -0x5d9,0x5d9,0x5d9,0x5d9,0x72f,0x72f,0x5e2,0x72f,0x729,0x729,0x5d9,0x729,0x72c,0x729,0x729,0x5d9, -0x729,0x72f,0x5e2,0x72f,0xaf5,0xaf5,0xbee,0xbee,0xbee,0xbee,0xbee,0xbee,0xbee,0xbee,0xbee,0xbee, -0xbee,0xbee,0xdd4,0xe8b,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5, -0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e8,0x139b,0x139b,0x139b,0x5e8,0x5e8,0x5e8,0x5e8, -0x5e8,0x5e8,0x5e8,0x5e8,0x14d9,0x5ee,0x5ee,0x5ee,0x5ee,0x139b,0x5e8,0x5e8,0x5ee,0x5ee,0x139e,0x139e, -0x5f4,0x5f4,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8, -0x5e8,0x5e8,0x5e8,0x5e8,0x139b,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8, -0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x735,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8, -0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x139b,0x5e8,0x139b,0x5e8,0x5e8,0x5e8,0x5e8,0x139b, -0x139b,0x139b,0x5e8,0x1299,0x5e8,0x5e8,0x5e8,0x5f1,0x5f1,0x5f1,0x5f1,0x1320,0x1320,0x5e8,0x5eb,0x5eb, -0x5ee,0x5e8,0x5e8,0x5e8,0xbf4,0xbf1,0xbf4,0xbf1,0xbf4,0xbf1,0xbf4,0xbf1,0xbf4,0xbf1,0xbf4,0xbf1, -0xbf4,0xbf1,0x732,0x732,0x732,0x732,0x732,0x732,0x732,0x732,0x732,0x732,0x5e8,0x5e8,0x5e8,0x5e8, -0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x139b,0x5e8,0x5e8,0x5e8, -0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x139b,0x615,0x615,0x615,0x615, -0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615, -0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x60c,0x60c,0x60c,0x60c,0x60c,0x60c, -0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f, -0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0xb46,0xb46,0xb46,0xb46, -0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0x615,0x615,0x95a,0x615, -0x615,0x615,0x615,0x615,0x615,0x615,0x60c,0x60c,0xbf7,0xd7a,0x1b0f,0x1b0f,0x612,0x618,0x615,0x60f, -0x612,0x618,0x615,0x60f,0x612,0x618,0x615,0x60f,0x612,0x618,0x615,0x60f,0x612,0x618,0x615,0x60f, -0x612,0x618,0x615,0x60f,0x612,0x618,0x615,0x60f,0x612,0x618,0x615,0x60f,0x615,0x60f,0x615,0x60f, -0x615,0x60f,0x615,0x60f,0x615,0x60f,0x615,0x60f,0x612,0x618,0x615,0x60f,0x612,0x618,0x615,0x60f, -0x612,0x618,0x615,0x60f,0x612,0x618,0x615,0x60f,0x615,0x60f,0x612,0x618,0x615,0x60f,0x615,0x60f, -0x612,0x618,0x615,0x60f,0x612,0x618,0x615,0x60f,0x615,0x60f,0x1323,0x1323,0x1323,0x1323,0x1323,0x1323, -0x1323,0x1323,0x1323,0x1323,0x1323,0x1323,0x1323,0x1323,0x615,0x60f,0x615,0x60f,0x615,0x60f,0x612,0x618, -0x612,0x618,0x615,0x60f,0x615,0x60f,0x615,0x60f,0x615,0x60f,0x615,0x60f,0x615,0x60f,0x615,0x60f, -0x612,0x615,0x60f,0x612,0x615,0x60f,0x612,0x618,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f, -0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x612, -0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615, -0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f, -0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x612,0x612,0x612,0x612,0x612,0x612,0x612, -0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x60f,0x615,0x918,0x91b,0x1b0f,0x1b0f,0x1b0f,0x1b0f, -0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x612,0x60f,0x612,0x612, -0x612,0x612,0x612,0x612,0x60f,0x612,0x60f,0x60f,0x612,0x612,0x60f,0x60f,0x612,0x612,0x60f,0x612, -0x60f,0x612,0x60f,0x60f,0x612,0x60f,0x60f,0x612,0x60f,0x612,0x60f,0x60f,0x612,0x60f,0x612,0x612, -0x60f,0x60f,0x60f,0x612,0x60f,0x60f,0x60f,0x60f,0x60f,0x612,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f, -0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f, -0x612,0x612,0x60f,0x60f,0x612,0x60f,0x612,0x60f,0x60f,0x60f,0x60f,0x60f,0x612,0x612,0x612,0x612, -0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612, -0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x618, -0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615, -0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615, -0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618, -0x618,0x618,0x618,0x618,0x618,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615, -0x61b,0x61b,0x61b,0x61b,0xfde,0xfde,0xfde,0x14dc,0x14dc,0x14dc,0x14dc,0x14dc,0x14dc,0x14dc,0x16e0,0x16e0, -0x864,0x86a,0x86a,0x876,0x876,0x867,0x85e,0x867,0x85e,0x867,0x85e,0x867,0x85e,0x867,0x85e,0x867, -0x62a,0x62a,0x624,0x62a,0x624,0x62a,0x624,0x62a,0x624,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x62a, -0x624,0x627,0x62d,0x62a,0x624,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x627, -0x62d,0x62a,0x624,0x62a,0x624,0x62a,0x624,0x62a,0x624,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x627, -0x62d,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x627, -0x62d,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x627,0x714,0x714,0x714,0x714, -0x714,0x714,0x714,0x714,0x714,0x714,0x714,0x714,0x714,0x714,0x714,0x714,0x714,0x714,0x714,0x714, -0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711, -0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711, -0x711,0x711,0x71a,0x71a,0x71a,0x71a,0x71a,0x71a,0x71a,0x71a,0x71a,0x71a,0x71a,0x71a,0x71a,0x71a, -0x71a,0x71a,0x71a,0x71a,0x717,0x717,0x717,0x717,0x717,0x717,0x717,0x717,0x717,0x717,0x717,0x717, -0x717,0x717,0x717,0x717,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d, -0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d, -0x71d,0x71d,0x71d,0x71d,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738, -0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738, -0x738,0x738,0x738,0x738,0xc45,0x8c7,0x8c1,0x8be,0x8c4,0x8bb,0x74d,0x750,0x750,0x750,0x750,0x750, -0x750,0x750,0x750,0x750,0x8cd,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d, -0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d, -0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x8ca,0x8ca,0x753,0x8dc,0x8df,0x8e5,0x80a,0x816,0x8fa,0x813, -0x8d3,0x8d0,0x8d3,0x8d0,0x8d9,0x8d6,0x8d9,0x8d6,0x8d3,0x8d0,0x810,0x8e5,0x8d3,0x8d0,0x8d3,0x8d0, -0x8d3,0x8d0,0x8d3,0x8d0,0x8eb,0x8f1,0x8ee,0x8ee,0x759,0x795,0x795,0x795,0x795,0x795,0x795,0x78f, -0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f, -0x78f,0x78f,0x78f,0x75c,0x777,0x756,0x77d,0x780,0x77a,0x792,0x792,0x792,0x792,0x792,0x792,0x78c, -0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c, -0x78c,0x78c,0x78c,0x75c,0x777,0x756,0x777,0xc48,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8, -0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8, -0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x1293,0x1293,0x1293,0x1293,0x1293,0x7fb, -0x810,0x813,0x813,0x813,0x813,0x813,0x813,0x813,0x813,0x813,0x933,0x933,0x933,0x933,0x819,0x819, -0x8e8,0x8f7,0x8f7,0x8f7,0x8f7,0x8f4,0x80d,0x8e2,0xb19,0xb19,0xb19,0xc5a,0xc78,0xc75,0xb37,0x8b8, -0x81f,0x81c,0x81f,0x822,0x81c,0x81f,0x81c,0x81f,0x81c,0x81f,0x81c,0x81c,0x81c,0x81c,0x81c,0x81c, -0x81f,0x81f,0x81c,0x81f,0x81f,0x81c,0x81f,0x81f,0x81c,0x81f,0x81f,0x81c,0x81f,0x81f,0x81c,0x81c, -0xc7b,0x831,0x82b,0x831,0x82b,0x831,0x82b,0x831,0x82b,0x831,0x82b,0x82b,0x82e,0x82b,0x82e,0x82b, -0x82e,0x82b,0x82e,0x82b,0x82e,0x82b,0x82e,0x82b,0x82e,0x82b,0x82e,0x82b,0x82e,0x82b,0x82e,0x82b, -0x82e,0x82b,0x82e,0x831,0x82b,0x82e,0x82b,0x82e,0x82b,0x82e,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b, -0x82e,0x82e,0x82b,0x82e,0x82e,0x82b,0x82e,0x82e,0x82b,0x82e,0x82e,0x82b,0x82e,0x82e,0x82b,0x82b, -0x82b,0x82b,0x82b,0x831,0x82b,0x831,0x82b,0x831,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x831,0x82b, -0x82b,0x82b,0x82b,0x82b,0x82e,0x831,0x831,0x82e,0x82e,0x82e,0x82e,0x900,0x903,0x834,0x837,0xc63, -0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d, -0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d, -0x840,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d, -0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x849,0x849,0x849,0x849, -0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849, -0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0xd5f,0xd5f,0xe8e,0x843,0x90c,0x90c,0x90c,0x90c, -0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0xd59,0xd59,0xd59,0xd59,0x84c,0x84c,0x84c,0x84c, -0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c, -0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x1a58,0x912,0x912,0x912,0x912, -0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x84f,0x84f,0x84f, -0x84f,0x84f,0x84f,0xd62,0xd62,0xd62,0xd62,0x915,0x915,0x915,0x915,0x915,0x84f,0x84f,0x84f,0x84f, -0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f, -0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0xd62,0xd62, -0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852, -0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852, -0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855, -0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855, -0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91, -0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91, -0x1104,0x1104,0x1104,0x1104,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858, -0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858, -0x858,0x858,0x858,0x858,0x858,0x858,0x85b,0x85b,0x858,0x85b,0x858,0x85b,0x85b,0x858,0x858,0x858, -0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x85b,0x858,0x85b,0x858,0x85b,0x85b,0x858,0x858,0x85b, -0x85b,0x85b,0x858,0x858,0x858,0x858,0x1497,0x1497,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c, -0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c, -0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c, -0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x12d2,0x12d2,0x12d2,0x12d2,0x127b,0x127b,0x127b,0x127b, -0x127b,0x127b,0x127b,0x127b,0xd59,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66, -0xc66,0xc66,0xc66,0xc66,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f, -0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f, -0x90f,0x90f,0x90f,0x90f,0x90f,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66, -0xc66,0xc66,0xc66,0xc66,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912, -0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912, -0x912,0x912,0x912,0xd62,0x99c,0x97e,0x97e,0x97e,0x97e,0x978,0x97e,0x97e,0x990,0x97e,0x97e,0x97b, -0x987,0x98d,0x98d,0x98d,0x98d,0x98d,0x990,0x978,0x984,0x978,0x978,0x978,0x96c,0x96c,0x978,0x978, -0x978,0x978,0x978,0x978,0x993,0x993,0x993,0x993,0x993,0x993,0x993,0x993,0x993,0x993,0x978,0x978, -0x978,0x978,0x978,0x978,0x978,0x978,0x978,0x978,0x97b,0x96c,0x978,0x96c,0x978,0x96c,0x98a,0x981, -0x98a,0x981,0x999,0x999,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8, -0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8, -0x9a8,0x9a8,0x9a8,0x9a8,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab, -0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab, -0x9ab,0x9ab,0x9ab,0x9ab,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae, -0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae, -0x9ae,0x9ae,0x9ae,0x9ae,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7, -0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7, -0x9b7,0x9b7,0x9b1,0x9b1,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba, -0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba, -0x9ba,0x9ba,0x9b4,0x9b4,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7, -0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7, -0x9b7,0x9b7,0x9b7,0x9b7,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba, -0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba, -0x9ba,0x9ba,0x9ba,0x9ba,0x9bd,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0, -0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0, -0x9bd,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0, -0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0xa4d,0xa4d,0xfc3,0xa4d, -0xa4d,0xa4d,0xa50,0xa4d,0xfc3,0xa4d,0xa4d,0xfba,0xa47,0xa3b,0xa3b,0xa3b,0xa3b,0xa4a,0xa3b,0xfab, -0xfab,0xfab,0xa3b,0xa3e,0xa47,0xa41,0xfb1,0xfbd,0xfbd,0xfab,0xfab,0xfc3,0xb3d,0xb3d,0xb3d,0xb3d, -0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,0xa53,0xa53,0xa44,0xa44,0xa44,0xa44,0xa4d,0xa4d,0xa4d,0xa4d, -0xa4d,0xa4d,0xa4a,0xa4a,0xa3b,0xa3b,0xfc3,0xfc3,0xfc3,0xfc3,0xfab,0xfab,0xa4d,0xa4d,0xa4d,0xa4d, -0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d, -0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa62,0xa62,0xa62,0xa62, -0xa62,0xa62,0xa62,0xdb9,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62, -0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62, -0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xdb9,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62, -0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68, -0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68, -0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e, -0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6b,0xa71,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0x113d, -0x113d,0x113d,0x113d,0x113d,0x113d,0x113d,0x113d,0x113d,0x113a,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e, -0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e, -0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa83,0xa83,0xa83,0xa83, -0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83, -0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xaa7,0xaa7,0xaa7,0xaaa, -0xaaa,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7, -0xa8f,0xa8f,0xaa4,0xa86,0xa86,0xa86,0xa86,0xa86,0xa86,0xa86,0xaa4,0xaa4,0xaa7,0xaa7,0xaa7,0xaa7, -0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7, -0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xac8,0xac8,0xac8,0xac8, -0xac8,0xab3,0xab3,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8, -0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8, -0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xacb,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8, -0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8, -0xac8,0xac8,0xac8,0xac8,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec, -0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xbe2, -0xbe2,0xbe2,0xbe2,0xbe2,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8, -0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8, -0xaf8,0xaf8,0xaf8,0xaf8,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a, -0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a, -0xb0a,0xb0a,0xb0a,0xb0a,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10, -0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10, -0xb10,0xb10,0xb10,0xb10,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c, -0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0x13a1,0x13a1,0x13a1,0x1ad3, -0x1ad3,0x1ad3,0x1ad3,0x1ad3,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f, -0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f, -0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6, -0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22, -0xb22,0xb22,0xb22,0xb22,0xb22,0xb25,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22, -0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22, -0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb28,0xb28,0xc69,0xc69,0xb28,0xb28,0xb28,0xb28, -0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xc69,0xb28,0xb28,0xb28, -0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c, -0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c, -0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0x14df,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xced,0xced, -0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52, -0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xcea,0xcea,0xd38,0xd38,0xd38,0xd38, -0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xb55,0xb55,0xb55,0xb55, -0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55, -0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb58,0xb58,0xb58,0xb58, -0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58, -0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb67,0xb67,0xb67,0xb67, -0xb67,0xb5e,0xb6a,0xb70,0xb70,0xb70,0xb64,0xb64,0xb64,0xb6d,0xb61,0xb61,0xb61,0xb61,0xb61,0xb5b, -0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb70,0xb70,0xb70,0xb70,0xb70,0xb64,0xb64,0xb64,0xb64, -0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64, -0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb67,0xb67, -0xb70,0xb70,0xb70,0xb64,0xb64,0xb70,0xb70,0xb70,0xb70,0xb70,0xb70,0xb70,0xb64,0xb64,0xb64,0xb64, -0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64, -0xb64,0xb64,0xb70,0xb70,0xb70,0xb70,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64, -0xb64,0xb64,0xb64,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64, -0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64, -0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0x16e3,0x16e3,0xb7c,0xb73,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79, -0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79, -0xb79,0xb79,0xb79,0xb73,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c, -0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c, -0xb7c,0xb7c,0xb7c,0xb73,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79, -0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb73,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79, -0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c, -0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb73,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79, -0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb76,0xb76,0xb76,0xb76, -0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76, -0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb7c,0xb7c,0xb7c,0xb7c, -0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c, -0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79, -0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb7c,0xb7c,0xb7c,0xb7c, -0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c, -0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79, +0x2ca,0x2ca,0x2ca,0x2ca,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09, +0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09, +0xc09,0xc09,0x2cd,0x2cd,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380, +0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1caa,0x1caa,0x1caa,0x1caa,0x1d28,0x2d0,0x2d0, +0x2d0,0x2d0,0x2d0,0x2d0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0, +0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0, +0x14a0,0x14a0,0x2d3,0x2d3,0x1872,0x1872,0x2d6,0x2d6,0x2d6,0x2d6,0x2d6,0x2d6,0x2d6,0x2d6,0x2d6,0x2d6, +0x2d6,0x2d6,0x2d6,0x2d6,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8, +0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9, +0x2d9,0x2d9,0x2d9,0x2d9,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46, +0x1d46,0x1d46,0x1d46,0x1d46,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x2dc, +0x2dc,0x2dc,0x2dc,0x2dc,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a, +0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46, +0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46, +0x1d46,0x1d46,0x2df,0x2df,0x41a,0x40e,0x40e,0x40e,0x40e,0x40e,0x40e,0x40e,0x40e,0x41a,0x41a,0x41a, +0x41a,0x414,0x11eb,0x13c5,0x420,0x97b,0x97e,0x40b,0x40b,0x11e8,0x13c2,0x13c2,0x41d,0x41d,0x41d,0x41d, +0x41d,0x41d,0x41d,0x41d,0x11e8,0x40e,0x40e,0x41a,0xd32,0x420,0x420,0x420,0x420,0x420,0x420,0x420, +0x420,0x420,0x420,0x420,0x420,0x420,0x420,0x420,0x420,0x420,0x420,0x420,0x420,0x420,0x420,0x420, +0x420,0x420,0x420,0x420,0x420,0x420,0x40e,0x40e,0x900,0x903,0x999,0x999,0x999,0x999,0x999,0x999, +0x999,0x999,0x999,0x999,0x417,0x1023,0x1020,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x1593,0x11ee,0x11ee,0xf60, +0xf60,0xe28,0xf60,0xf60,0x420,0x420,0x420,0x420,0x420,0x420,0x420,0x420,0x420,0x423,0x420,0x420, +0x420,0x420,0x420,0x420,0x420,0x423,0x420,0x420,0x423,0x420,0x420,0x420,0x420,0x420,0x13c2,0x13c5, +0x411,0x420,0x41a,0x41a,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x13ce,0x4c2,0x4c2, +0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x13ce,0x1944, +0x1944,0x1044,0x4b3,0x4bc,0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504, +0x504,0x504,0x504,0x504,0x504,0x4fe,0x4fe,0x4fe,0x4fe,0x4fe,0x4fe,0xc24,0xc24,0xe37,0xe37,0x906, +0xe34,0x14b2,0x14b2,0x14b2,0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501, +0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501, +0x501,0x501,0x501,0x501,0x50a,0x50a,0x50a,0x1203,0x1203,0x1203,0x1203,0x1203,0x507,0x507,0x507,0x507, +0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507, +0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x1200,0x1200, +0x1200,0x1200,0x1200,0x1200,0x50d,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a, +0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a, +0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x516,0x513,0x516,0x513,0x516,0x513,0x516,0x513, +0x516,0x513,0x516,0x513,0x516,0x513,0x516,0x513,0x516,0x513,0x516,0x513,0x516,0x513,0x513,0x513, +0x513,0x513,0x510,0x9ff,0x1071,0x1071,0x1077,0x1071,0x516,0x513,0x516,0x513,0x516,0x513,0x516,0x513, +0x516,0x513,0x516,0x513,0x516,0x513,0x516,0x513,0x516,0x513,0x516,0x513,0x516,0x513,0x516,0x513, +0x516,0x513,0x516,0x513,0x516,0x513,0x516,0x513,0x516,0x513,0x1074,0x1071,0x1074,0x1071,0x1074,0x1071, +0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b, +0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b, +0x6f0,0x6f0,0x6f3,0x546,0x6ff,0x6fc,0x6fc,0x702,0x570,0x570,0x52e,0x52e,0x52e,0x52e,0x52e,0xbb5, +0x6f6,0x54f,0x71d,0x720,0x567,0x6f6,0x555,0x555,0x546,0x561,0x561,0x6f0,0x56d,0x56a,0x6f9,0x540, +0x537,0x537,0x53a,0x53a,0x53a,0x53a,0x53a,0x53d,0x53a,0x53a,0x53a,0x531,0x579,0x576,0x573,0x573, +0x70e,0x55b,0x558,0x70b,0x708,0x705,0x71a,0x552,0x714,0x717,0x55e,0x561,0x711,0x711,0x55e,0x561, +0x543,0x546,0x546,0x546,0x564,0x54c,0x549,0xc39,0xb58,0xb58,0xb55,0xb55,0xb55,0xb55,0xc30,0xc30, +0xc30,0xc30,0xc36,0xd5f,0xd5c,0xe43,0xe49,0xc33,0xe49,0xe49,0xe49,0xe49,0xe46,0xe49,0xe49,0xc2d, +0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59a,0x5a0,0x78c,0x59d,0xa02,0xa23,0xb5b,0xb5b,0xb5b, +0xc3f,0xc3f,0xe4f,0xe4f,0xe4f,0xe4f,0x120c,0x120f,0x120f,0x13e3,0x1581,0x15ab,0x15ae,0x15ae,0x17c7,0x1947, +0x5af,0x5af,0x5c7,0x732,0x5a9,0x72c,0x5af,0x5c4,0x5a9,0x732,0x5be,0x5c7,0x5c7,0x5c7,0x5be,0x5be, +0x5c7,0x5c7,0x5c7,0x738,0x5a9,0x5c7,0x735,0x5a9,0x5bb,0x5c7,0x5c7,0x5c7,0x5c7,0x5c7,0x5a9,0x5a9, +0x5b2,0x72c,0x72f,0x5a9,0x5c7,0x5a9,0x73b,0x5ac,0x5c7,0x5b5,0x5cd,0x73e,0x5c7,0x5c7,0x5b8,0x5be, +0x5c7,0x5c7,0x5ca,0x5c7,0x5be,0x5c1,0x5c1,0x5c1,0x5c1,0xb64,0xb61,0xd62,0xe58,0xc54,0xc57,0xc57, +0xc51,0xc4e,0xc4e,0xc4e,0xc4e,0xc57,0xc54,0xc54,0xc54,0xc54,0xc4b,0xc4e,0xe55,0xf6c,0xf6f,0x107d, +0x1212,0x1212,0x1212,0x744,0x741,0x5d0,0x5d3,0x5d3,0x5d3,0x5d3,0x5d3,0x741,0x744,0x744,0x741,0x5d3, +0x74a,0x74a,0x74a,0x74a,0x74a,0x74a,0x74a,0x74a,0x74a,0x74a,0x74a,0x74a,0x5dc,0x5dc,0x5dc,0x5dc, +0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9, +0x5e2,0x5e2,0x5e2,0x5e2,0x5e2,0x5e2,0x5e2,0x5e2,0x5df,0x5e2,0x5e2,0x5e2,0x5e2,0x5e2,0x5e5,0x5df, +0x5e2,0x5e2,0x5df,0x5df,0x5df,0x5df,0x5e2,0x5e2,0x74d,0x74d,0x5df,0x5df,0x5e2,0x5e2,0x5e2,0x5e2, +0x5e2,0x5e2,0x5e2,0x5e2,0x5e2,0x5e2,0x5e2,0x5e2,0x5e2,0x5e5,0x5e5,0x5e5,0x5e2,0x5e2,0x750,0x5e2, +0x750,0x5e2,0x5e2,0x5e2,0x5e2,0x5e2,0x5e2,0x5e2,0x5df,0x5e2,0x5df,0x5df,0x5df,0x5df,0x5df,0x5df, +0x5e2,0x5e2,0x5df,0x74d,0x5df,0x5df,0x5df,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a, +0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0x753,0x5e8,0x753,0x753, +0x5eb,0x5e8,0x5e8,0x753,0x753,0x5eb,0x5e8,0x753,0x5eb,0x5e8,0x5e8,0x753,0x5e8,0x753,0x5f7,0x5f1, +0x5e8,0x753,0x5e8,0x5e8,0x5e8,0x5e8,0x753,0x5e8,0x5e8,0x753,0x753,0x753,0x753,0x5e8,0x5e8,0x753, +0x5eb,0x753,0x5eb,0x753,0x753,0x753,0x753,0x753,0x759,0x5f4,0x753,0x5f4,0x5f4,0x5e8,0x5e8,0x5e8, +0x753,0x753,0x753,0x753,0x5e8,0x5e8,0x5e8,0x5e8,0x753,0x753,0x5e8,0x5e8,0x5e8,0x5eb,0x5e8,0x5e8, +0x5eb,0x5e8,0x5e8,0x5eb,0x753,0x5eb,0x5e8,0x5e8,0x753,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x753,0x5e8, +0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x756,0x753,0x5eb,0x5e8, +0x753,0x753,0x753,0x753,0x5e8,0x5e8,0x753,0x753,0x5e8,0x5eb,0x756,0x756,0x5eb,0x5eb,0x5e8,0x5e8, +0x5eb,0x5eb,0x5e8,0x5e8,0x5eb,0x5eb,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5eb,0x5eb,0x753,0x753, +0x5eb,0x5eb,0x753,0x753,0x5eb,0x5eb,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8, +0x5e8,0x753,0x5e8,0x5e8,0x5e8,0x753,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x753,0x5e8,0x5e8, +0x5e8,0x5e8,0x5e8,0x5e8,0x5eb,0x5eb,0x5eb,0x5eb,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8, +0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x753,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8, +0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8, +0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5eb,0x5eb,0x5eb,0x5eb,0x5e8,0x5e8,0x5e8,0x5e8, +0x5e8,0x5e8,0x5eb,0x5eb,0x5eb,0x5eb,0x5e8,0x5ee,0x5e8,0x5e8,0xc5d,0xc5d,0xc5d,0xc5d,0xc5d,0xc5d, +0xc5d,0xc5d,0xc5d,0xc5d,0xc5d,0xc5d,0xc5d,0xc5d,0x5fa,0xb6d,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa, +0x603,0x600,0x603,0x600,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x75c,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa, +0x5fa,0x5fa,0x84c,0x84c,0x5fa,0x5fa,0x5fa,0x5fa,0x5fd,0x5fd,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa, +0x5fa,0x852,0x84f,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa, +0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa, +0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0xb6d,0xc63,0xb6d,0xb6d,0xb6d,0x606,0x606,0x606,0x606, +0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606, +0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x765,0x765,0x765,0x765, +0x765,0x765,0x765,0x765,0x765,0x765,0x60c,0xcc0,0xcc0,0xcc0,0xcc0,0xcc0,0xcc0,0xcc0,0xcc0,0xcc0, +0xcc0,0xcc0,0xcc0,0xcc0,0xcc0,0xcc0,0xcc0,0xcc0,0xcc0,0xcc0,0xcc0,0xdd1,0x76b,0x76b,0x76b,0x76b, +0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b, +0x60f,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x76b,0x76b,0x76b,0x76b, +0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x612,0x612,0x612,0x612,0x76b,0x76b,0x76b,0x76b, +0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76e,0x76e,0x76e,0x76e, +0x76e,0x76e,0x76e,0x76e,0x76e,0x76e,0x76e,0x76e,0x76e,0x76e,0x76e,0x76e,0x615,0x615,0x76e,0x76e, +0x76e,0x76e,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0x774,0x774,0x618,0x771, +0x771,0x771,0x771,0x771,0x771,0x771,0x618,0x618,0x618,0x618,0x61b,0x61b,0x61b,0x61b,0x774,0x774, +0x61b,0x61b,0x774,0x774,0x618,0x618,0x618,0x618,0x774,0x774,0x61b,0x61b,0x774,0x774,0x618,0x618, +0x618,0x618,0x774,0x774,0x771,0x618,0x61b,0x774,0x618,0x618,0x771,0x774,0x774,0x774,0x61b,0x61b, +0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x774,0x771, +0x774,0x771,0x618,0x61b,0x61b,0x61b,0x61b,0x61b,0x61b,0x618,0x618,0x771,0xb73,0xb73,0xb73,0xb73, +0xb73,0xb73,0xb73,0xb73,0xc69,0xc69,0xc69,0xc69,0xc69,0xcd8,0xcd8,0xc69,0x621,0x621,0x621,0x621, +0x61e,0x77d,0x77d,0x61e,0x61e,0x777,0x61e,0x61e,0x61e,0x61e,0x777,0x777,0x61e,0x61e,0x61e,0x61e, +0xdda,0xdda,0xc6c,0xc6c,0xe61,0xb76,0x621,0x621,0x77a,0x624,0x77a,0x621,0x61e,0x61e,0x61e,0x61e, +0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e, +0x61e,0x61e,0x61e,0x61e,0x61e,0x621,0x621,0x621,0x61e,0x61e,0x61e,0x61e,0x77d,0x61e,0x77d,0x61e, +0x61e,0x61e,0x61e,0x61e,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855, +0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x77d,0x77d,0x627,0x77d, +0x777,0x777,0x61e,0x777,0x77a,0x777,0x777,0x61e,0x777,0x77d,0x627,0x77d,0xb76,0xb76,0xc6f,0xc6f, +0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xe5e,0xf1b,0x62a,0x62a,0x62a,0x62a, +0x62a,0x62a,0x62a,0x62a,0x62a,0x62a,0x62a,0x62a,0x62a,0x62a,0x62a,0x62a,0x62a,0x62a,0x62a,0x62a, +0x62d,0x1473,0x1473,0x1473,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x15b4,0x633,0x633,0x633, +0x633,0x1473,0x62d,0x62d,0x633,0x633,0x1476,0x1476,0x639,0x639,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d, +0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x1473,0x62d,0x62d,0x62d, +0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d, +0x62d,0x783,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d, +0x1473,0x62d,0x1473,0x62d,0x62d,0x62d,0x62d,0x1473,0x1473,0x1473,0x62d,0x1368,0x62d,0x62d,0x62d,0x636, +0x636,0x636,0x636,0x13ef,0x13ef,0x62d,0x630,0x630,0x633,0x62d,0x62d,0x62d,0xc75,0xc72,0xc75,0xc72, +0xc75,0xc72,0xc75,0xc72,0xc75,0xc72,0xc75,0xc72,0xc75,0xc72,0x780,0x780,0x780,0x780,0x780,0x780, +0x780,0x780,0x780,0x780,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d, +0x62d,0x62d,0x62d,0x62d,0x1473,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d, +0x62d,0x62d,0x62d,0x1473,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a, +0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a, +0x65a,0x65a,0x651,0x651,0x651,0x651,0x651,0x651,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654, +0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654, +0x654,0x654,0x654,0x654,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7, +0xbc7,0xbc7,0xbc7,0xbc7,0x65a,0x65a,0x9ae,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x651,0x651, +0xc78,0xdfe,0x1c0e,0x1c0e,0x657,0x65d,0x65a,0x654,0x657,0x65d,0x65a,0x654,0x657,0x65d,0x65a,0x654, +0x657,0x65d,0x65a,0x654,0x657,0x65d,0x65a,0x654,0x657,0x65d,0x65a,0x654,0x657,0x65d,0x65a,0x654, +0x657,0x65d,0x65a,0x654,0x65a,0x654,0x65a,0x654,0x65a,0x654,0x65a,0x654,0x65a,0x654,0x65a,0x654, +0x657,0x65d,0x65a,0x654,0x657,0x65d,0x65a,0x654,0x657,0x65d,0x65a,0x654,0x657,0x65d,0x65a,0x654, +0x65a,0x654,0x657,0x65d,0x65a,0x654,0x65a,0x654,0x657,0x65d,0x65a,0x654,0x657,0x65d,0x65a,0x654, +0x65a,0x654,0x13f2,0x13f2,0x13f2,0x13f2,0x13f2,0x13f2,0x13f2,0x13f2,0x13f2,0x13f2,0x13f2,0x13f2,0x13f2,0x13f2, +0x65a,0x654,0x65a,0x654,0x65a,0x654,0x657,0x65d,0x657,0x65d,0x65a,0x654,0x65a,0x654,0x65a,0x654, +0x65a,0x654,0x65a,0x654,0x65a,0x654,0x65a,0x654,0x657,0x65a,0x654,0x657,0x65a,0x654,0x657,0x65d, +0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654, +0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657, +0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a, +0x65a,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654, +0x654,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x65d,0x65d,0x65d,0x65d,0x65d,0x65d,0x65d,0x65d, +0x654,0x65a,0x96c,0x96f,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e, +0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x657,0x654,0x657,0x657,0x657,0x657,0x657,0x657,0x654,0x657,0x654,0x654, +0x657,0x657,0x654,0x654,0x657,0x657,0x654,0x657,0x654,0x657,0x654,0x654,0x657,0x654,0x654,0x657, +0x654,0x657,0x654,0x654,0x657,0x654,0x657,0x657,0x654,0x654,0x654,0x657,0x654,0x654,0x654,0x654, +0x654,0x657,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654, +0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x657,0x657,0x654,0x654,0x657,0x654,0x657,0x654, +0x654,0x654,0x654,0x654,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657, +0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657, +0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x65d,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a, +0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a, +0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65d,0x65d,0x65d,0x65d,0x65d,0x65d,0x65d,0x65d, +0x65d,0x65d,0x65d,0x65d,0x65d,0x65d,0x65d,0x65d,0x65d,0x65d,0x65d,0x65d,0x65d,0x65a,0x65a,0x65a, +0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x660,0x660,0x660,0x660,0x1089,0x1089,0x1089,0x15b7, +0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x17cd,0x17cd,0x8b5,0x8bb,0x8bb,0x8c7,0x8c7,0x8b8,0x8af,0x8b8, +0x8af,0x8b8,0x8af,0x8b8,0x8af,0x8b8,0x8af,0x8b8,0x66f,0x66f,0x669,0x66f,0x669,0x66f,0x669,0x66f, +0x669,0x66f,0x669,0x66c,0x672,0x66f,0x669,0x66f,0x669,0x66c,0x672,0x66f,0x669,0x66f,0x669,0x66c, +0x672,0x66f,0x669,0x66c,0x672,0x66f,0x669,0x66c,0x672,0x66f,0x669,0x66f,0x669,0x66f,0x669,0x66f, +0x669,0x66f,0x669,0x66c,0x672,0x66f,0x669,0x66c,0x672,0x66f,0x669,0x66c,0x672,0x66f,0x669,0x66c, +0x672,0x66f,0x669,0x66c,0x672,0x66f,0x669,0x66c,0x672,0x66f,0x669,0x66c,0x672,0x66f,0x669,0x66c, +0x672,0x66f,0x669,0x66c,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762, +0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f, +0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f, +0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x768,0x768,0x768,0x768,0x768,0x768, +0x768,0x768,0x768,0x768,0x768,0x768,0x768,0x768,0x768,0x768,0x768,0x768,0x765,0x765,0x765,0x765, +0x765,0x765,0x765,0x765,0x765,0x765,0x765,0x765,0x765,0x765,0x765,0x765,0x76b,0x76b,0x76b,0x76b, +0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b, +0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x786,0x786,0x786,0x786, +0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786, +0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0xcc6,0x918,0x90f,0x90c, +0x912,0x915,0x79b,0x79e,0x79e,0x79e,0x79e,0x79e,0x79e,0x79e,0x79e,0x79e,0x91e,0x79b,0x79b,0x79b, +0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b, +0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x91b,0x91b, +0x7a1,0x92d,0x930,0x936,0x858,0x867,0x94e,0x864,0x924,0x921,0x924,0x921,0x92a,0x927,0x92a,0x927, +0x924,0x921,0x85e,0x936,0x924,0x921,0x924,0x921,0x924,0x921,0x924,0x921,0x93c,0x942,0x945,0x93f, +0x7a7,0x7e3,0x7e3,0x7e3,0x7e3,0x7e3,0x7e3,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd, +0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7aa,0x7c5,0x7a4,0x7cb,0x7ce, +0x7c8,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da, +0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7aa,0x7c5,0x7a4,0x7c5,0xcc9, +0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846, +0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846, +0x846,0x846,0x1362,0x1362,0x1362,0x1362,0x1362,0x849,0x85e,0x861,0x861,0x861,0x861,0x861,0x861,0x861, +0x861,0x861,0x987,0x987,0x987,0x987,0x86a,0x86a,0x939,0x94b,0x94b,0x94b,0x94b,0x948,0x85b,0x933, +0xb9a,0xb9a,0xb9a,0xcdb,0xcf9,0xcf6,0xbb8,0x909,0x870,0x86d,0x870,0x873,0x86d,0x870,0x86d,0x870, +0x86d,0x870,0x86d,0x86d,0x86d,0x86d,0x86d,0x86d,0x870,0x870,0x86d,0x870,0x870,0x86d,0x870,0x870, +0x86d,0x870,0x870,0x86d,0x870,0x870,0x86d,0x86d,0xcfc,0x882,0x87c,0x882,0x87c,0x882,0x87c,0x882, +0x87c,0x882,0x87c,0x87c,0x87f,0x87c,0x87f,0x87c,0x87f,0x87c,0x87f,0x87c,0x87f,0x87c,0x87f,0x87c, +0x87f,0x87c,0x87f,0x87c,0x87f,0x87c,0x87f,0x87c,0x87f,0x87c,0x87f,0x882,0x87c,0x87f,0x87c,0x87f, +0x87c,0x87f,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87f,0x87f,0x87c,0x87f,0x87f,0x87c,0x87f,0x87f, +0x87c,0x87f,0x87f,0x87c,0x87f,0x87f,0x87c,0x87c,0x87c,0x87c,0x87c,0x882,0x87c,0x882,0x87c,0x882, +0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x882,0x87c,0x87c,0x87c,0x87c,0x87c,0x87f,0x882,0x882,0x87f, +0x87f,0x87f,0x87f,0x954,0x957,0x885,0x888,0xce4,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e, +0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e, +0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x891,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e, +0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e, +0x88e,0x88e,0x88e,0x88e,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a, +0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a, +0xde3,0xde3,0xf1e,0x894,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960, +0xddd,0xddd,0xddd,0xddd,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d, +0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d, +0x89d,0x89d,0x89d,0x1b51,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966, +0x966,0x966,0x966,0x966,0x966,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0xde6,0xde6,0xde6,0xde6,0x969, +0x969,0x969,0x969,0x969,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0, +0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0, +0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0xde6,0xde6,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3, +0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3, +0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966, +0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6, +0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6, +0x8a6,0x8a6,0xf21,0xf21,0xf21,0xf21,0xf21,0xf21,0xf21,0xf21,0xf21,0xf21,0xf21,0xf21,0xf21,0xf21, +0xf21,0xf21,0xf21,0xf21,0xf21,0xf21,0xf21,0xf21,0x11d0,0x11d0,0x11d0,0x11d0,0x8a9,0x8a9,0x8a9,0x8a9, +0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9, +0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8ac,0x8ac, +0x8a9,0x8ac,0x8a9,0x8ac,0x8ac,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8ac, +0x8a9,0x8ac,0x8a9,0x8ac,0x8ac,0x8a9,0x8a9,0x8ac,0x8ac,0x8ac,0x8a9,0x8a9,0x8a9,0x8a9,0x1572,0x1572, +0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced, +0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960, +0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960, +0x13a1,0x13a1,0x13a1,0x13a1,0x134a,0x134a,0x134a,0x134a,0x134a,0x134a,0x134a,0x134a,0xddd,0xce7,0xce7,0xce7, +0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0x963,0x963,0x963,0x963, +0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963, +0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0xce7,0xce7,0xce7, +0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0x966,0x966,0x966,0x966, +0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966, +0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0xde6,0x9fc,0x9d8,0x9d8,0x9d8, +0x9d8,0x9d2,0x9d8,0x9d8,0x9ed,0x9d8,0x9d8,0x9e7,0x9e4,0x9ea,0x9ea,0x9ea,0x9ea,0x9ea,0x9ed,0x9d2, +0x9de,0x9d2,0x9d2,0x9d2,0x9c0,0x9c0,0x9d2,0x9d2,0x9d2,0x9d2,0x9d2,0x9d2,0x9f0,0x9f0,0x9f0,0x9f0, +0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,0x9d2,0x9d2,0x9d2,0x9d2,0x9d2,0x9d2,0x9d2,0x9d2,0x9d2,0x9d2, +0x9d5,0x9c6,0x9d2,0x9c6,0x9d2,0x9c3,0x9e1,0x9db,0x9e1,0x9db,0x9f6,0x9f6,0xa05,0xa05,0xa05,0xa05, +0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05, +0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa08,0xa08,0xa08,0xa08, +0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08, +0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa0b,0xa0b,0xa0b,0xa0b, +0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b, +0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa14,0xa14,0xa14,0xa14, +0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14, +0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa0e,0xa0e,0xa17,0xa17,0xa17,0xa17, +0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17, +0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa11,0xa11,0xa14,0xa14,0xa14,0xa14, +0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14, +0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa17,0xa17,0xa17,0xa17, +0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17, +0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa1a,0xa1d,0xa1d,0xa1d, +0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d, +0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1a,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d, +0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d, +0xa1d,0xa1d,0xa1d,0xa1d,0xabf,0xabf,0x106b,0xabf,0xabf,0xabf,0xac2,0xabf,0x106b,0xabf,0xabf,0x1062, +0xab9,0xaad,0xaad,0xaad,0xaad,0xabc,0xaad,0x1053,0x1053,0x1053,0xaad,0xab0,0xab9,0xab3,0x1059,0x1065, +0x1065,0x1053,0x1053,0x106b,0xbbe,0xbbe,0xbbe,0xbbe,0xbbe,0xbbe,0xbbe,0xbbe,0xbbe,0xbbe,0xac5,0xac5, +0xab6,0xab6,0xab6,0xab6,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabc,0xabc,0xaad,0xaad,0x106b,0x106b, +0x106b,0x106b,0x1053,0x1053,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf, +0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf, +0xabf,0xabf,0xabf,0xabf,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xe40,0xad4,0xad4,0xad4,0xad4, +0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4, +0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xe40, +0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4, +0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada, +0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada, +0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xadd,0xae3,0xae0, +0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0x1209,0x1209,0x1209,0x1209,0x1209,0x1209,0x1209,0x1209,0x1209, +0x1206,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0, +0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0, +0xae0,0xae0,0xae0,0xae0,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5, +0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5, +0xaf5,0xaf5,0xaf5,0xaf5,0xb25,0xb25,0xb25,0xb28,0xb28,0xb25,0xb25,0xb25,0xb22,0xb25,0xb25,0xb25, +0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb0a,0xb0a,0xb1f,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8, +0xaf8,0xaf8,0xb1f,0xb1f,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25, +0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25, +0xb25,0xb25,0xb25,0xb25,0xb49,0xb49,0xb49,0xb49,0xb49,0xb34,0xb34,0xb49,0xb49,0xb49,0xb49,0xb49, +0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49, +0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb4c, +0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49, +0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb6d,0xb6d,0xb6d,0xb6d, +0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xb6d, +0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xc63,0xc63,0xc63,0xc63,0xc63,0xb79,0xb79,0xb79,0xb79, 0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79, -0xb7c,0xb7c,0xb7c,0xb7c,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f, -0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f, -0xb7f,0xb7f,0xb7f,0xb7f,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85, -0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85, -0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0x1adc,0x1adc,0x1adc,0x1adc,0x1adc,0x1adc,0x1adc,0x1ba8,0x1ba8, -0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88, -0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88, -0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2, -0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbdf,0xbe2,0xbdf,0xbdf,0xbdf,0xbdf,0xbdf,0xbdf,0xbdf,0xbdf, -0xbdf,0xbdf,0xbdf,0xbdf,0xbdf,0xbdf,0xbdf,0xce1,0xce4,0xdd1,0xdd1,0xdd1,0xdd1,0xdd1,0xdd1,0xdd1, -0xdd1,0xdd1,0xdd1,0xdd1,0xee8,0xee8,0xee8,0xee8,0xbee,0xbee,0xbee,0xbee,0xbee,0xbee,0xbee,0xbee, -0xbee,0xbee,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xdd4,0xe88,0xdd4,0xdd4,0xdd4,0xdd4, -0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xfd8,0x1272,0x1272,0xddd,0xddd,0xddd,0xddd,0xddd,0xde3,0xde0,0xefa, -0xefa,0xefa,0xefa,0x13e0,0xfea,0x13e0,0x132c,0x132c,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21, -0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc4e,0xc4b,0xc4e,0xc4b,0xc4e,0xc4b, -0x10fe,0x10fb,0xff0,0xfed,0xc24,0xc24,0xc24,0xc24,0xc24,0xc24,0xc24,0xc24,0xc24,0xc24,0xc24,0xc24, -0xc24,0xc24,0xc24,0xc24,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27, -0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27, -0xc27,0xc27,0xc27,0xc27,0xc2a,0xc2a,0xc2a,0xc30,0xc2d,0xc54,0xc51,0xc30,0xc2d,0xc30,0xc2d,0xc30, -0xc2d,0xc30,0xc2d,0xc30,0xc2d,0xc30,0xc2d,0xc30,0xc2d,0xc30,0xc2d,0xc30,0xc2d,0xc2a,0xc2a,0xc2a, -0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a, -0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a, -0xc30,0xc2d,0xc30,0xc2d,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a, -0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a, -0xc30,0xc2d,0xc2a,0xc2a,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33, -0xc39,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33, -0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33, -0xc33,0xc33,0xc33,0xc33,0xc39,0xc39,0xc39,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33, -0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33, -0xc33,0xc33,0xc33,0xc33,0xc36,0xc33,0xc33,0xc33,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c, -0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c, -0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xce7,0xd53,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4, -0xdd4,0xdd4,0xe88,0xe88,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xeeb,0xfd8,0xfd8,0xfd8,0xfd8,0xfd8, -0xfd8,0xfd8,0xfd8,0xfd8,0xfd8,0x1296,0x1296,0x1275,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b, -0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b, -0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd11,0xd11, -0xd11,0xd11,0xd11,0xd0e,0xd23,0xd23,0xd23,0xd1d,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23, -0xd23,0xd23,0xd23,0xd1d,0xd23,0xd23,0xd23,0xd23,0xd17,0xd17,0xd20,0xd20,0xd20,0xd20,0xd14,0xd14, -0xd14,0xd14,0xd14,0xd1a,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9, -0xde6,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23, -0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd1d,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23, -0xd23,0xd23,0xd23,0xd23,0xd23,0xd17,0xd17,0xd17,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a, -0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a, -0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26, -0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xdec,0xdec,0xdec,0xdec,0xdec,0xdec,0xefd,0xefd,0xefd,0xefd, -0xefd,0xefd,0xefd,0x1107,0x1107,0xff3,0xff3,0xff3,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29, -0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29, -0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f, -0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f, -0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38, -0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38, -0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44, -0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44, -0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50, -0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50, -0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2, -0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2, -0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8, -0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf5,0xdf5,0xdf5, -0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8, -0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8, -0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xeb8,0xeb8,0xe0a,0xe0a,0xf00,0xf00,0xf00,0xf00, -0xf00,0xf00,0xf00,0xfff,0xfff,0x1002,0xfff,0xfff,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc, -0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xe19,0xe16,0xe19,0xe16,0xe19,0xe16,0xe19,0xe16, -0xe19,0xe16,0xe19,0xe16,0xe19,0xe16,0xe19,0xe16,0xe19,0xe16,0xe19,0xe16,0xe19,0xe16,0xe19,0xe16, -0xe19,0xe16,0xe19,0xe16,0xe19,0xe16,0xe19,0xe16,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25, -0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25, -0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b, -0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0x1b1e,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0x1b1b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b, -0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b, -0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2, -0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xf03, -0xf03,0xf03,0xf03,0x1005,0x1005,0x1005,0x1005,0x1005,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c, -0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c, -0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55, -0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55, -0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e, -0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e, -0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe58,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b, -0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b, -0xe5b,0xe5b,0xe5b,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe67,0xe67,0xe67,0xe67,0xe67,0xe67,0xe67,0xe67, -0xe67,0xe67,0xe67,0xe67,0xe67,0xe67,0xe64,0xe64,0xe64,0xe64,0xe64,0xe64,0xe64,0xe64,0xe61,0xe6a, -0x1011,0x100b,0x101a,0x1008,0xe67,0xe67,0x1008,0x1008,0xe79,0xe79,0xe6d,0xe79,0xe79,0xe79,0xe70,0xe79, -0xe79,0xe79,0xe79,0xe6d,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79, -0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c, +0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb8b,0xb8b,0xb8b,0xb8b, +0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b, +0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb91,0xb91,0xb91,0xb91, +0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91, +0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb9d,0xb9d,0xb9d,0xb9d, +0xb9d,0xb9d,0xb9d,0xb9d,0xb9d,0xb9d,0xb9d,0xb9d,0xb9d,0xb9d,0xb9d,0xb9d,0xb9d,0xb9d,0xb9d,0xb9d, +0xb9d,0xb9d,0xb9d,0xb9d,0x1479,0x1479,0x1479,0x1bd2,0x1bd2,0x1bd2,0x1bd2,0x1bd2,0xba0,0xba0,0xba0,0xba0, +0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0, +0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0x1bd5,0x1bd5, +0x1bd5,0x1bd5,0x1bd5,0x1bd5,0x1bd5,0x1bd5,0x1bd5,0x1bd5,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3, +0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba6,0xba3,0xba3, +0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3, +0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3, +0xba9,0xba9,0xcea,0xcea,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9, +0xba9,0xba9,0xba9,0xba9,0xcea,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9, +0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd, +0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0x15ba, +0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xd71,0xd71,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3, +0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3, +0xbd3,0xbd3,0xd6e,0xd6e,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc, +0xdbc,0xdbc,0xdbc,0xdbc,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6, +0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6, +0xbd6,0xbd6,0xbd6,0xbd6,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9, +0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9, +0xbd9,0xbd9,0xbd9,0xbd9,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbdf,0xbeb,0xbf1,0xbf1,0xbf1,0xbe5,0xbe5, +0xbe5,0xbee,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbf1, +0xbf1,0xbf1,0xbf1,0xbf1,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5, +0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5, +0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe8,0xbe8,0xbf1,0xbf1,0xbf1,0xbe5,0xbe5,0xbf1,0xbf1,0xbf1, +0xbf1,0xbf1,0xbf1,0xbf1,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5, +0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbf1,0xbf1,0xbf1,0xbf1,0xbe5,0xbe5, +0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8, +0xbe8,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5, +0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0x17d0,0x17d0, +0xbfd,0xbf4,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa, +0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbf4,0xbfa,0xbfa,0xbfa,0xbfa, +0xbfa,0xbfa,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd, +0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbf4,0xbfa,0xbfa,0xbfa,0xbfa, +0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa, +0xbfa,0xbf4,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd, +0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbf4,0xbfa,0xbfa, +0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa, +0xbfa,0xbfa,0xbfa,0xbfa,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7, +0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7, +0xbf7,0xbf7,0xbf7,0xbf7,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd, +0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfa,0xbfa, +0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa, +0xbfa,0xbfa,0xbfa,0xbfa,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd, +0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfa,0xbfa, +0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa, +0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfd,0xbfd,0xbfd,0xbfd,0xc00,0xc00,0xc00,0xc00, +0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00, +0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc06,0xc06,0xc06,0xc06, +0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06, +0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0x1bdb, +0x1bdb,0x1bdb,0x1bdb,0x1bdb,0x1bdb,0x1bdb,0x1ca7,0x1ca7,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09, +0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09, +0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc63,0xc63,0xc63,0xc63,0xc63,0xc63,0xc63,0xc63, +0xc63,0xc63,0xc63,0xc63,0xc63,0xc63,0xc63,0xc63,0xc63,0xc63,0xc63,0xc63,0xc63,0xc63,0xc60,0xc63, +0xc60,0xc60,0xc60,0xc60,0xc60,0xc60,0xc60,0xc60,0xc60,0xc60,0xc60,0xc60,0xc60,0xc60,0xc60,0xd65, +0xd68,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xf78,0xf78,0xf78,0xf78, +0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b, +0xd6b,0xd6b,0xe5e,0xf18,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0x1083,0x1341,0x1341, +0xe67,0xe67,0xe67,0xe67,0xe67,0xe6d,0xe6a,0xf8a,0xf8a,0xf8a,0xf8a,0x14b8,0x1095,0x14b8,0x13fb,0x13fb, +0xca2,0xca2,0xca2,0xca2,0xca2,0xca2,0xca2,0xca2,0xca2,0xca2,0xca2,0xca2,0xca2,0xca2,0xca2,0xca2, +0xca2,0xca2,0xccf,0xccc,0xccf,0xccc,0xccf,0xccc,0x11ca,0x11c7,0x109b,0x1098,0xca5,0xca5,0xca5,0xca5, +0xca5,0xca5,0xca5,0xca5,0xca5,0xca5,0xca5,0xca5,0xca5,0xca5,0xca5,0xca5,0xca8,0xca8,0xca8,0xca8, +0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8, +0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xcab,0xcab,0xcab,0xcb1, +0xcae,0xcd5,0xcd2,0xcb1,0xcae,0xcb1,0xcae,0xcb1,0xcae,0xcb1,0xcae,0xcb1,0xcae,0xcb1,0xcae,0xcb1, +0xcae,0xcb1,0xcae,0xcb1,0xcae,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab, +0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab, +0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcb1,0xcae,0xcb1,0xcae,0xcab,0xcab,0xcab,0xcab, +0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab, +0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcb1,0xcae,0xcab,0xcab,0xcb4,0xcb4,0xcb4,0xcb4, +0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcba,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4, +0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4, +0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcba,0xcba,0xcba,0xcb4, +0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4, +0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb7,0xcb4,0xcb4,0xcb4, +0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced, +0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced, +0xd6b,0xdd7,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xf18,0xf18,0xe5e,0xe5e,0xe5e,0xe5e, +0xe5e,0xe5e,0xf7b,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1365,0x1365,0x1344, +0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f, +0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f, +0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd95,0xd95,0xd95,0xd95,0xd95,0xd92,0xda7,0xda7,0xda7,0xda1, +0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda1,0xda7,0xda7,0xda7,0xda7, +0xd9b,0xd9b,0xda4,0xda4,0xda4,0xda4,0xd98,0xd98,0xd98,0xd98,0xd98,0xd9e,0xe73,0xe73,0xe73,0xe73, +0xe73,0xe73,0xe73,0xe73,0xe73,0xe73,0xe73,0xe73,0xe70,0xe73,0xe73,0xe73,0xe73,0xe73,0xe73,0xe73, +0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda1,0xda7, +0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xd9b,0xd9b,0xd9b, +0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e, +0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e, +0xdaa,0xdaa,0xdaa,0xdaa,0xdaa,0xdaa,0xdaa,0xdaa,0xdaa,0xdaa,0xdaa,0xdaa,0xdaa,0xdaa,0xe76,0xe76, +0xe76,0xe76,0xe76,0xe76,0xf8d,0xf8d,0xf8d,0xf8d,0xf8d,0xf8d,0xf8d,0x11d3,0x11d3,0x109e,0x109e,0x109e, +0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad, +0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad, +0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3, +0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3, +0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc, +0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc, +0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8, +0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8, +0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4, +0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4, 0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c, -0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94, -0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94, -0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5, -0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110, -0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0xee8,0xee8,0xee8,0xee5,0xee5,0xee5,0xee5,0xee5, -0x1149,0x1392,0x1392,0x1392,0x1392,0x1317,0x1317,0x1317,0x1395,0x131a,0x131a,0x1395,0x14d6,0x14d6,0x14d6,0x14d6, -0x14d6,0x14d6,0x14d6,0x1797,0x1797,0x1797,0x1797,0x185d,0xefd,0xefd,0xefd,0xefd,0xff3,0xff3,0xff3,0xff3, -0xff3,0xff3,0xff3,0xff3,0xff3,0xff3,0xff3,0xff3,0xff6,0xff6,0xff6,0xff6,0xff6,0xff6,0xff6,0xff6, -0xff6,0xff6,0xff6,0xff6,0xff6,0xff6,0xff6,0xff6,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0x14f1, -0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f4,0x1866,0x1866, -0x18e7,0x1866,0x1bc6,0x179d,0x132f,0x1152,0xf00,0xf00,0xf1e,0xf1e,0xf1e,0xf1e,0xf30,0xf39,0xf3c,0xf39, -0xf3c,0xf39,0xf3c,0xf39,0xf3c,0xf39,0xf3c,0xf39,0xf39,0xf39,0xf3c,0xf39,0xf39,0xf39,0xf39,0xf39, -0xf39,0xf39,0xf39,0xf39,0xf39,0xf39,0xf39,0xf39,0xf39,0xf39,0xf39,0xf39,0xf39,0xf39,0xf39,0xf39, -0xf21,0xf1e,0xf1e,0xf1e,0xf1e,0xf1e,0xf1e,0xf33,0xf1e,0xf33,0xf30,0xf30,0xf45,0xf42,0xf45,0xf45, -0xf45,0xf42,0xf42,0xf45,0xf42,0xf45,0xf42,0xf45,0xf42,0x102c,0x102c,0x102c,0x1167,0x1023,0x102c,0x1023, -0xf42,0xf45,0xf42,0xf42,0x1023,0x1023,0x1023,0x1023,0x1026,0x1029,0x1167,0x1167,0xf48,0xf48,0x103e,0x1035, -0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x1035,0x1035,0x103e,0x1035, -0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0xf4e,0xf4e,0xf4e,0xf4e, -0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e, -0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf5d,0xf5d,0xf5d,0xf5d, -0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d, -0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0x1512, -0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512, -0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63, -0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63, -0xfab,0xfc3,0xfba,0xfc0,0xfc0,0xfc3,0xfc3,0xfba,0xfba,0xfc0,0xfc0,0xfc0,0xfc0,0xfc0,0xfc3,0xfc3, -0xfc3,0xfab,0xfab,0xfab,0xfab,0xfc3,0xfc3,0xfc3,0xfc3,0xfc3,0xfc3,0xfc3,0xfc3,0xfc3,0xfc3,0xfc3, -0xfc3,0xfc3,0xfab,0xfba,0xfbd,0xfab,0xfab,0xfc0,0xfc0,0xfc0,0xfc0,0xfc0,0xfc0,0xfae,0xfc3,0xfc0, -0xfb7,0xfb7,0xfb7,0xfb7,0xfb7,0xfb7,0xfb7,0xfb7,0xfb7,0xfb7,0x1131,0x1131,0x112e,0x112b,0xfb4,0xfb4, -0xfdb,0xfdb,0xfdb,0xfdb,0x1296,0x1296,0x1275,0x1275,0x1275,0x1272,0x1272,0x1272,0x1272,0x1275,0x1398,0x1275, -0x1275,0x1275,0x1272,0x1275,0x1296,0x1272,0x1272,0x1272,0x1275,0x1275,0x1272,0x1272,0x1275,0x1272,0x1272,0x1275, -0xff6,0xff6,0xff6,0xff6,0xff6,0xff3,0xff3,0xff6,0xff6,0xff6,0xff6,0xff6,0xff6,0x14eb,0x14eb,0x14eb, -0x1107,0xff3,0xff3,0xff3,0xff3,0x12a2,0x127e,0x127e,0x127e,0x127e,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb, -0x1017,0x1017,0x1014,0x100e,0x1014,0x100e,0x1014,0x100e,0x1014,0x100e,0x100b,0x100b,0x100b,0x100b,0x1020,0x101d, -0x100b,0x1164,0x13ec,0x13ef,0x13ef,0x13ec,0x13ec,0x13ec,0x13ec,0x13ec,0x13f2,0x13f2,0x1506,0x14fa,0x14fa,0x14f7, -0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x1032,0x102f,0x102f,0x103e,0x1035,0x133b,0x1338,0x16ec, -0x133b,0x1338,0x13fb,0x13f8,0x1509,0x1509,0x150f,0x1509,0x150f,0x1509,0x150f,0x1509,0x150f,0x1509,0x150f,0x1509, -0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035, -0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035, -0x1038,0x1035,0x1035,0x1035,0x1035,0x1035,0x1035,0x1035,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x103e,0x1035, -0x1041,0x1041,0x1047,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d, -0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d, -0x104d,0x1047,0x1041,0x1041,0x1041,0x1041,0x1047,0x1047,0x1041,0x1041,0x104a,0x1404,0x1401,0x1401,0x104d,0x104d, -0x1044,0x1044,0x1044,0x1044,0x1044,0x1044,0x1044,0x1044,0x1044,0x1044,0x1407,0x1407,0x1407,0x1407,0x1407,0x1407, -0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062, -0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062, -0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b, -0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106e,0x106e,0x106e,0x1071,0x106e,0x106e,0x1074,0x1074, -0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077, -0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077, -0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1083,0x107a,0x1089,0x1086, -0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080, -0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080, -0x1341,0x133e,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x1098,0x1119, -0x108c,0x108c,0x108c,0x1092,0x140a,0x140a,0x140a,0x140a,0x140a,0x140a,0x140a,0x140a,0x108f,0x108f,0x1092,0x109e, -0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095, -0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095, -0x151e,0x151b,0x151e,0x151b,0x1521,0x1521,0x16f5,0x140a,0x10a7,0x10a7,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa, -0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa, -0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10a7,0x10a7,0x10a7,0x10a7,0x10a7,0x10a7,0x10a7,0x10a7, -0x10a7,0x10a7,0x10a7,0x10a7,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b0,0x10b0,0x10b0,0x10b0,0x10b0,0x10b3, -0x10b3,0x10b3,0x110d,0x10bc,0x10cb,0x10cb,0x10cb,0x10cb,0x10cb,0x10cb,0x10cb,0x10cb,0x10cb,0x10cb,0x10cb,0x10cb, -0x10cb,0x10cb,0x10cb,0x10cb,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b9,0x10b9, -0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9, -0x10b9,0x10b9,0x10b9,0x10b9,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da, -0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da, -0x10da,0x10da,0x10da,0x10da,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec, -0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec, -0x10ec,0x10ec,0x10ec,0x10ec,0x10f5,0x10f5,0x10f5,0x10f5,0x110a,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5, -0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5, -0x10f5,0x10f5,0x10f5,0x10f5,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8, -0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8, -0x10f8,0x10f8,0x10f8,0x10f8,0x1104,0x1104,0x1104,0x1104,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c, -0x1494,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x18c6,0x18c6,0x18c6,0x18c6,0x18c6,0x18c6, -0x18c6,0x18c6,0x18c6,0x18c6,0x1179,0x1179,0x1179,0x1179,0x1179,0x1179,0x1179,0x1179,0x1179,0x1179,0x1179,0x1179, -0x1179,0x1179,0x1179,0x1179,0x1179,0x1179,0x1179,0x1179,0x1179,0x1179,0x1170,0x1170,0x1173,0x1173,0x1179,0x1170, -0x1170,0x1170,0x1170,0x1170,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f, -0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f, -0x117f,0x117f,0x117f,0x117f,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a, -0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a, -0x119a,0x119a,0x119a,0x119a,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6, -0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6, -0x11a6,0x11a6,0x11a3,0x11a9,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5, -0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5, -0x11b5,0x11b5,0x11b5,0x11b5,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb, -0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x12e7,0x11c1,0x12ea,0x11c1,0x11c1,0x11c1,0x11c1,0x11be,0x11be,0x11be,0x11c1, -0x16f8,0x16fb,0x1923,0x1920,0x11c4,0x11c4,0x11c4,0x11d3,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9, +0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c, +0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82, +0xe82,0xe82,0xe82,0xe82,0xe82,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f, +0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82, +0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82, +0xf48,0xf48,0xe94,0xe94,0xf90,0xf90,0xf90,0xf90,0xf90,0xf90,0xf90,0x10ad,0x10ad,0x10b0,0x10b3,0x10ad, +0x10a7,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa, +0xea3,0xea0,0xea3,0xea0,0xea3,0xea0,0xea3,0xea0,0xea3,0xea0,0xea3,0xea0,0xea3,0xea0,0xea3,0xea0, +0xea3,0xea0,0xea3,0xea0,0xea3,0xea0,0xea3,0xea0,0xea3,0xea0,0xea3,0xea0,0xea3,0xea0,0xea3,0xea0, +0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf, +0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf, +0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0x1c1d, +0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2, +0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0x1c1a, +0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5, +0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5, +0xf42,0xf42,0xf42,0xf42,0xf42,0xf42,0xf42,0xf42,0xecd,0xecd,0xecd,0xecd,0xecd,0xecd,0xecd,0xecd, +0xecd,0xecd,0xecd,0xecd,0xecd,0xecd,0xecd,0xf93,0xf93,0xf93,0xf93,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6, +0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6, +0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6, +0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf, +0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf, +0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8, +0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee2, +0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5, +0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee8,0xee8,0xee8,0xee8,0xee8, +0xef4,0xef4,0xef4,0xef4,0xef4,0xef4,0xef4,0xef4,0xef4,0xef4,0xef4,0xef4,0xef4,0xef4,0xef1,0xef1, +0xef1,0xef1,0xef1,0xef1,0xef1,0xef1,0xeee,0xef7,0x10c2,0x10bc,0x10ce,0x10b9,0xeeb,0xeeb,0x10b9,0x10b9, +0xf06,0xf06,0xefa,0xf06,0xf06,0xf06,0xefd,0xf06,0xf06,0xf06,0xf06,0xefa,0xf06,0xf06,0xf06,0xf06, +0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06, +0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09, +0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09, +0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24, +0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24, +0xf45,0xf45,0xf45,0xf45,0xf45,0xf45,0xf45,0xf45,0xf45,0xf45,0xf45,0xf45,0xf45,0xf45,0xf45,0xf45, 0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9, -0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11c7,0x11d3,0x11d3,0x11c4,0x11c4,0x11c4,0x11c4,0x11d3,0x11d3, -0x11c4,0x11c4,0x11d3,0x11d3,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5, -0x11e5,0x11e5,0x11e5,0x11e5,0x11e8,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11df,0x11df,0x11df,0x11e5,0x11e2, -0x1527,0x152a,0x152d,0x152d,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7, -0x11f7,0x11f7,0x11f7,0x11f7,0x11eb,0x11f7,0x11eb,0x11eb,0x11eb,0x1200,0x1200,0x11eb,0x11eb,0x1200,0x11f7,0x1200, -0x1200,0x11f7,0x11eb,0x11ee,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7, -0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7, -0x11f7,0x11f7,0x11f7,0x11f7,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212, -0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212, -0x1212,0x1212,0x1212,0x1212,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a, -0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a, -0x122a,0x1227,0x1227,0x1227,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233, -0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233, -0x1233,0x1233,0x1233,0x1233,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242, -0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242, -0x1242,0x1242,0x1242,0x1242,0x1248,0x1248,0x1254,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257, -0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x125a,0x1257, -0x125a,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x125a, -0x1257,0x1257,0x1257,0x1257,0x1254,0x1254,0x1254,0x1248,0x1248,0x1248,0x1248,0x1254,0x1254,0x124e,0x124b,0x1251, -0x1251,0x1260,0x125d,0x125d,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263, -0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263, -0x1263,0x1263,0x1263,0x1263,0x1269,0x1269,0x1269,0x1266,0x1266,0x1266,0x1263,0x1263,0x1263,0x1263,0x1266,0x1263, -0x1263,0x1263,0x1269,0x1266,0x1269,0x1266,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263, -0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263, -0x1263,0x1269,0x1266,0x1266,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263, -0x1263,0x1263,0x1263,0x1bcf,0x19f5,0x19f5,0x19f5,0x19f5,0x19f5,0x19f5,0x19f5,0x19f8,0x19f2,0x1be1,0x1be1,0x1be1, -0x1be4,0x1bde,0x1be4,0x1bde,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1287, -0x1287,0x1287,0x126c,0x1929,0x138f,0x1290,0x138f,0x138f,0x138f,0x138f,0x138f,0x138f,0x138f,0x138f,0x138f,0x138f, -0x138f,0x1290,0x138f,0x1290,0x1275,0x1275,0x131d,0x1272,0x131d,0x131d,0x131d,0x131d,0x1272,0x1272,0x1296,0x1272, -0x1272,0x1272,0x1272,0x1272,0x1272,0x1275,0x1296,0x1296,0x1275,0x1296,0x1272,0x1275,0x1275,0x1278,0x1296,0x1272, -0x1272,0x1296,0x1275,0x1275,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x1281,0x1281, -0x1281,0x1281,0x13a4,0x1386,0x128a,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x1827, -0x1827,0x1827,0x1827,0x1827,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1530, -0x1530,0x1a76,0x1a76,0x1a76,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284, -0x1284,0x1284,0x1284,0x1284,0x138f,0x138f,0x1290,0x138f,0x138f,0x138f,0x1290,0x138f,0x138f,0x138f,0x128a,0x128a, -0x128a,0x128a,0x128a,0x1389,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x128d,0x138c,0x138c,0x138c,0x138c, -0x138c,0x138c,0x138c,0x128d,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x140d,0x140d, -0x19d4,0x1a76,0x1a76,0x1a76,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x128d,0x138c,0x128d, -0x128d,0x138c,0x138c,0x128d,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1, -0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1, -0x12b1,0x12b1,0x12b1,0x12b1,0x133b,0x1338,0x133b,0x1338,0x133b,0x1338,0x133b,0x1338,0x133b,0x1338,0x13fb,0x150f, -0x150f,0x150f,0x17a3,0x1917,0x150f,0x150f,0x16ef,0x16ef,0x16ef,0x16e9,0x16ef,0x16e9,0x191a,0x1917,0x19d1,0x19ce, -0x19d1,0x19ce,0x19d1,0x19ce,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f, -0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f, -0x135f,0x135f,0x135f,0x135f,0x1374,0x1365,0x1374,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377, -0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377, -0x1377,0x1377,0x1377,0x1377,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x137d,0x137d,0x137d,0x137d, -0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d, -0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x1383,0x1383,0x1383,0x1383, -0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383, -0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x13ad,0x13aa,0x18cc,0x18cc, -0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc, -0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x13b6,0x13b6,0x13b6,0x13b6, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6, -0x13b6,0x13b3,0x13b3,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b3,0x13b6,0x13b6,0x13b6,0x13b3,0x13b6,0x13b3,0x13b6, -0x13b3,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b9,0x13b6,0x13b6,0x13b6,0x13b6,0x13b3,0x13b6,0x13b3,0x13b3,0x13b6, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b3,0x13b3,0x13b3,0x13b3, -0x13b3,0x13b3,0x13b3,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6, -0x13b6,0x13b6,0x13b6,0x13b3,0x13b3,0x13b3,0x13b3,0x13b3,0x13b3,0x13b3,0x13b3,0x13b3,0x13b3,0x13b6,0x13b6,0x13b6, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b3,0x13b3,0x13b3,0x13b3,0x13b3,0x13b3, -0x13b3,0x13b3,0x13b3,0x13b3,0x13b3,0x13b3,0x1539,0x1539,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c, -0x153c,0x153c,0x153c,0x153c,0x153c,0x1779,0x1779,0x1779,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x153c,0x13b6, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x153c,0x1779,0x1779, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b9,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6, -0x13b6,0x13b6,0x13b6,0x13b6,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x1539,0x1539,0x153c,0x153c, -0x13b6,0x13b6,0x13b9,0x13b9,0x13b9,0x16a4,0x13b6,0x13b9,0x13b6,0x13b6,0x13b9,0x153f,0x153f,0x153c,0x153c,0x1779, -0x1779,0x1779,0x1779,0x1779,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6, -0x13b6,0x153c,0x153c,0x153c,0x16a4,0x153c,0x153c,0x153c,0x1779,0x1779,0x1779,0x177c,0x177c,0x177c,0x177c,0x177c, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x153c, -0x13b6,0x153c,0x13b9,0x13b9,0x13b6,0x13b6,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9, -0x13b9,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6, -0x13b6,0x13b6,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9, -0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b6,0x13b6,0x13b6,0x13b9,0x13b6,0x13b6,0x13b6,0x13b6,0x13b9,0x13b9,0x13b9, -0x13b6,0x13b9,0x13b9,0x13b9,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b9,0x13b6,0x13b9,0x13b6,0x13b6, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x16a4,0x13b6,0x13b6,0x13b6,0x13b6,0x153c,0x153c,0x1779, -0x1410,0x1410,0x1410,0x1410,0x1539,0x1539,0x1539,0x1539,0x1539,0x1539,0x153c,0x1779,0x1779,0x1779,0x1779,0x16fe, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6, -0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153f,0x153f,0x153c,0x153c, -0x153c,0x153c,0x1830,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c, -0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x1539,0x1539,0x1539,0x1539,0x1539,0x1539,0x153c,0x13b6, -0x13b6,0x13b6,0x13b6,0x13b6,0x149a,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc, -0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x149a,0x13bc,0x13bc,0x13bc,0x149a,0x13bc,0x149a,0x13bc,0x149a,0x13bc,0x149a, -0x13bc,0x13bc,0x13bc,0x149a,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x149a,0x149a,0x13bc,0x13bc,0x13bc,0x13bc, -0x149a,0x13bc,0x149a,0x149a,0x13bc,0x13bc,0x13bc,0x13bc,0x149a,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc, -0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x16aa,0x16aa,0x177f,0x177f,0x13bf,0x13bf,0x13bf,0x13bc,0x13bc,0x13bc,0x13bf, -0x13bf,0x13bf,0x13bf,0x13bf,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629, -0x1629,0x1629,0x1629,0x1629,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2, -0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2, -0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c5,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2, -0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c5,0x13c5,0x13c5,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2, -0x13c2,0x13c2,0x13c2,0x13c2,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8, -0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8, -0x13c8,0x13c8,0x13c8,0x13c8,0x17ac,0x17ac,0x17a9,0x1701,0x1416,0x1416,0x1416,0x1416,0x1416,0x1416,0x1413,0x1413, -0x1413,0x1413,0x1413,0x1413,0x1416,0x1416,0x1416,0x1416,0x1416,0x1416,0x1416,0x1416,0x1416,0x1416,0x1416,0x1416, -0x1416,0x1416,0x1416,0x1545,0x1419,0x1548,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419, -0x1419,0x1548,0x1548,0x1548,0x1548,0x1548,0x1548,0x1704,0x1704,0x1b4b,0x17b2,0x17b2,0x17b2,0x17b2,0x17b2,0x17b2, -0x17b2,0x17b2,0x1a79,0x1a79,0x1422,0x1422,0x1422,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434, +0xf78,0xf78,0xf78,0xf75,0xf75,0xf75,0xf75,0xf75,0x1215,0x146a,0x146a,0x146a,0x146a,0x13e6,0x13e6,0x13e6, +0x146d,0x13e9,0x13e9,0x146d,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x1884,0x1884,0x1884,0x1884,0x194a, +0xf8d,0xf8d,0xf8d,0xf8d,0x109e,0x109e,0x109e,0x109e,0x109e,0x109e,0x109e,0x109e,0x109e,0x109e,0x109e,0x109e, +0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1, +0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2, +0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d5,0x1953,0x1953,0x19d4,0x1953,0x1cc5,0x188a,0x13fe,0x121e,0xf90,0xf90, +0xfb1,0xfb1,0xfb1,0xfb1,0xfc6,0xfcf,0xfd2,0xfcf,0xfd2,0xfcf,0xfd2,0xfcf,0xfd2,0xfcf,0xfd2,0xfcf, +0xfcf,0xfcf,0xfd2,0xfcf,0xfcf,0xfcf,0xfcf,0xfcf,0xfcf,0xfcf,0xfcf,0xfcf,0xfcf,0xfcf,0xfcf,0xfcf, +0xfcf,0xfcf,0xfcf,0xfcf,0xfcf,0xfcf,0xfcf,0xfcf,0xfb4,0xfb1,0xfb1,0xfb1,0xfb1,0xfb1,0xfb1,0xfc9, +0xfb1,0xfc9,0xfc6,0xfc6,0xfe1,0xfde,0xfe1,0xfe1,0xfe1,0xfde,0xfde,0xfe1,0xfe4,0xfe7,0xfe4,0xfe7, +0xfe4,0x10da,0x10da,0x10da,0x1236,0x10d7,0x10da,0x10d7,0xfd8,0xfdb,0xfd8,0xfde,0x10dd,0x10dd,0x10dd,0x10dd, +0x10e0,0x10e3,0x1236,0x1236,0xfea,0xfea,0x10f8,0x10f5,0x10f8,0x10f5,0x10f8,0x10f5,0x10f8,0x10f5,0x10f8,0x10f5, +0x10f8,0x10f5,0x10f8,0x10f5,0x10ec,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec, +0x10f2,0x10ec,0x10f2,0x10ec,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0, +0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0, +0xff0,0xff0,0xff0,0xff0,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff, +0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff, +0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3, +0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005, +0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005, +0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1053,0x106b,0x1062,0x1068,0x1068,0x106b,0x106b,0x1062, +0x1062,0x1068,0x1068,0x1068,0x1068,0x1068,0x106b,0x106b,0x106b,0x1053,0x1053,0x1053,0x1053,0x106b,0x106b,0x106b, +0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x1053,0x1062,0x1065,0x1053,0x1053,0x1068, +0x1068,0x1068,0x1068,0x1068,0x1068,0x1056,0x106b,0x1068,0x105f,0x105f,0x105f,0x105f,0x105f,0x105f,0x105f,0x105f, +0x105f,0x105f,0x11fd,0x11fd,0x11fa,0x11f7,0x105c,0x105c,0x1086,0x1086,0x1086,0x1086,0x1365,0x1365,0x1344,0x1344, +0x1344,0x1341,0x1341,0x1341,0x1341,0x1344,0x1470,0x1344,0x1344,0x1344,0x1341,0x1344,0x1365,0x1341,0x1341,0x1341, +0x1344,0x1344,0x1341,0x1341,0x1344,0x1341,0x1341,0x1344,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x109e,0x109e,0x10a1, +0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x15cc,0x15cc,0x15cc,0x11d3,0x109e,0x109e,0x109e,0x109e,0x1371,0x134d,0x134d, +0x134d,0x134d,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x10c8,0x10c8,0x10c5,0x10bf,0x10c5,0x10bf,0x10c5,0x10bf, +0x10c5,0x10bf,0x10cb,0x10cb,0x10cb,0x10cb,0x10d4,0x10d1,0x10cb,0x1233,0x14ca,0x14c7,0x14c7,0x14ca,0x14c4,0x14c4, +0x14c4,0x14ca,0x14cd,0x14cd,0x15e7,0x15db,0x15db,0x15d8,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec, +0x10e9,0x10e6,0x10e6,0x10fe,0x10fb,0x1410,0x140d,0x17d9,0x140a,0x1407,0x14d6,0x14d3,0x15ea,0x15ea,0x15f0,0x15ea, +0x15f0,0x15ea,0x15f0,0x15ea,0x15f0,0x15ea,0x15f0,0x15ea,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec, +0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec, +0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec,0x1101,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec, +0x10ec,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10f2,0x10ec,0x1104,0x1104,0x110a,0x1110,0x1110,0x1110,0x1110,0x1110, +0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110, +0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x110a,0x1104,0x1104,0x1104,0x1104,0x110a,0x110a, +0x1104,0x1104,0x110d,0x14df,0x14dc,0x14dc,0x1110,0x1110,0x1107,0x1107,0x1107,0x1107,0x1107,0x1107,0x1107,0x1107, +0x1107,0x1107,0x14e2,0x14e2,0x14e2,0x14e2,0x14e2,0x14e2,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125, +0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125, +0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e, +0x112e,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e, +0x1131,0x1131,0x1131,0x1134,0x1131,0x1131,0x1137,0x1137,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a, +0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a, +0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143, +0x1143,0x1143,0x1143,0x1143,0x1149,0x113d,0x114f,0x114c,0x1146,0x1146,0x1146,0x1143,0x1143,0x1143,0x1143,0x1143, +0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143, +0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1416,0x1413,0x1164,0x115e, +0x1164,0x115e,0x1164,0x115e,0x1164,0x115e,0x1164,0x115e,0x1164,0x115e,0x1161,0x11e5,0x1152,0x1152,0x1152,0x115b, +0x14e5,0x14e5,0x14e5,0x14e5,0x14e5,0x14e5,0x14e5,0x14e5,0x1155,0x1155,0x1158,0x1167,0x1164,0x115e,0x1164,0x115e, +0x1164,0x115e,0x1164,0x115e,0x1164,0x115e,0x1164,0x115e,0x1164,0x115e,0x1164,0x115e,0x1164,0x115e,0x1164,0x115e, +0x1164,0x115e,0x1164,0x115e,0x1164,0x115e,0x1164,0x115e,0x1164,0x115e,0x1164,0x115e,0x15ff,0x15fc,0x15ff,0x15fc, +0x1602,0x1602,0x17e2,0x14e5,0x1170,0x1170,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173, +0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173, +0x1173,0x1173,0x1173,0x1173,0x1170,0x1170,0x1170,0x1170,0x1170,0x1170,0x1170,0x1170,0x1170,0x1170,0x1170,0x1170, +0x1182,0x1182,0x1182,0x1182,0x1182,0x1182,0x1179,0x1179,0x1179,0x1179,0x1179,0x117c,0x117c,0x117c,0x11dc,0x1185, +0x1194,0x1194,0x1194,0x1194,0x1194,0x1194,0x1194,0x1194,0x1194,0x1194,0x1194,0x1194,0x1194,0x1194,0x1194,0x1194, +0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x1182,0x1182,0x1182,0x1182,0x1182,0x1182, +0x1182,0x1182,0x1182,0x1182,0x1182,0x1182,0x1182,0x1182,0x1182,0x1182,0x1182,0x1182,0x1182,0x1182,0x1182,0x1182, +0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6, +0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6, +0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8, +0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8, +0x11c1,0x11c1,0x11c1,0x11c1,0x11d6,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1, +0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1, +0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4, +0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4, +0x11d0,0x11d0,0x11d0,0x11d0,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x156f,0x1863,0x1863,0x1863, +0x1863,0x1863,0x1863,0x1863,0x1863,0x1863,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3, +0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248, +0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x123f,0x123f,0x1242,0x1242,0x1248,0x123f,0x123f,0x123f,0x123f,0x123f, +0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e, +0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e, +0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269, +0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269, +0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275, +0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1272,0x1278, +0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284, +0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284, +0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a, +0x128a,0x13b6,0x1290,0x13b9,0x1290,0x1290,0x1290,0x1290,0x128d,0x128d,0x128d,0x1290,0x17e5,0x17e8,0x1a13,0x1a10, +0x1293,0x1293,0x1293,0x12a2,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8, +0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8, +0x12a8,0x12a8,0x12a8,0x1296,0x12a2,0x12a2,0x1293,0x1293,0x1293,0x1293,0x12a2,0x12a2,0x1293,0x1293,0x12a2,0x12a2, +0x12b4,0x12b4,0x12b4,0x12b4,0x12b4,0x12b4,0x12b4,0x12b4,0x12b4,0x12b4,0x12b4,0x12b4,0x12b4,0x12b4,0x12b4,0x12b4, +0x12b7,0x12b4,0x12b4,0x12b4,0x12b4,0x12b4,0x12b4,0x12ae,0x12ae,0x12ae,0x12b4,0x12b1,0x1608,0x160b,0x160e,0x160e, +0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6, +0x12ba,0x12c6,0x12ba,0x12ba,0x12ba,0x12cf,0x12cf,0x12ba,0x12ba,0x12cf,0x12c6,0x12cf,0x12cf,0x12c6,0x12ba,0x12bd, +0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6, +0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6, +0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1, +0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1, +0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9, +0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f6,0x12f6,0x12f6, +0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302, +0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302, +0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311, +0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311, +0x1317,0x1317,0x1323,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326, +0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1329,0x1326,0x1329,0x1326,0x1326,0x1326, +0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1329,0x1326,0x1326,0x1326,0x1326, +0x1323,0x1323,0x1323,0x1317,0x1317,0x1317,0x1317,0x1323,0x1323,0x131d,0x131a,0x1320,0x1320,0x132f,0x132c,0x132c, +0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332, +0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332, +0x1338,0x1338,0x1338,0x1335,0x1335,0x1335,0x1332,0x1332,0x1332,0x1332,0x1335,0x1332,0x1332,0x1332,0x1338,0x1335, +0x1338,0x1335,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332, +0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1338,0x1335,0x1335, +0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1cce, +0x1aee,0x1aee,0x1aee,0x1aee,0x1aee,0x1aee,0x1aee,0x1af1,0x1aeb,0x1ce0,0x1ce0,0x1ce0,0x1ce3,0x1cdd,0x1ce3,0x1cdd, +0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1356,0x1356,0x1356,0x133b,0x1a19, +0x1467,0x135f,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x135f,0x1467,0x135f, +0x1344,0x1344,0x13ec,0x1341,0x13ec,0x13ec,0x13ec,0x13ec,0x1341,0x1341,0x1365,0x1341,0x1341,0x1341,0x1341,0x1341, +0x1341,0x1344,0x1365,0x1365,0x1344,0x1365,0x1341,0x1344,0x1344,0x1347,0x1365,0x1341,0x1341,0x1365,0x1344,0x1344, +0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1350,0x1350,0x1350,0x1350,0x147c,0x145e, +0x1359,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x1914,0x1914,0x1914,0x1914,0x1914, +0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1611,0x1611,0x1b75,0x1b75,0x1b75, +0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353, +0x1467,0x1467,0x135f,0x1467,0x1467,0x1467,0x135f,0x1467,0x1467,0x1467,0x1359,0x1359,0x1359,0x1359,0x1359,0x1461, +0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x135c,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x135c, +0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x14e8,0x14e8,0x1acd,0x1b75,0x1b75,0x1b75, +0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x135c,0x1464,0x135c,0x135c,0x1464,0x1464,0x135c, +0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380, +0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380, +0x140a,0x1407,0x140a,0x1407,0x140a,0x1407,0x140a,0x1407,0x140a,0x1407,0x14d6,0x15f0,0x15f0,0x15f0,0x1890,0x1a04, +0x15f0,0x15f0,0x17dc,0x17dc,0x17dc,0x17d6,0x17dc,0x17d6,0x1a0a,0x1a07,0x1ac4,0x1ac1,0x1ac4,0x1ac1,0x1ac4,0x1ac1, +0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434, 0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434, -0x1434,0x1434,0x1434,0x1434,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f, -0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f, -0x144f,0x144f,0x144f,0x144f,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455, +0x1449,0x143a,0x1449,0x144f,0x144f,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c, +0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c, +0x143a,0x143a,0x143a,0x143a,0x143a,0x143a,0x143a,0x143a,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455, 0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455, -0x1455,0x1455,0x1455,0x19da,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458, -0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458, -0x1458,0x1458,0x1458,0x1458,0x145e,0x145e,0x146a,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470, -0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470, -0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x146a,0x146a,0x146a,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e, -0x145e,0x145e,0x145e,0x146a,0x146d,0x1470,0x1473,0x1473,0x1470,0x1476,0x1476,0x1461,0x1464,0x170a,0x170d,0x170d, -0x170d,0x154e,0x1a82,0x1a7f,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x154b,0x1713, -0x1716,0x1710,0x1719,0x1719,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491, +0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b, +0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b, +0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x1485,0x1482,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9, +0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9, +0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e, +0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148b,0x148b,0x148e, +0x148e,0x148e,0x148e,0x148e,0x148b,0x148e,0x148e,0x148e,0x148b,0x148e,0x148b,0x148e,0x148b,0x148e,0x148e,0x148e, +0x148e,0x148e,0x1491,0x148e,0x148e,0x148e,0x148e,0x148b,0x148e,0x148b,0x148b,0x148e,0x148e,0x148e,0x148e,0x148e, +0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0x148e, +0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148b, +0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e, +0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b, +0x148b,0x148b,0x161a,0x161a,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e, +0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e, +0x148e,0x148e,0x148e,0x148e,0x148e,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d, +0x161d,0x1866,0x1866,0x1866,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x161d,0x148e,0x148e,0x148e,0x148e,0x148e, +0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e, +0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x161d,0x1866,0x1866,0x148e,0x148e,0x148e,0x148e, +0x148e,0x1491,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e, +0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161a,0x161a,0x161d,0x161d,0x148e,0x148e,0x1491,0x1491, +0x1491,0x1791,0x148e,0x1491,0x148e,0x148e,0x1491,0x1620,0x1620,0x161d,0x161d,0x1866,0x1866,0x1866,0x1866,0x1866, +0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x148e,0x148e,0x148e,0x148e, +0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x161d,0x161d,0x161d, +0x1791,0x161d,0x161d,0x161d,0x1866,0x1866,0x1866,0x1869,0x1869,0x1869,0x1869,0x1869,0x148e,0x148e,0x148e,0x148e, +0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e, +0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x161d,0x148e,0x161d,0x1491,0x1491, +0x148e,0x148e,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x148e,0x148e,0x148e, +0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x1491,0x1491, 0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491, -0x1491,0x1491,0x1491,0x1491,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb, -0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x18ff,0x18ff, -0x18ff,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x19c8,0x14eb,0x14eb, -0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x1863,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff, -0x18ff,0x18ff,0x18ff,0x18ff,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c, -0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x1539,0x1539,0x1539,0x1539,0x1539,0x1539,0x1539,0x1539, -0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c, -0x153f,0x153c,0x153c,0x153c,0x153c,0x16a7,0x16a7,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c, -0x182d,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c, -0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x155d,0x155d,0x155d,0x155d, -0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d, -0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x156f,0x156f,0x156f,0x156f, -0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f, -0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x1575,0x1575,0x1575,0x1575, -0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575, -0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1578,0x1578,0x1578,0x1578, -0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578, -0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x15a2,0x15a2,0x15a2,0x15a2, -0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x159c,0x159c,0x159c,0x1590,0x1590,0x1590,0x159c,0x159c, -0x1590,0x159f,0x1593,0x1590,0x15a5,0x15a5,0x1599,0x15a5,0x15a5,0x1596,0x17b5,0x1bdb,0x15b7,0x15b7,0x15b7,0x15b7, -0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7, -0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15a8,0x15c0,0x15c0,0x15c0,0x15c0, -0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0, -0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15ba,0x15c3,0x15c3,0x15c3,0x15c3,0x15c6,0x15c6,0x15c6,0x15c6, -0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6, -0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15e1,0x15e1,0x15e1,0x15e1, -0x15e1,0x15e1,0x15e1,0x15e1,0x15d8,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1, -0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15ea,0x15ea,0x15ea,0x15ea, -0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea, -0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15fc,0x15fc,0x15fc,0x15fc, -0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15f9,0x15f9,0x15f9,0x15ed, -0x15ed,0x15ed,0x15ed,0x15ed,0x15ed,0x15ed,0x15ed,0x15f9,0x15f9,0x15ed,0x15f9,0x15f0,0x15fc,0x15fc,0x15fc,0x15fc, -0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc, -0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x1620,0x1620,0x1620,0x1620, -0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620, -0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x161d,0x161d,0x161d,0x1629,0x1629,0x1629,0x1629, -0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629, -0x1629,0x1629,0x162f,0x162f,0x162f,0x162c,0x162c,0x162c,0x1629,0x1629,0x1629,0x1629,0x163e,0x163e,0x163e,0x163e, -0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x1632,0x1632,0x1632,0x1632, -0x1632,0x1632,0x1632,0x1644,0x1644,0x1638,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x163e,0x163e,0x163e,0x163e, -0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e, -0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x164a,0x164a,0x164a,0x164a, -0x164a,0x164a,0x164a,0x164a,0x164a,0x164a,0x164a,0x164a,0x164a,0x164a,0x164a,0x164a,0x164a,0x164a,0x164a,0x164a, -0x164a,0x164a,0x164a,0x1647,0x1647,0x1647,0x1647,0x1647,0x1647,0x1647,0x1647,0x1647,0x164d,0x164d,0x164d,0x164d, -0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d, -0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x1671,0x1671,0x1671,0x1671, -0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671, -0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x167a,0x167a,0x167a,0x167a, -0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a, -0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x1692,0x1692,0x1692,0x1692, -0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x167d,0x168c,0x168c,0x167d, -0x167d,0x167d,0x167d,0x167d,0x167d,0x168c,0x167d,0x168f,0x168f,0x167d,0x168f,0x167d,0x1692,0x1692,0x1692,0x1692, -0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692, -0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x169b,0x169b,0x169b,0x169b, -0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b, -0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x16a1,0x16a1,0x16a1,0x16a1, +0x1491,0x148e,0x148e,0x148e,0x1491,0x148e,0x148e,0x148e,0x148e,0x1491,0x1491,0x1491,0x148e,0x1491,0x1491,0x1491, +0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x1491,0x148e,0x1491,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e, +0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e, +0x148e,0x148e,0x148e,0x148e,0x1791,0x148e,0x148e,0x148e,0x148e,0x161d,0x161d,0x1866,0x14eb,0x14eb,0x14eb,0x14eb, +0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161d,0x1866,0x1866,0x1866,0x1866,0x17eb,0x148e,0x148e,0x148e,0x148e, +0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x161d,0x161d,0x161d,0x161d, +0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x1620,0x1620,0x161d,0x161d,0x161d,0x161d,0x191d,0x161d, +0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d, +0x161d,0x161d,0x161d,0x161d,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161d,0x148e,0x148e,0x148e,0x148e,0x148e, +0x1575,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494, +0x1494,0x1575,0x1494,0x1494,0x1494,0x1575,0x1494,0x1575,0x1494,0x1575,0x1494,0x1575,0x1494,0x1494,0x1494,0x1575, +0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1575,0x1575,0x1494,0x1494,0x1494,0x1494,0x1575,0x1494,0x1575,0x1575, +0x1494,0x1494,0x1494,0x1494,0x1575,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494, +0x1494,0x1797,0x1797,0x186c,0x186c,0x1497,0x1497,0x1497,0x1494,0x1494,0x1494,0x1497,0x1497,0x1497,0x1497,0x1497, +0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716, +0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a, +0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a, +0x149a,0x149a,0x149a,0x149d,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a, +0x149a,0x149a,0x149a,0x149a,0x149d,0x149d,0x149d,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a, +0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0, +0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0, +0x1899,0x1899,0x1896,0x17ee,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14ee,0x14ee,0x14ee,0x14ee,0x14ee,0x14ee, +0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x1626, +0x14f4,0x162c,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x1629,0x1629,0x1629, +0x1629,0x1629,0x162c,0x17f1,0x17f1,0x1c4a,0x189f,0x189f,0x189f,0x189f,0x189f,0x189f,0x189f,0x189f,0x1b78,0x1b78, +0x14fd,0x14fd,0x14fd,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f, +0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f, +0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a, +0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a, +0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530, +0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1ad3, +0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533, +0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533, +0x1539,0x1539,0x1545,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b, +0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b, +0x154b,0x154b,0x154b,0x1545,0x1545,0x1545,0x1539,0x1539,0x1539,0x1539,0x1539,0x1539,0x1539,0x1539,0x1539,0x1545, +0x1548,0x154b,0x154e,0x154e,0x154b,0x1551,0x1551,0x153c,0x153f,0x17f7,0x17fa,0x17fa,0x17fa,0x1632,0x1b81,0x1b7e, +0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x162f,0x1800,0x1803,0x17fd,0x1806,0x1806, +0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c, +0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c, +0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc, +0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x19ec,0x19ec,0x19ec,0x15cc,0x15cc,0x15cc, +0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x1abb,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc, +0x15cc,0x15cc,0x1950,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec, +0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d, +0x161d,0x161d,0x161d,0x161d,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161d,0x161d,0x161d,0x161d, +0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x1620,0x161d,0x161d,0x161d, +0x161d,0x1794,0x1794,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x191a,0x161d,0x161d,0x161d, +0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d, +0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653, +0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653, +0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659, +0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659, +0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c, +0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c, +0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c, +0x168c,0x168c,0x168c,0x168c,0x1686,0x1686,0x1686,0x167a,0x167a,0x167a,0x1686,0x1686,0x167a,0x1689,0x167d,0x167a, +0x168f,0x168f,0x1683,0x168f,0x168f,0x1680,0x18a2,0x1cda,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1, 0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1, -0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x18ff,0x18ff,0x18ff,0x18ff, -0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x16e6,0x16e6,0x16e6,0x16e6,0x18ff,0x18ff,0x18ff,0x18ff, -0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x19c8,0x1707,0x1707,0x1707,0x1707, -0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707, -0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1746,0x1746,0x1746,0x1746, -0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746, -0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x174c,0x1749, -0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746, -0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f, -0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f, -0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752, -0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752, -0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764, -0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764, -0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, +0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x1692,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa, +0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa, +0x16aa,0x16aa,0x16aa,0x16a4,0x16ad,0x16ad,0x16ad,0x16ad,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0, +0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0, +0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb, +0x16c2,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb, +0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4, +0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4, +0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6, +0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e3,0x16e3,0x16e3,0x16d7,0x16d7,0x16d7,0x16d7,0x16d7, +0x16d7,0x16d7,0x16d7,0x16e3,0x16e3,0x16d7,0x16e3,0x16da,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6, +0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6, +0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x170d,0x170d,0x170d,0x170d,0x170d,0x170d,0x170d,0x170d, +0x170d,0x170d,0x170d,0x170d,0x170d,0x170d,0x170d,0x170d,0x170d,0x170d,0x170d,0x170d,0x170d,0x170d,0x170d,0x170d, +0x170d,0x170d,0x170d,0x170d,0x170d,0x170a,0x170a,0x170a,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716, +0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x171c,0x171c, +0x171c,0x1719,0x1719,0x1719,0x1716,0x1716,0x1716,0x1716,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b, +0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x171f,0x171f,0x171f,0x171f,0x171f,0x171f,0x171f,0x1731, +0x1731,0x1725,0x1722,0x1722,0x1722,0x1722,0x1722,0x1722,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b, +0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b, +0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737, +0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1734, +0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a, +0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a, +0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e, +0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e, +0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, 0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, -0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a, -0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a, -0x176a,0x176a,0x176a,0x176d,0x176d,0x176d,0x176d,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a, -0x176a,0x176a,0x176a,0x176a,0x176a,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176a,0x176d,0x176d, -0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d, -0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d, -0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785, -0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785, -0x186f,0x186f,0x186f,0x186f,0x186f,0x186f,0x186f,0x186f,0x186f,0x186f,0x186f,0x186f,0x1ae5,0x1a3a,0x1a3a,0x1a3d, -0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x178b,0x1839,0x1839,0x1839,0x1839,0x1839,0x1839,0x18d5, -0x1788,0x1788,0x1788,0x1788,0x1788,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836, -0x1836,0x1836,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3, -0x1788,0x19b3,0x19b3,0x1a3a,0x1a3a,0x1a3a,0x1a3a,0x1a3a,0x1a3a,0x1a3a,0x1a3a,0x1ae2,0x1bb4,0x1a3d,0x1a3d,0x1a3d, -0x18d2,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5,0x18d2,0x18d2, -0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1b4b,0x1b4e,0x1b48,0x1b48,0x1b48,0x1b48,0x1b48,0x1b48, -0x1b48,0x1b48,0x1b48,0x192c,0x17af,0x17af,0x17af,0x17af,0x17af,0x17af,0x17af,0x17af,0x17af,0x17af,0x17af,0x17af, -0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1839,0x1836,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2, -0x1839,0x18d5,0x18d5,0x1839,0x1839,0x1839,0x1839,0x1839,0x1839,0x1839,0x1836,0x17b8,0x1839,0x1839,0x1839,0x1a3a, -0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x17b8,0x1836,0x1836,0x1836,0x1836,0x1836,0x18d2,0x19b3,0x19b3,0x19b3, -0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x18d2, -0x17cd,0x17cd,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca, -0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca, -0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd, -0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd, -0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b, -0x181b,0x181b,0x181b,0x181b,0x181b,0x1818,0x1818,0x1818,0x1803,0x1803,0x1803,0x1803,0x1803,0x1803,0x1803,0x1803, -0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b, -0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b, +0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f, +0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x176a,0x1779,0x1779,0x176a,0x176a,0x176a,0x176a,0x176a, +0x176a,0x1779,0x176a,0x177c,0x177c,0x176a,0x177c,0x176a,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f, +0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f, +0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788, +0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788, +0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e, +0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e, +0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec, +0x19ec,0x19ec,0x19ec,0x19ec,0x17d3,0x17d3,0x17d3,0x17d3,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec, +0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x1abb,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4, +0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4, +0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833, +0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833, +0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1839,0x1836,0x1833,0x1833,0x1833,0x1833, +0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x183c,0x183c,0x183c,0x183c, +0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c, +0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183f,0x183f,0x183f,0x183f, 0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f, -0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f, -0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842, -0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842, -0x1842,0x1842,0x1842,0x1aee,0x1aee,0x1aee,0x1aee,0x1aee,0x1aee,0x1aee,0x1aee,0x1aee,0x1aee,0x1aee,0x1aee,0x1aee, -0x1899,0x1899,0x1899,0x1899,0x19ec,0x19ec,0x189c,0x189c,0x189c,0x189c,0x1884,0x1884,0x1884,0x1884,0x1884,0x1884, -0x1884,0x1884,0x1884,0x1884,0x1884,0x1884,0x1884,0x1896,0x1887,0x188a,0x188d,0x189f,0x189f,0x193e,0x1890,0x1890, -0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899, -0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899, -0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba, -0x18ba,0x18ba,0x18ba,0x18a5,0x18ab,0x18a8,0x18a8,0x18a8,0x18a8,0x18b7,0x18bd,0x18a8,0x18a8,0x18a8,0x18a8,0x18b4, -0x18ba,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba, +0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x1851,0x1851,0x1851,0x1851, +0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851, +0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1854,0x1854,0x1854,0x1854, +0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854, +0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1857,0x1857,0x1857,0x1857, +0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857, +0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x185a, +0x185a,0x185a,0x185a,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857, +0x1857,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x1857,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a, +0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a, +0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x1872,0x1872,0x1872,0x1872, +0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872, +0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x195c,0x195c,0x195c,0x195c, +0x195c,0x195c,0x195c,0x195c,0x195c,0x195c,0x195c,0x195c,0x1be4,0x1b33,0x1b33,0x1b36,0x1875,0x1875,0x1875,0x1875, +0x1875,0x1875,0x1875,0x1875,0x1878,0x1926,0x1926,0x1926,0x1926,0x1926,0x1926,0x19c2,0x1875,0x1875,0x1875,0x1875, +0x1875,0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x19bf,0x19bf, +0x19bf,0x19bf,0x19bf,0x19bf,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1875,0x1aa6,0x1aa6,0x1b33, +0x1b33,0x1b33,0x1b33,0x1b33,0x1b33,0x1b33,0x1b33,0x1be1,0x1cb3,0x1b36,0x1b36,0x1b36,0x19bf,0x19c2,0x19c2,0x19c2, +0x19c2,0x19c2,0x19c2,0x19c2,0x19c2,0x19c2,0x19c2,0x19c2,0x19c2,0x19c2,0x19bf,0x19bf,0x1b78,0x1b78,0x1b78,0x1b78, +0x1b78,0x1b78,0x1b78,0x1b78,0x1c4a,0x1c4d,0x1c47,0x1c47,0x1c47,0x1c47,0x1c47,0x1c47,0x1c47,0x1c47,0x1c47,0x1a1c, +0x189c,0x189c,0x189c,0x189c,0x189c,0x189c,0x189c,0x189c,0x189c,0x189c,0x189c,0x189c,0x1923,0x1923,0x1923,0x1923, +0x1923,0x1923,0x1926,0x1923,0x19bf,0x19bf,0x19bf,0x19bf,0x19bf,0x19bf,0x19bf,0x19bf,0x1926,0x19c2,0x19c2,0x1926, +0x1926,0x1926,0x1926,0x1926,0x1926,0x1926,0x1923,0x18a5,0x1926,0x1926,0x1926,0x1b33,0x1923,0x1923,0x1923,0x1923, +0x1923,0x1923,0x18a5,0x1923,0x1923,0x1923,0x1923,0x1923,0x19bf,0x1aa6,0x1aa6,0x1aa6,0x1923,0x1923,0x1923,0x1923, +0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x19bf,0x18ba,0x18ba,0x18b7,0x18b7, +0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7, +0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18ba,0x18ba,0x18ba,0x18ba, 0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba, -0x18c6,0x18c6,0x18c6,0x18c6,0x18c6,0x18c6,0x18c6,0x18c6,0x18c6,0x18c6,0x18c6,0x19ad,0x19ad,0x19ad,0x19ad,0x19ad, -0x1ad9,0x1ad9,0x1ad9,0x1ad9,0x1ad9,0x1ad9,0x1ad9,0x1ad9,0x1ad9,0x1ad9,0x1ad9,0x1ad9,0x1ad9,0x1ba5,0x1ba5,0x1ba5, -0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc, -0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc, -0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x19b3,0x19b3,0x19b3,0x19b3, -0x19b3,0x1a3a,0x1ae2,0x19b3,0x19b3,0x19b3,0x19b3,0x1ae5,0x1ae2,0x1bb4,0x19b3,0x1a3a,0x19b3,0x19b3,0x19b3,0x19b3, -0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3, -0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3, -0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db, -0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db, -0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de, -0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x1bb7, -0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1, -0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1, -0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953, -0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953, -0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e, -0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e, -0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974, -0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974, -0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f, -0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f, -0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992, -0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992, -0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b, -0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x1998,0x1998,0x1998, -0x19b3,0x19b3,0x19b3,0x1ae2,0x1ae2,0x1a3a,0x1a3a,0x1a3a,0x1a3a,0x1a3a,0x1a3a,0x1ae2,0x1ae2,0x1ae2,0x1a3a,0x1a3a, -0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b6,0x19b6,0x19b3,0x19b6,0x19b6,0x1a3a,0x1a3d,0x1a3a,0x1a3a,0x1a3a,0x1a3a, -0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef, -0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef, -0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16, -0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16, -0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f, -0x1a55,0x1a55,0x1a1f,0x1a55,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a25,0x1a25,0x1a25, -0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31, -0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31, -0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4, -0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4, -0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0, -0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0, -0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4, -0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4, -0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7, -0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7, -0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c, -0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c, -0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d, -0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d, -0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f, -0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f, -0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2, -0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2, -0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc, -0x1bfc,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9, -0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b, -0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b, -0,0,0,0 +0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x1908,0x1908,0x1908,0x1908, +0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908, +0x1908,0x1905,0x1905,0x1905,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x1908,0x1908,0x1908,0x1908, +0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908, +0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x192c,0x192c,0x192c,0x192c, +0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c, +0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192f,0x192f,0x192f,0x192f, +0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f, +0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x1bed, +0x1bed,0x1bed,0x1bed,0x1bed,0x1bed,0x1bed,0x1bed,0x1bed,0x1bed,0x1bed,0x1bed,0x1bed,0x1986,0x1986,0x1986,0x1986, +0x1ae5,0x1ae5,0x1989,0x1989,0x1989,0x1989,0x1971,0x1971,0x1971,0x1971,0x1971,0x1971,0x1971,0x1971,0x1971,0x1971, +0x1971,0x1971,0x1971,0x1983,0x1974,0x1977,0x197a,0x198c,0x198c,0x1a2e,0x197d,0x197d,0x1986,0x1986,0x1986,0x1986, +0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986, +0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x19a7,0x19a7,0x19a7,0x19a7, +0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x1992, +0x1998,0x1995,0x1995,0x1995,0x1995,0x19a4,0x19aa,0x1995,0x1995,0x1995,0x1995,0x19a1,0x19a7,0x1995,0x1995,0x1995, +0x1995,0x1995,0x1995,0x1995,0x1995,0x1995,0x1995,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7, +0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19b3,0x19b3,0x19b3,0x19b3, +0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x1aa0,0x1aa0,0x1aa0,0x1aa0,0x1aa0,0x1bd8,0x1bd8,0x1bd8,0x1bd8, +0x1bd8,0x1bd8,0x1bd8,0x1bd8,0x1bd8,0x1bd8,0x1bd8,0x1bd8,0x1bd8,0x1ca4,0x1ca4,0x1ca4,0x19b9,0x19b9,0x19b9,0x19b9, +0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9, +0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19bf,0x19bf,0x19bf,0x19bf, +0x19bf,0x19bf,0x19bf,0x19bf,0x19bf,0x19bf,0x19bf,0x19bf,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1b33,0x1be1,0x1aa6, +0x1aa6,0x1aa6,0x1aa6,0x1be4,0x1be1,0x1cb3,0x1aa6,0x1b33,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x19bf,0x19bf,0x19bf,0x19bf, +0x19bf,0x19bf,0x19bf,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6, +0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x19c8,0x19c8,0x19c8,0x19c8, +0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8, +0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19cb,0x19cb,0x19cb,0x19cb, +0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb, +0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x1cb6,0x19ce,0x19ce,0x19ce,0x19ce, +0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce, +0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x1a43,0x1a43,0x1a43,0x1a43, +0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43, +0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a5e,0x1a5e,0x1a5e,0x1a5e, +0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e, +0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a64,0x1a64,0x1a64,0x1a64, +0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64, +0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a82,0x1a82,0x1a82,0x1a82, +0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82, +0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a85,0x1a85,0x1a85,0x1a85, +0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85, +0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a8e,0x1a8e,0x1a8e,0x1a8e, +0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e, +0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8b,0x1a8b,0x1a8b,0x1aa6,0x1aa6,0x1aa6,0x1be1, +0x1be1,0x1b33,0x1b33,0x1b33,0x1b33,0x1b33,0x1b33,0x1be1,0x1be1,0x1be1,0x1b33,0x1b33,0x1aa6,0x1aa6,0x1aa6,0x1aa6, +0x1aa6,0x1aa9,0x1aa9,0x1aa6,0x1aa9,0x1aa9,0x1b33,0x1b36,0x1b33,0x1b33,0x1b33,0x1b33,0x1ae8,0x1ae8,0x1ae8,0x1ae8, +0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8, +0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1b0f,0x1b0f,0x1b0f,0x1b0f, +0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f, +0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b18,0x1b18,0x1b18,0x1b18, +0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b4e,0x1b4e,0x1b18,0x1b4e, +0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b1e,0x1b1e,0x1b1e,0x1b2a,0x1b2a,0x1b2a,0x1b2a, +0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a, +0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1bc3,0x1bc3,0x1bc3,0x1bc3, +0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3, +0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bcf,0x1bcf,0x1bcf,0x1bcf, +0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf, +0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bf3,0x1bf3,0x1bf3,0x1bf3, +0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3, +0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf6,0x1bf6,0x1bf6,0x1bf6, +0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6, +0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1c6b,0x1c6b,0x1c6b,0x1c6b, +0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b, +0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c8c,0x1c8c,0x1c8c,0x1c8c, +0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c, +0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c9e,0x1c9e,0x1c9e,0x1c9e, +0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e, +0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1ca1,0x1ca1,0x1ca1,0x1ca1, +0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1, +0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1cfb,0x1cfb,0x1cfb,0x1cfb, +0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cf8,0x1cf8,0x1cf8, +0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1d3a,0x1d3a,0x1d3a,0x1d3a, +0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a, +0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d46,0x1d46,0x1d46,0x1d46, +0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46, +0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0,0,0,0 }; static const UTrie2 propsVectorsTrie={ propsVectorsTrie_index, - propsVectorsTrie_index+5348, + propsVectorsTrie_index+5368, nullptr, - 5348, - 27344, + 5368, + 27416, 0xa40, - 0x1564, + 0x1578, 0x0, 0x0, 0x110000, - 0x7fb0, + 0x800c, nullptr, 0, false, false, 0, nullptr }; -static const uint32_t propsVectors[7230]={ +static const uint32_t propsVectors[7497]={ 0x67,0,0,0x67,0,0xe00000,0x67,0x80000,0x20,0x867,0,0,0xa67,0,0,0xb67, 0,0,0xd67,0,0,0xe67,0,0,0x1067,0,0,0x1167,0,0,0x1267,0, 0,0x1367,0,0,0x1467,0,0,0x1567,0,0,0x1667,0,0,0x1767,0,0, 0x1867,0,0,0x1967,0,0,0x1a67,0,0,0x1b67,0,0,0x1d67,0,0,0x1f67, 0,0,0x2067,0,0,0x2267,0,0,0x2367,0,0,0x2467,0,0,0x2567,0, 0,0x2767,0,0,0x2867,0x80000,0x20,0x2967,0,0,0x2a67,0,0x1600000,0x2b67,0,0, -0x2d67,0,0,0x3167,0x20000000,0,0x3267,0x20000000,0,0x3a67,0,0,0x3b67,0,0,0x3c67, -0,0,0x3e67,0,0,0x4067,0,0,0x4167,0,0,0x4467,0,0,0x4867,0, -0,0x4967,0,0,0x4a67,0,0,0x5067,0,0,0x5167,0,0,0x5467,0,0, -0x5567,0,0,0x5667,0x80000,0x20,0x5767,0,0,0x5867,0,0,0x5967,0,0,0x5b67, -0,0,0x5c67,0,0,0x5d67,0,0,0x6067,0x80000,0x20,0x6267,0,0,0x6367,0, -0,0x6467,0,0,0x6567,0,0,0x6f67,0,0,0x7067,0,0,0x7367,0x20000000,0, -0x7567,0,0,0x7667,0,0,0x7767,0,0,0x7867,0,0,0x7a67,0,0,0x7b67, -0,0,0x7c67,0,0,0x7e67,0,0,0x7f67,0,0,0x8167,0,0,0x8267,0, -0,0x8467,0,0,0x8567,0,0,0x8667,0,0,0x8767,0,0,0x8967,0,0, -0x8b67,0,0,0x8c67,0,0,0x8e67,0x20000000,0,0x8f67,0,0,0x9067,0,0,0x9167, -0,0,0x9267,0,0,0x9367,0,0,0x9567,0,0,0x9667,0,0,0x9767,0, -0,0x9867,0,0,0x9967,0,0,0x9a67,0,0,0x9c67,0,0,0x9f67,0,0, -0xa167,0,0,0xa367,0,0,0xa467,0,0,0xa567,0,0,0xa667,0,0,0xa767, -0,0,0xa867,0,0,0xa967,0,0,0xaa67,0,0xe00000,0xab67,0,0xe00000,0xac67,0, -0,0xad67,0,0,0xae67,0,0,0xaf67,0,0,0xb167,0,0,0xb267,0,0, -0xb467,0,0,0xb567,0,0,0xb767,0,0,0xb867,0,0,0xb967,0,0,0xba67, -0,0,0xbc67,0,0,0xbd67,0,0,0xbe67,0,0,0xbf67,0,0,0xc067,0, -0,0xc167,0,0,0xc367,0,0xe00000,0xc467,0,0xe00000,0xc667,0,0,0xc767,0,0, -0xc867,0,0,0xc967,0,0,0xca67,0,0,0xcc67,0,0xe00000,0xcf67,0,0xe00000,0xd067, -0,0xe00000,0xd367,0,0,0xd467,0,0,0xd567,0,0,0xd667,0,0,0xd867,0, -0,0xda67,0,0,0xdb67,0,0,0xdc67,0,0,0xdd67,0,0,0xde67,0,0, -0xdf67,0,0,0xe067,0,0,0xe167,0,0,0xe267,0,0,0xe367,0,0xe00000,0xe467, -0,0,0xe567,0,0,0xe667,0,0,0xe767,0,0,0xe867,0,0,0xe967,0, -0,0xea67,0,0,0xeb67,0,0,0xec67,0,0,0xed67,0,0,0xee67,0,0, -0xef67,0,0,0xf167,0,0,0xf367,0,0,0xf567,0,0,0xf667,0,0,0xf767, -0,0,0xf867,0,0,0xf967,0,0,0xfa67,0,0xe00000,0xfb67,0,0,0xfc67,0, -0,0xfd67,0,0,0xfe67,0,0,0x10167,0,0,0x10267,0,0,0x10367,0,0, -0x10467,0,0,0x10667,0,0,0x10767,0,0,0x10867,0,0,0x10967,0,0,0x10a67, -0,0,0x10b67,0,0,0x10c67,0,0,0x10d67,0,0,0x10e67,0,0,0x10f67,0, -0,0x11067,0,0,0x11367,0,0,0x11467,0,0,0x11567,0,0,0x11667,0,0, -0x11767,0,0,0x11867,0,0,0x11967,0,0xe00000,0x11a67,0,0,0x11b67,0,0,0x11c67, -0,0,0x11d67,0,0,0x11e67,0,0,0x11f67,0,0,0x12067,0,0,0x12167,0, -0,0x12267,0,0,0x12367,0,0,0x12467,0,0,0x12567,0,0,0x12667,0,0, -0x12767,0,0,0x12867,0,0,0x12967,0,0,0x12a67,0,0xe00000,0x12b67,0,0,0x12c67, -0,0,0x12d67,0,0,0x12f67,0,0,0x13067,0,0,0x13167,0,0,0x13267,0, -0,0x13367,0,0,0x13467,0,0,0x13567,0,0,0x13667,0,0,0x13767,0,0, -0x13867,0,0,0x13967,0,0,0x13a67,0,0,0x13b67,0,0,0x13c67,0,0,0x13d67, -0,0,0x13f67,0,0,0x14067,0,0,0x14167,0,0,0x14367,0,0,0x14467,0, -0,0x14567,0,0,0x14667,0,0,0x14767,0,0,0xa0067,0,0xe00000,0xa4f67,0,0xe00000, -0xa5f67,0,0xe00000,0xac567,0,0xe00000,0xad167,0,0xe00000,0xb0067,0,0xe00000,0xb1267,0,0xe00000,0xb2e67, -0,0xe00000,0x11000100,0,0x900020,0x11000100,0x40000001,0x440020,0x11000100,0x40000001,0x643020,0x11000100,0x40000001,0xa5a040,0x11000100,0x40000001, -0x116a8a0,0x11000200,0,0x900020,0x11000200,0x4000001,0xc4000b,0x11000200,0x7c00100,0x220402,0x11000200,0x24000000,0x200000,0x11000200,0x24000008,0x1710000, -0x11000200,0x40000001,0x1d3b020,0x11000219,0x7c00100,0x220401,0x11000219,0x7c00100,0x250401,0x11000319,0x7c00100,0x220401,0x11000319,0x7c00100,0x220402,0x11000319, -0x7c00100,0x250400,0x11000319,0x7c00100,0x250401,0x11000419,0x7c00100,0x220400,0x11000419,0x7c00100,0x220401,0x11000419,0x7c00100,0x220402,0x11000419,0x7c00100, -0x230400,0x11000419,0x7c00100,0x250400,0x11000419,0x7c00100,0x250401,0x11000419,0x7c00100,0x250402,0x11000519,0x7c00100,0x220400,0x11000519,0x7c00100,0x230400, -0x11000600,0x4000400,0x200002,0x11000600,0x4000400,0x200400,0x11000600,0x7c00500,0x220400,0x11000600,0x7c00500,0x230400,0x11000600,0x7c00500,0x530400,0x11000600, -0x7c00d00,0x230400,0x11000619,0x7c00500,0x22040f,0x11000800,0x4000010,0x1001401,0x11000800,0x4000400,0x200001,0x11000800,0x6800010,0x201001,0x11000800,0x7c00500, -0x230401,0x11000807,0x7c00100,0x220400,0x11000807,0x7c00100,0x250400,0x1100080e,0x4000400,0x200000,0x1100080e,0x4000400,0x200002,0x1100080e,0x7000500,0x220402, -0x1100080e,0x7c00100,0x220400,0x1100080e,0x7c00100,0x220401,0x1100080e,0x7c00100,0x220402,0x1100080e,0x7c00100,0x250400,0x1100080e,0x7c00100,0x250401,0x1100080e, -0x7c00120,0x220402,0x1100080e,0x7c00120,0x250402,0x11000908,0x4000000,0x200000,0x11000908,0x7c00100,0x220400,0x11000908,0x7c00100,0x220401,0x11000908,0x7c00100, -0x250400,0x11000908,0x7c00100,0x250401,0x11000a03,0x4000000,0x200400,0x11000a03,0x4000000,0x201000,0x11000a03,0x4000000,0x270000,0x11000a03,0x7c00100,0x220400, -0x11000a03,0x7c00100,0x220402,0x11000a03,0x7c00100,0x250400,0x11000a03,0x7c00500,0x230400,0x11000a03,0xc000010,0x1049400,0x11000b13,0x2802500,0x962460,0x11000b13, -0x4000000,0x200000,0x11000b13,0x4000000,0x201000,0x11000b13,0x4000000,0x230400,0x11000b13,0x4000002,0x400000,0x11000b13,0x4000010,0x200000,0x11000b13,0x7c00100, -0x2633800,0x11000c00,0x80000000,0x218960,0x11000c02,0x2802100,0x962460,0x11000c02,0x2802400,0x962460,0x11000c02,0x4000000,0x200000,0x11000c02,0x4000000,0x1329400, -0x11000c02,0x4000000,0x1329800,0x11000c02,0x4000000,0x1500000,0x11000c02,0x6800000,0x1329800,0x11000c02,0x7c00100,0x230400,0x11000c02,0x7c00100,0x230401,0x11000c02, -0x7c00100,0x230402,0x11000c02,0x7c00500,0x230400,0x11000c02,0x7d00100,0x230400,0x11000f01,0x2802400,0x962460,0x11000f0a,0x2802100,0x962460,0x11000f0a,0x2802400, -0x962460,0x11000f0a,0x2806400,0x962460,0x11000f0a,0x4000000,0x200000,0x11000f0a,0x6800100,0x962540,0x11000f0a,0x7c00100,0x230400,0x11000f0a,0x7c00100,0x230401, -0x11001004,0x2802100,0x962460,0x11001004,0x2802400,0x962460,0x11001004,0x2806400,0x962460,0x11001004,0x4000000,0x200000,0x11001004,0x4000000,0x1500000,0x11001004, -0x6800100,0x962540,0x11001004,0x6800100,0x962541,0x11001004,0x7c00100,0x230400,0x11001004,0x7c00100,0x230401,0x11001110,0x2802100,0x962460,0x11001110,0x2802400, -0x962460,0x11001110,0x2806400,0x962460,0x11001110,0x6800100,0x962540,0x11001110,0x7c00100,0x230400,0x11001110,0x7c00100,0x230401,0x1100120f,0x2802100,0x962460, -0x1100120f,0x2802400,0x962460,0x1100120f,0x2806400,0x962460,0x1100120f,0x6800100,0x962540,0x1100120f,0x7c00100,0x230400,0x1100131f,0x2802100,0x962460,0x1100131f, -0x2802400,0x962460,0x1100131f,0x2806400,0x962460,0x1100131f,0x4000000,0x200000,0x1100131f,0x6800000,0x1329800,0x1100131f,0x6800100,0x962540,0x1100131f,0x6800100, -0x962541,0x1100131f,0x7c00100,0x230400,0x1100131f,0x7c00100,0x230401,0x11001423,0x2802100,0x962460,0x11001423,0x2806400,0x962460,0x11001423,0x6800100,0x962540, -0x11001423,0x6800100,0x962541,0x11001423,0x7c00100,0x230400,0x11001423,0x7c00100,0x230401,0x11001524,0x2802100,0x962460,0x11001524,0x2802100,0x962461,0x11001524, -0x2806400,0x962460,0x11001524,0x6800000,0x1329800,0x11001524,0x6800100,0x962540,0x11001524,0x7c00100,0x230400,0x11001615,0x2802100,0x962460,0x11001615,0x2806400, -0x962460,0x11001615,0x6800100,0x962540,0x11001615,0x6800100,0x962541,0x11001615,0x7c00100,0x230400,0x1100171a,0x2802100,0x962460,0x1100171a,0x2806400,0x962460, -0x1100171a,0x6800000,0x1329800,0x1100171a,0x6800100,0x962540,0x1100171a,0x6800100,0x962541,0x1100171a,0x7c00100,0x230400,0x11001900,0x4000000,0x1600000,0x11001926, -0x2802100,0x1862460,0x11001926,0x2802400,0x1862460,0x11001926,0x2806100,0x1862460,0x11001926,0x4000000,0x200000,0x11001926,0x4000010,0x400000,0x11001926,0x6800000, -0x1329800,0x11001926,0x7800100,0x1830142,0x11001926,0x7c00100,0x1830000,0x11001926,0x7c00900,0x1830000,0x11001926,0x7e00100,0x1830000,0x11001a18,0x2802100,0x1862460, -0x11001a18,0x2802400,0x1862460,0x11001a18,0x6800000,0x1329800,0x11001a18,0x7800100,0x1830142,0x11001a18,0x7c00100,0x1830000,0x11001a18,0x7c00100,0x1830002,0x11001a18, -0x7c00900,0x1830000,0x11001a18,0x7e00100,0x1830000,0x11001d0c,0x7c00100,0x230400,0x11001d0c,0x7c00100,0x250400,0x11001e12,0x7c00100,0x2230500,0x11001e12,0x7c00100, -0x2330520,0x11001e12,0x7c80100,0x2330520,0x11002619,0x7c00100,0x220401,0x11002619,0x7c00100,0x220402,0x11002619,0x7c00100,0x250401,0x1100270e,0x4000400,0x200001, -0x1100270e,0x4000400,0x200002,0x1100270e,0x4000400,0x500001,0x1100270e,0x7c00100,0x220401,0x1100270e,0x7c00100,0x250401,0x11002800,0x80000,0x918820,0x11002800, -0x80000,0x1c18020,0x11002800,0x180000,0x918820,0x11002800,0x4000001,0x445801,0x11002800,0x4000001,0x445802,0x11002800,0x4000001,0xc4000b,0x11002800,0x6800000, -0x201c00,0x11002800,0x6800020,0x201c00,0x11002800,0x24000000,0x200000,0x11002800,0x24000000,0x200002,0x11002800,0x24000000,0x810000,0x11002800,0x24000000,0x1410000, -0x11002800,0x24000000,0x1500000,0x11002800,0x24000000,0x1500002,0x11002800,0x24000002,0x400000,0x11002800,0x24000006,0xc0000b,0x11002800,0x24000008,0x1410000,0x11002800, -0x24000008,0x1710000,0x11002800,0x24000020,0x1001400,0x11002800,0x24000020,0x1500002,0x11002800,0x2c000010,0x1248000,0x11002800,0x2c000010,0x1248002,0x11002800,0x40000001, -0x63b020,0x11002800,0x40080000,0x918820,0x11002801,0x80000,0x2a65620,0x11002801,0x82000,0x962460,0x11002900,0x4000000,0x20000e,0x11002900,0x4000000,0x20000f, -0x11002900,0x4000020,0x20000e,0x11002900,0x4000020,0x20000f,0x11002900,0x4000020,0x81000e,0x11002900,0x4000020,0x81000f,0x11002900,0x4000020,0x141000e,0x11002900, -0x4000020,0x141000f,0x11002900,0x4000022,0x20000e,0x11002900,0x4000022,0x20000f,0x11002a00,0x4000000,0x1500000,0x11002a00,0x4000000,0x1600000,0x11002a00,0x4000000, -0x1600002,0x11002b01,0x2000,0x962460,0x11002b01,0x2802020,0x962460,0x11002c00,0x4000000,0x200000,0x11002c00,0x4000000,0x200002,0x11002c00,0x4000000,0x20000f, -0x11002c00,0x4000020,0x200000,0x11002c00,0x7c00000,0x200000,0x11002c00,0x7c00020,0x200000,0x11002c00,0x7c00120,0x220405,0x11002c00,0x7c00120,0x230402,0x11002c00, -0x7c00120,0x250402,0x11002c00,0x7c00120,0x250405,0x11002c19,0x7c00100,0x250400,0x11002c19,0x7c00100,0x250401,0x11002d00,0x4000000,0x100006,0x11002d00,0x4000000, -0x200006,0x11002d19,0x7c00100,0x220402,0x11002d19,0x7c00100,0x230400,0x11002d19,0x7c00100,0x250402,0x11002e00,0x24000000,0x200000,0x11002e00,0x24000020,0x200000, -0x11002e00,0x24000020,0x200001,0x11002f00,0x24000020,0x200000,0x11002f00,0x24000020,0x200001,0x11002f00,0x24000020,0x200002,0x11002f00,0x24000020,0xf00000,0x11002f00, -0x24000020,0x1600000,0x11002f00,0x24000022,0x1600000,0x11003000,0x24000000,0x200000,0x11003000,0x24000020,0x200000,0x11003000,0x24000020,0x810000,0x11003000,0x24000020, -0x1410000,0x11003100,0x24000000,0x200000,0x11003200,0x24000000,0x200000,0x11003300,0x4000000,0x100003,0x11003400,0x24000000,0x100000,0x11003400,0x24000000,0x200000, -0x11003500,0x24000000,0x200000,0x11003600,0x24000000,0x200000,0x11003600,0x24000020,0x200000,0x11003700,0x24000000,0x200000,0x11003700,0x24000000,0xe00000,0x11003700, -0x24000000,0x2800000,0x11003700,0x24000020,0x200000,0x11003800,0x4000000,0x100000,0x11003800,0x24000000,0x200000,0x11003800,0x24000000,0xb00000,0x11003800,0x24000000, -0xe00000,0x11003800,0x24000000,0x1710000,0x11003800,0x24000000,0x2800000,0x11005003,0x7c00100,0x220402,0x11005013,0x2802500,0x962460,0x11005013,0x4000020,0x200005, -0x11005013,0x7c00100,0x2633801,0x11005013,0x7c00100,0x2633802,0x11005013,0x7c00100,0x2633805,0x11005019,0x7c00100,0x220402,0x11005102,0x7000100,0x230408,0x11005102, -0x7c00100,0x230404,0x11005102,0x7c00100,0x230407,0x11005102,0x7c00100,0x230408,0x11005102,0x7c00100,0x230409,0x11005201,0x2802400,0x962460,0x11005500,0x80000, -0x1e18820,0x11005502,0x7000100,0x230408,0x11005502,0x7c00100,0x230404,0x11005502,0x7c00100,0x230407,0x11005502,0x7c00100,0x230408,0x11005502,0x7c00100,0x230409, -0x11005667,0x1000,0,0x11020200,0x80004,0x418820,0x11020200,0x4000000,0x100006,0x11020200,0x4000000,0x10000f,0x11020200,0x4000400,0x100002,0x11020200, -0x4000400,0x500002,0x11020200,0x6800c00,0x101000,0x11020200,0x24000000,0x100000,0x11020200,0x24000000,0x200000,0x11020200,0x24000000,0x1400000,0x11020200,0x24000000, -0x1500000,0x11020200,0x24000000,0x1600000,0x11020200,0x24000020,0x100000,0x11020200,0x24000020,0x1600000,0x11020219,0x7c00100,0x12040f,0x11020219,0x7c00100,0x220400, -0x11020219,0x7c00100,0x220401,0x11020219,0x7c00100,0x250400,0x11020319,0x7c00100,0x220400,0x11020319,0x7c00100,0x220401,0x11020319,0x7c00100,0x220402,0x11020319, -0x7c00100,0x250400,0x11020319,0x7c00100,0x250402,0x11020319,0x7d00100,0x220402,0x11020419,0x7c00100,0x220401,0x11020519,0x7c00100,0x220400,0x11020600,0x4000400, -0x100002,0x11020600,0x4000400,0x200400,0x11020600,0x7c00500,0x130400,0x11020600,0x7c00d00,0x130400,0x11020701,0x2802400,0x962460,0x11020701,0x2802400,0x962461, -0x11020701,0x2802400,0xc62460,0x1102080e,0x7c00100,0x220400,0x1102080e,0x7c00100,0x250400,0x11020908,0x7c00100,0x220400,0x11020908,0x7c00100,0x220401,0x11020908, -0x7c00100,0x250400,0x11020908,0x7c00100,0x250401,0x11022800,0x24000000,0x100000,0x11022800,0x24000000,0x200000,0x11022800,0x24000000,0x200002,0x11022800,0x24000000, -0x401000,0x11022800,0x24000000,0xf00002,0x11022800,0x24000000,0xf0ac02,0x11022800,0x24000000,0x1500000,0x11022800,0x24000002,0x100000,0x11022800,0x24000002,0x370000, -0x11022800,0x24000002,0x470000,0x11022800,0x24000006,0x400000,0x11022800,0x24000008,0x1710000,0x11022800,0x24000008,0x1712c00,0x11022800,0x24000020,0x100000,0x11022800, -0x24000020,0x1500000,0x11022800,0x24000020,0x1500002,0x11022900,0x4000000,0x10000e,0x11022900,0x4000000,0x10000f,0x11022919,0x7c00100,0x12040f,0x11022c00,0x4000000, -0x100002,0x11022c00,0x4000000,0x10000f,0x11022c00,0x4000000,0x1500002,0x11022c00,0x4000000,0x1600002,0x11022c00,0x7c00120,0x120405,0x11022c0e,0x7c00100,0x250401, -0x11022c19,0x7c00100,0x150401,0x11022d00,0x4000000,0x100006,0x11022d00,0x4000000,0x200006,0x11022d19,0x7c00100,0x120402,0x11022d19,0x7c00100,0x150402,0x11022e00, -0x24000000,0x200000,0x11022e00,0x24000020,0x100000,0x11022f00,0x24000020,0x100000,0x11022f00,0x24000020,0x100001,0x11022f00,0x24000020,0x100002,0x11023000,0x24000000, -0x100000,0x11023300,0x4000000,0x100002,0x11023300,0x4000000,0x100003,0x11023300,0x4000100,0x120403,0x11023300,0x4000100,0x150403,0x11023400,0x24000000,0x100000, -0x11023500,0x24000000,0x100000,0x11023600,0x24000000,0x100000,0x11023600,0x24000020,0x100000,0x11023700,0x24000000,0x100000,0x11023700,0x24000000,0xe00000,0x11023700, -0x24000020,0x100000,0x11023800,0x4000000,0x100000,0x11023800,0x24000000,0x200000,0x11024e67,0,0,0x11025600,0x4000000,0x100000,0x11042a00,0x4000000, -0x1600000,0x11045700,0x4000000,0x20000a,0x11045700,0x4000020,0x20000a,0x11045712,0x7c00100,0xe3040a,0x11045712,0x7c80100,0xe3040a,0x11045716,0x7c00100,0xe30c0a, -0x11045716,0x7c00100,0x2530c0a,0x11063d00,0x4000001,0x445811,0x11065700,0x4000000,0x810011,0x11065700,0x4000000,0xe00011,0x11065700,0x4000000,0x1410011,0x11065700, -0x4000000,0x1500011,0x11065700,0x4000000,0x1600011,0x11065700,0x4000006,0xe70011,0x11065700,0x4000008,0xe00011,0x11065700,0x4000008,0xe02c11,0x11065700,0x4000010, -0x871411,0x11065700,0x4000010,0x1201411,0x11065700,0x4000010,0x1271011,0x11065700,0x4000020,0xe00011,0x11065700,0x4000400,0xe00011,0x11065700,0x4000420,0xe00011, -0x11065700,0x6800000,0xe01c11,0x11065700,0x6800040,0xe29811,0x11065700,0xc000010,0x80ac11,0x11065700,0xc000010,0xb48011,0x11065719,0x7c00100,0xe20411,0x11065719, -0x7c00100,0xe50411,0x11065719,0x7c00140,0xe20411,0x11065719,0x7c00140,0xe50411,0x11080100,0x6800000,0x201c00,0x11080100,0x68000c0,0x1329800,0x11080100,0x24000000, -0x200000,0x11080100,0x24000000,0x810000,0x11080100,0x24000000,0x1410000,0x11080100,0x24000000,0x1500000,0x11080100,0x24000000,0x1600000,0x11080100,0x24000000,0x1b00000, -0x11080100,0x24000000,0x2410000,0x11080100,0x24000006,0xd70000,0x11080100,0x24000008,0x1713c00,0x11080100,0x24000008,0x1714000,0x11080100,0x24000010,0x1001400,0x11080100, -0x24000010,0x1071000,0x11080100,0x24000010,0x1071400,0x11080100,0x24000020,0x200000,0x11080100,0x24000020,0x400000,0x11080100,0x24000020,0x1600000,0x11080100,0x24000400, -0x200000,0x11080100,0x24000420,0x200000,0x11080100,0x2c000010,0xb48000,0x11080100,0x2c000010,0x100ac00,0x11080100,0x44000001,0x1a45800,0x11080119,0x7c00100,0x220400, -0x11080119,0x7c00100,0x250400,0x11080119,0x7c001c0,0x220400,0x11080119,0x7c001c0,0x250400,0x11080200,0x4000400,0x200002,0x11080200,0x24000000,0x200000,0x11080200, -0x24000000,0x1500000,0x11080200,0x24000000,0x1600000,0x11080200,0x24000020,0x200000,0x110a1e12,0x7c00100,0x2130480,0x110a1e12,0x7c80100,0x2130480,0x110a3000,0x24000000, -0xe00000,0x110a3000,0x24100000,0x810001,0x110a3000,0x24100000,0x1410001,0x110a3700,0x24000000,0x200000,0x110a3d00,0x4000000,0xe00000,0x110a3d00,0x4000000,0xe00002, -0x110a3d00,0x24000000,0xe00000,0x110a3d11,0x7c00300,0xe30000,0x110a3d11,0x7c00900,0x1230400,0x110a3d12,0x2802400,0x962460,0x110a3e14,0x7c00100,0xe30000,0x110a3e14, -0x7c00100,0xe30001,0x110a3e14,0x7c00100,0x2530000,0x110a3e14,0x7c00900,0x1230000,0x110a3e14,0x7c00900,0x1230001,0x110a3f16,0x7c00100,0xe30c00,0x110a3f16,0x7c00100, -0xe30c01,0x110a3f16,0x7c00100,0x2530c00,0x110a3f16,0x7c00900,0x1230c00,0x110a3f16,0x7c00900,0x1230c01,0x110a4005,0x7c00100,0xe30400,0x110a4112,0x7c00100,0xe30402, -0x110a4112,0x7c80100,0xe30402,0x110a4400,0x4000000,0xe00000,0x110a4412,0x4000000,0xe00002,0x110a4412,0x4000000,0xe00003,0x110a4416,0x4000000,0xe00c03,0x110a4500, -0x4000000,0xe0000d,0x110a4516,0x4000000,0xe00c0d,0x110a4711,0x7c40300,0xe30000,0x110a4f11,0x7c00300,0xe30001,0x110a4f11,0x7c40300,0xe30000,0x110a5300,0x4000000, -0x810010,0x110a5300,0x4000000,0xe00002,0x110a5300,0x4000000,0xe00010,0x110a5300,0x4000000,0x1410010,0x110a5300,0x4000002,0xe70010,0x110a5300,0x4000008,0x810010, -0x110a5300,0x4000008,0x1410010,0x110a5300,0x6800000,0xe01c02,0x110a5300,0x6800000,0xe01c10,0x110a5400,0x4000000,0x81000c,0x110a5400,0x4000000,0xe0000c,0x110a5400, -0x4000000,0x141000c,0x110a5400,0x4000000,0x150000c,0x110a5400,0x4000000,0x160000c,0x110a5400,0x4000002,0xe7000c,0x110a5400,0x4000010,0x87140c,0x110a5400,0x4000010, -0xe7000c,0x110a5400,0x4000010,0x120140c,0x110a5400,0x4000010,0x127100c,0x110a5400,0x4000020,0xe0000c,0x110a5400,0x4000026,0xe7000c,0x110a5400,0xc000010,0x80ac0c, -0x110a5400,0xc000010,0xb4800c,0x11400c0c,0x4000010,0xb00000,0x11400c0c,0x4000010,0x1071400,0x11400c17,0xc000010,0xb48000,0x11400c1e,0x7c00900,0x230400,0x11400f4b, -0xc000010,0x448000,0x11400f5f,0xc000010,0x448000,0x11401d94,0x4000000,0x200000,0x11403dca,0x4000000,0xe00000,0x114457bf,0x4000004,0x120000a,0x114457bf,0x4000008, -0x81000a,0x114457bf,0x4000008,0x141000a,0x114457bf,0x4000010,0x87000a,0x114457bf,0xc000010,0x84800a,0x114457c8,0x3802500,0x126246a,0x114457c8,0x7c00d00,0x2530c0a, -0x114a3dbf,0x24000000,0x810000,0x114a3dbf,0x24000000,0x1410000,0x114a3dbf,0x24000008,0x810000,0x114a3dbf,0x24000008,0x1410000,0x114a3dbf,0x24000010,0x870000,0x114a3dbf, -0x2c000010,0x848000,0x114a3dc5,0x4000000,0xe00000,0x114a3dc5,0x24000000,0xe00000,0x114a3dc5,0x24000002,0xe00000,0x114a3dc5,0x24000002,0x1200000,0x114a3dc5,0x24000008, -0x810000,0x114a3dc5,0x24000008,0x1410000,0x114a3dc8,0x7c00900,0x930c00,0x114a3dc8,0x7c00900,0xe30c00,0x114a3dca,0x7c00300,0xe30000,0x114a3ec8,0x7000400,0x1200c02, -0x114a3fbf,0x4000004,0x1200000,0x114a3fc8,0x7c00d00,0x2530c00,0x114a42ca,0x4000000,0xe00000,0x114a42ca,0x4000000,0xe0000f,0x114a44ca,0x4000000,0xe00002,0x114a44ca, -0x4000000,0xe00003,0x114a45ca,0x4000000,0xe00002,0x114a45ca,0x4000000,0xe0000d,0x11505103,0x24000000,0x810000,0x11505103,0x24000000,0x1410000,0x1180090a,0x2802400, -0x962460,0x11800c27,0x2802100,0x962460,0x11800c27,0x2802500,0x962460,0x11800f32,0x2802400,0x962460,0x11800f3f,0x2802400,0x962460,0x11820700,0x2802400,0x962460, -0x11820700,0x2802500,0x962460,0x118a3dcb,0x2802400,0x962460,0x118a3ec8,0x2802400,0x962460,0x11c00904,0x2802400,0x962460,0x11c00908,0x2802400,0x962460,0x11c00c2c, -0x6800000,0x1329800,0x11c00c30,0xc000010,0xb48000,0x11c00f78,0x6800000,0x1329800,0x11c0107d,0x6800000,0x1329800,0x11c01181,0x6800000,0x1329800,0x11c01285,0x6800000, -0x1329800,0x11c01489,0x4000000,0x200000,0x11c01489,0x6800000,0x1329800,0x11c0168d,0x6800000,0x1329800,0x11d05107,0x7c00100,0x230408,0x20000067,0x1000,0, -0x20000b13,0x2802400,0x962460,0x20000b13,0x2802500,0x962460,0x20001b27,0x2802100,0x962460,0x20001b27,0x2802100,0x962461,0x20001b27,0x2802400,0x962460,0x20001b27, -0x2802500,0x962460,0x20001b27,0x2806400,0x962460,0x20001b27,0x2902100,0x962462,0x20001b27,0x4000000,0x200000,0x20001b27,0x4000000,0x400000,0x20001b27,0x4000000, -0x500000,0x20001b27,0x4000000,0x810000,0x20001b27,0x4000000,0xb00000,0x20001b27,0x4000000,0xc0000b,0x20001b27,0x4000000,0x1410000,0x20001b27,0x4000010,0xb00000, -0x20001b27,0x4000010,0xc00000,0x20001b27,0x6800000,0x1329800,0x20001b27,0x6800100,0x462540,0x20001b27,0x6800400,0x962540,0x20001b27,0x7c00100,0x230400,0x20001b27, -0x7c00100,0x230401,0x20002619,0x7c00100,0x220401,0x20002a00,0x4000000,0x1600000,0x20004b67,0,0x1900000,0x20004c67,0,0x1900000,0x20004d67,0, -0x1900000,0x20006d67,0x1000,0,0x20006e67,0x1000,0,0x20026d67,0,0,0x20026e67,0,0,0x200a4a12,0x7c00100,0x1f304c1, -0x200a4a12,0x7c00100,0x20304e1,0x21005600,0x4000000,0x700000,0x21022a00,0x4000000,0x1600000,0x30000419,0x7c00100,0x220400,0x30000419,0x7c00100,0x220401,0x30000419, -0x7c00100,0x250400,0x30000419,0x7c00100,0x250401,0x30000519,0x7c00100,0x220400,0x30000600,0x4000400,0x200400,0x30000600,0x7c00500,0x230400,0x30000605,0x4000400, -0x200400,0x3000080e,0x7c00100,0x220400,0x30000908,0x2000,0x962460,0x30000908,0x7c00100,0x220400,0x30000908,0x7c00100,0x220401,0x30000908,0x7c00100,0x250400, -0x30000908,0x7c00100,0x250401,0x30000a03,0x4000006,0x400400,0x30000c02,0x4000000,0x200000,0x30000c02,0x7c00100,0x230400,0x30000d22,0x2802100,0x962460,0x30000d22, -0x2802400,0x962460,0x30000d22,0x2802500,0x962460,0x30000d22,0x4000000,0x200000,0x30000d22,0x4000010,0x200000,0x30000d22,0x7c00100,0x230400,0x30000d22,0xc000010, -0x248000,0x30000d22,0x80000000,0x218960,0x30000e25,0x2802500,0x962460,0x30000e25,0x7c00100,0x230400,0x30001821,0x2802100,0x962460,0x30001821,0x2806400,0x962460, -0x30001821,0x4000000,0x200000,0x30001821,0x6800100,0x962540,0x30001821,0x6800100,0x962541,0x30001821,0x7c00100,0x230400,0x30001b27,0x2802100,0x962460,0x30001b27, -0x2802400,0x962460,0x30001b27,0x4000000,0x200000,0x30001b27,0x4000000,0x400000,0x30001b27,0x7c00100,0x230400,0x30001c1c,0x2802100,0x1862460,0x30001c1c,0x2802400, -0x1862460,0x30001c1c,0x2806400,0x1862460,0x30001c1c,0x4000000,0x200000,0x30001c1c,0x6800100,0x1862400,0x30001c1c,0x6800100,0x1862540,0x30001c1c,0x7c00100,0x1830000, -0x30001c1c,0x7c00100,0x1830001,0x30001c1c,0xc000010,0x448000,0x30001f0b,0x4000000,0x200000,0x30001f0b,0x4000010,0x200000,0x30001f0b,0x4000010,0x400000,0x30001f0b, -0x6800000,0x200000,0x30001f0b,0x7c00100,0x230400,0x30001f0b,0xc000010,0x248000,0x30002006,0x7c00100,0x250400,0x30002128,0x4000000,0x200000,0x30002128,0x7c00100, -0x230400,0x30002128,0xc000010,0x248000,0x3000221d,0x4000000,0x810000,0x3000221d,0x4000000,0x1410000,0x3000221d,0x4000001,0x445800,0x3000221d,0x7c00100,0x230400, -0x30002300,0x4000010,0x400000,0x30002320,0x7c00100,0x230400,0x30002417,0x2802100,0x1862460,0x30002417,0x2802400,0x1862460,0x30002417,0x2806400,0x1862460,0x30002417, -0x2882000,0x1862460,0x30002417,0x4000000,0x200000,0x30002417,0x4000000,0x400000,0x30002417,0x4000000,0x1600000,0x30002417,0x4000010,0x400000,0x30002417,0x4000010, -0x1200000,0x30002417,0x6800000,0x1329800,0x30002417,0x6800100,0x1862540,0x30002417,0x7c00100,0x1830000,0x30002417,0x7d00100,0x1830000,0x3000251b,0x80000,0xc18820, -0x3000251b,0x2802100,0x962460,0x3000251b,0x3c02100,0x962460,0x3000251b,0x4000000,0x200000,0x3000251b,0x4000006,0x500000,0x3000251b,0x4000010,0x400000,0x3000251b, -0x4000010,0xb70000,0x3000251b,0x4000800,0x200000,0x3000251b,0x6800000,0x1329800,0x3000251b,0x7c00100,0x230400,0x3000251b,0x7c00900,0x230400,0x3000251b,0xc000010, -0xb48000,0x3000251b,0x12882000,0x962460,0x30002800,0x24000000,0x200000,0x30002800,0x2c000010,0x1248002,0x30002a00,0x4000000,0x1600000,0x30002b01,0x2000,0x962460, -0x30002c00,0x4000000,0x200000,0x30002c00,0x7c00100,0x220405,0x30002d19,0x7c00100,0x250400,0x30002e00,0x24000000,0x200000,0x30003000,0x24000000,0x200000,0x30003100, -0x24000000,0x200000,0x30003600,0x24000000,0x200000,0x30003700,0x24000000,0x200000,0x3000392e,0x24000000,0x200000,0x30005013,0x7c00100,0x2633801,0x30005600,0, -0x918820,0x30020600,0x4000400,0x500400,0x30020701,0x2802400,0x962460,0x30020701,0x2802400,0xc62460,0x300a3a11,0x4020000,0xe00000,0x300a3a11,0x4020000,0xe00002, -0x300a3b11,0x4020000,0xe00002,0x300a3c00,0x4008000,0xe00000,0x300a3c00,0x4010000,0xe00000,0x300a3d11,0x7c00300,0xe30002,0x300a4305,0x7c00100,0xe30400,0x300a4611, -0x7c40300,0xe30000,0x300a4829,0x7c00100,0xe30400,0x300a4829,0x7c00900,0x1230400,0x300a4929,0x4000000,0xe00000,0x3040259a,0x4000010,0x400000,0x3040259a,0x4000010, -0xb70000,0x3040259a,0xc000010,0xb48000,0x304028ba,0x4000001,0xc41c0b,0x304a3dca,0x4000000,0xe00000,0x30800c27,0x2802100,0x962460,0x30c01c92,0x6800000,0x1329800, -0x3100080e,0x7c00120,0x220402,0x3100080e,0x7c00120,0x250402,0x31005167,0x1000,0,0x3100581e,0x4000000,0x200000,0x3100581e,0x7c00100,0x230400,0x3100590d, -0x7c00100,0x230400,0x31005a09,0x7c00100,0x220400,0x31005a09,0x7c00100,0x250400,0x31005b00,0x4000000,0x200000,0x31005c00,0x80000,0x918820,0x31005c00,0x2802000, -0x962460,0x31005c00,0x2802400,0x962460,0x31005c00,0x4000000,0x200000,0x31005c00,0x4000000,0x200001,0x31005c00,0x6800000,0x962540,0x31005c00,0x6800400,0x962540, -0x31005c01,0x2802400,0x962460,0x31005d00,0x4000020,0x200005,0x31005d00,0x6800020,0x1329805,0x31005d00,0x7c00120,0x220405,0x31005d00,0x7c00120,0x250405,0x31006000, -0x82000,0x962460,0x31006000,0x180000,0x918820,0x310a5e11,0x7c40300,0xe30000,0x310a5f11,0x7c00300,0xe30001,0x32000419,0x7c00100,0x250400,0x3200080e,0x4000020, -0x200000,0x3200080e,0x7c00100,0x220400,0x3200080e,0x7c00100,0x250400,0x32000908,0x7c00100,0x220400,0x32000908,0x7c00100,0x250400,0x32000c02,0x7c00100,0x230400, -0x32000e25,0x7c00100,0x230400,0x32001d0c,0x7c00100,0x230400,0x32002800,0x80000,0x1e18820,0x32002800,0x80020,0x218820,0x32002800,0x4000001,0x445802,0x32002800, -0x24000000,0x200000,0x32002800,0x24000000,0x1500002,0x32002800,0x24000020,0x200000,0x32002800,0x2c000010,0x1248002,0x32002919,0x7c00100,0x22040f,0x32002a00,0x4000000, -0x1600000,0x32002b01,0x2000,0x962460,0x32002b01,0x2802000,0x962460,0x32002b01,0x2802020,0x962460,0x32002c00,0x4000000,0x200000,0x32002c00,0x4000020,0x200000, -0x32002c00,0x4000020,0x200005,0x32002c00,0x7c00120,0x220405,0x32002c00,0x7c00120,0x250405,0x32002e00,0x24000020,0x200000,0x32002f00,0x24000020,0x200000,0x32003000, -0x24000000,0x200000,0x32003000,0x24000020,0x200000,0x32003500,0x24000000,0x200000,0x32003600,0x24000020,0x200000,0x32003700,0x24000000,0x100000,0x32003700,0x24000000, -0x200000,0x32003800,0x24000000,0x810000,0x32003800,0x24000000,0x1410000,0x32005102,0x4000000,0x1500008,0x32005502,0x7c00100,0x230400,0x32006108,0x7c00100,0x220400, -0x32006108,0x7c00100,0x250400,0x3200622a,0x2802100,0x962460,0x3200622a,0x2806400,0x962460,0x3200622a,0x7c00100,0x230400,0x3200632b,0x2802100,0x962460,0x3200632b, -0x6804000,0x962540,0x3200632b,0x7c00100,0x230400,0x3200642c,0x2802100,0x962460,0x3200642c,0x7c00100,0x230400,0x3200652d,0x2802100,0x962460,0x3200652d,0x7c00100, -0x230400,0x32006600,0x24000020,0x200000,0x32006700,0x24000020,0x200000,0x32006800,0x24000020,0x200000,0x32006900,0x24000020,0x200000,0x32006900,0x24000020,0x810000, -0x32006900,0x24000020,0x1410000,0x32006a00,0x24000020,0x200000,0x32006a00,0x24000020,0x200001,0x32006a00,0x24000020,0x200002,0x32020701,0x2882000,0xc62460,0x32023300, -0x4000000,0x100000,0x32026c01,0x12882000,0x962460,0x32065700,0x4000000,0x810011,0x32065700,0x4000000,0x1410011,0x32086600,0x24000020,0x810000,0x32086600,0x24000020, -0x1410000,0x32086900,0x24000020,0x810000,0x32086900,0x24000020,0x1410000,0x320a3600,0x24000020,0x200000,0x320a3d11,0x7c00100,0x1230400,0x320a3e14,0x7c00100,0xe30010, -0x320a3e14,0x7c00100,0x2530000,0x320a3f16,0x7c00100,0xe30c10,0x320a4400,0x4000000,0xe00003,0x320a4929,0x4000000,0xe00000,0x320a4f11,0x7c00300,0xe30001,0x320a6b16, -0x7c00100,0x2530c00,0x32406396,0xc000010,0x448000,0x324a3dcd,0x4000000,0xe00000,0x324a3dcd,0x7c00100,0x1230400,0x324a3fc8,0x4000002,0x1200c00,0x324a53c5,0x24000000, -0xe00000,0x32820701,0x2802000,0x962460,0x40000419,0x7c00100,0x220400,0x40000519,0x7c00100,0x220400,0x40000600,0x4000400,0x200400,0x4000080e,0x7c00100,0x220400, -0x4000080e,0x7c00100,0x250400,0x4000080e,0x7c00100,0x250402,0x40000c02,0x2802100,0x962460,0x40000c02,0x2802400,0x962460,0x40000c02,0x2802500,0x962460,0x40000c02, -0x4000000,0x200000,0x40000c02,0x4000000,0x1071400,0x40000c02,0x7c00100,0x230400,0x40000c02,0x80000000,0x218960,0x40000d22,0x7c00100,0x230400,0x40000f0a,0x7c00100, -0x230400,0x40001004,0x7c00100,0x230400,0x40001110,0x2802100,0x962460,0x40001110,0x6800100,0x962540,0x4000120f,0x2802100,0x962460,0x4000120f,0x4000000,0x1600000, -0x4000120f,0x7c00100,0x230400,0x4000131f,0x7c00100,0x230400,0x40001423,0x4000000,0x200000,0x40001423,0x4000000,0x1600000,0x40001615,0x2802400,0x962460,0x40001615, -0x7c00100,0x230400,0x40002417,0x2802400,0x1862460,0x40002417,0x4000000,0x200000,0x40002800,0x6800000,0x201c00,0x40002800,0x24000002,0x200000,0x40002c00,0x4000000, -0x200002,0x40003000,0x24000000,0x200000,0x40003000,0x24000020,0x200000,0x40003700,0x24000000,0x200000,0x40005a09,0x7c00100,0x220400,0x40005a09,0x7c00100,0x250400, -0x40005d00,0x7c00120,0x220405,0x40006f30,0x2802100,0x962460,0x40006f30,0x2802400,0x962460,0x40006f30,0x4000000,0x200000,0x40006f30,0x6800000,0x1329800,0x40006f30, -0x6800100,0x962540,0x40006f30,0x7c00100,0x230400,0x40006f30,0xc000010,0xb48000,0x40007034,0x7c00100,0x1830000,0x40007117,0x4000000,0x200000,0x40007208,0x7c00100, -0x220400,0x4000720e,0x7c00100,0x220400,0x4000720e,0x7c00500,0x22040e,0x4000720e,0x7c00500,0x22040f,0x40007219,0x7c00100,0x220400,0x40007219,0x7c00500,0x220400, -0x40007219,0x7c00500,0x22040e,0x40007219,0x7c00500,0x22040f,0x40007300,0x24000000,0x200000,0x40007400,0x4000000,0x200000,0x40007531,0x7c00100,0x230400,0x40007631, -0x7c00100,0x230400,0x40007835,0x4000010,0x400000,0x40007835,0x7c00100,0x230400,0x40007933,0x7c00100,0x230400,0x40007a32,0x6800000,0x1329800,0x40007a32,0x7c00100, -0x230400,0x40007b2f,0x7c00100,0x230400,0x40007c00,0x4000000,0x200000,0x40020701,0x2802400,0x962460,0x40020701,0x2802400,0xc62460,0x40023300,0x4000000,0x200000, -0x40027d01,0x12882000,0x962460,0x400a3700,0x24000000,0x200000,0x400a3700,0x24000000,0xe00000,0x400a4400,0x4000000,0xe0000d,0x400a4412,0x4000000,0xe00002,0x400a4412, -0x4000000,0xe00003,0x400a4500,0x4000000,0xe0000d,0x400a5300,0x4000000,0x810010,0x400a5300,0x4000000,0x1410010,0x40507709,0x4000000,0x200000,0x4050770c,0x4000000, -0x400000,0x4050770f,0x4000000,0x200000,0x4050770f,0x4000000,0x400000,0x40c01489,0x4000000,0x200000,0x40d05107,0x4000000,0x200000,0x41000419,0x7c00100,0x220400, -0x41000419,0x7c00100,0x250400,0x4100080e,0x7c00100,0x220400,0x4100080e,0x7c00100,0x250400,0x41000908,0x7c00100,0x220400,0x41000908,0x7c00100,0x250400,0x41000b13, -0x2802000,0x962460,0x41000b13,0x2802100,0x962460,0x41000b13,0x4000000,0xb00000,0x41000c02,0x2802100,0x962460,0x41000c02,0x4000000,0x1500000,0x41000c02,0xc000010, -0xb48000,0x41000f0a,0x7c00100,0x230400,0x41001004,0x7c00100,0x230400,0x41001423,0x7c00100,0x230400,0x41001b27,0x4000000,0x500000,0x41001d0c,0x7c00100,0x22040f, -0x41001d0c,0x7c00100,0x230400,0x41001f0b,0x2802400,0x962460,0x41001f0b,0x4000000,0x200000,0x41001f0b,0x7c00100,0x230400,0x41002800,0x24000000,0x200000,0x41002800, -0x24000000,0x400000,0x41002919,0x7c00100,0x22040e,0x41002a00,0x4000000,0x1600000,0x41002b01,0x2802020,0x962460,0x41002c00,0x4000000,0x200000,0x41002c00,0x7c00120, -0x220405,0x41003000,0x24000000,0x200000,0x41003700,0x24000000,0x200000,0x41003700,0x24000000,0xe00000,0x41005d00,0x7c00120,0x220405,0x41006600,0x24000020,0x200000, -0x41006600,0x24000020,0x810000,0x41006600,0x24000020,0x1410000,0x41007208,0x7c00100,0x22040f,0x41007219,0x7c00100,0x220400,0x41007300,0x24000000,0x200000,0x41007e0e, -0x2802000,0x962460,0x41007e0e,0x4000000,0x200000,0x41007f0e,0x4000000,0x200000,0x41007f0e,0x7c00100,0x230400,0x41008002,0x7c00100,0x230400,0x41008137,0x2802100, -0x962460,0x41008137,0x4000000,0x200000,0x41008137,0x6800100,0x962540,0x41008137,0x7c00100,0x230400,0x41008301,0x2802000,0x962460,0x41008407,0x4000000,0x200000, -0x41008407,0x4000000,0x400000,0x41008407,0x4000000,0xb00000,0x41008407,0x7c00100,0x220400,0x41008407,0x7c00100,0x250400,0x4100850b,0x7c00100,0x230400,0x4100860b, -0x4000000,0x200000,0x4100860b,0x7c00100,0x230400,0x4100870c,0x7c00100,0x220400,0x41008838,0x7c00100,0x220400,0x41008838,0x7c00100,0x250400,0x41008939,0x2802000, -0x962460,0x41008939,0x2802100,0x962460,0x41008939,0x2806000,0x962460,0x41008939,0x4000000,0x200000,0x41008939,0x4000000,0x400000,0x41008939,0x7c00100,0x230400, -0x41008939,0xc000010,0x448000,0x41008a00,0x4000400,0x200400,0x41008b3b,0x4000000,0x1800000,0x41008b3b,0x6800000,0x1329800,0x41008b3b,0x7c00100,0x1830000,0x41008b3b, -0x7e00100,0x1830000,0x41008c3d,0x4000010,0x400000,0x41008c3d,0x7c00100,0x230400,0x41008d0e,0x7c00100,0x22040f,0x41008d19,0x7c00100,0x220400,0x41008d19,0x7c00100, -0x22040f,0x41008e00,0x24000000,0x200000,0x41008e00,0x24000000,0x400000,0x41008e00,0x24000000,0x1710000,0x41008e00,0x24000006,0x400000,0x41008f3a,0x2802100,0x962460, -0x41008f3a,0x2806000,0x962460,0x41008f3a,0x4000000,0x200000,0x41008f3a,0x6800100,0x962540,0x41008f3a,0x7c00100,0x230400,0x4100903c,0x7c00100,0x230400,0x4100903c, -0x7c00100,0x23040f,0x41020701,0x2802000,0x962460,0x41020701,0x2802000,0xc62460,0x410a3700,0x24000000,0x200000,0x410a3700,0x24000000,0xe00000,0x410a4412,0x4000000, -0xe00003,0x410a4711,0x7c40300,0xe30000,0x410a4f11,0x7c00300,0xe30001,0x410a9100,0x4000000,0x800010,0x410a9100,0x4000000,0x810010,0x410a9100,0x4000000,0x870010, -0x410a9100,0x4000000,0xb00010,0x410a9100,0x4000000,0xf00010,0x410a9100,0x4000000,0x1001410,0x410a9100,0x4000000,0x1071010,0x410a9100,0x4000000,0x1071410,0x410a9100, -0x4000000,0x1410010,0x41408ad0,0x4000400,0x200000,0x414a82ca,0x4000000,0xe00000,0x41808300,0x2802000,0x962460,0x41c01489,0x6800000,0x1329800,0x50000419,0x7c00100, -0x220400,0x50000419,0x7c00100,0x250400,0x5000080e,0x7c00100,0x220400,0x50000908,0x7c00100,0x220400,0x50000908,0x7c00100,0x250400,0x50000b13,0x2802500,0x962460, -0x50000f0a,0x7c00100,0x230400,0x50001615,0x2802100,0x962460,0x50001615,0x7c00100,0x230400,0x50002b01,0x2802020,0x962460,0x50002c00,0x4000000,0x200000,0x50002c19, -0x7c00100,0x220400,0x50002d19,0x7c00100,0x220400,0x50003000,0x24000000,0x200000,0x50003000,0x24000020,0x200000,0x50003700,0x24000000,0x200000,0x50005d00,0x7c00120, -0x220405,0x50005d00,0x7c00120,0x250405,0x50006108,0x7c00100,0x220400,0x50006108,0x7c00100,0x250400,0x50006600,0x24000020,0x200000,0x50007300,0x24000000,0x200000, -0x50008301,0x2802400,0x962460,0x50008a00,0x7c00500,0x230400,0x50009257,0x2802400,0x962460,0x50009257,0x4000000,0x200000,0x50009257,0x4000010,0x1071400,0x50009257, -0x6800000,0x1329800,0x50009257,0x7c00100,0x230400,0x50009257,0x7c00500,0x230400,0x50009257,0x7c00900,0x230400,0x50009257,0xc000010,0xb48000,0x5000933e,0x2802100, -0x962460,0x5000933e,0x2802400,0x962460,0x5000933e,0x4000000,0x200000,0x5000933e,0x4000000,0x400000,0x5000933e,0x4000010,0x400000,0x5000933e,0x6800000,0x1329800, -0x5000933e,0x6800100,0x962540,0x5000933e,0x6800100,0x962541,0x5000933e,0x6804400,0x962540,0x5000933e,0x7c00100,0x230400,0x5000933e,0x7c00100,0x230401,0x5000933e, -0xc000010,0x448000,0x50009419,0x7c00100,0x220400,0x50009419,0x7c00100,0x250400,0x50009500,0x4000400,0x200400,0x5000965a,0x4000000,0x500000,0x5000965a,0x7c00100, -0x230400,0x5000965a,0xc000010,0xb48000,0x5000975b,0x4000000,0x200000,0x5000975b,0x4000010,0x400000,0x5000975b,0x7c00100,0x230400,0x50009865,0x7c00100,0x230400, -0x50009965,0x4000010,0x400000,0x50009965,0x7c00100,0x230400,0x50409aca,0x4000000,0x200000,0x5100080e,0x7c00100,0x220400,0x5100080e,0x7c00100,0x250400,0x51000c02, -0x2802100,0x962460,0x51000c02,0x4000000,0x1500000,0x51000c02,0x4000020,0x200000,0x51000c02,0x7c00100,0x230400,0x51000f0a,0x7c00100,0x230400,0x51000f0a,0x7c00500, -0x230400,0x51001110,0x2802100,0x962460,0x5100131f,0x2802100,0x962460,0x51001423,0x7c00100,0x230400,0x51001524,0x2802100,0x962460,0x51001524,0x4000000,0x200000, -0x51001524,0x7c00100,0x230400,0x5100171a,0x2802100,0x962460,0x5100171a,0x4000000,0x200000,0x5100171a,0x4000000,0x1500000,0x5100171a,0x7c00100,0x230400,0x51001b27, -0x4000000,0x200000,0x51001b27,0x4000000,0x400000,0x51001b27,0x4000000,0x500000,0x51001b27,0x7c00100,0x230400,0x51001c1c,0x2802100,0x1862460,0x51001c1c,0x2802500, -0x1862460,0x51001c1c,0x2806400,0x1862460,0x51001c1c,0x4000000,0x1800000,0x51001c1c,0x6800000,0x1329800,0x51001c1c,0x6800100,0x1862400,0x51001c1c,0x6800100,0x1862540, -0x51001c1c,0x6800500,0x1862400,0x51001c1c,0x7c00100,0x1830000,0x5100251b,0x7c00100,0x230400,0x51002619,0x7c00100,0x220400,0x51002619,0x7c00100,0x250400,0x51002800, -0x80020,0x218820,0x51002c00,0x4000000,0x200000,0x51002d19,0x7c00100,0x230400,0x51003700,0x24000000,0x200000,0x51003700,0x24000000,0xe00000,0x51005201,0x2802400, -0x962460,0x51005c00,0x4000000,0x200000,0x51006108,0x7c00100,0x220400,0x51006108,0x7c00100,0x250400,0x51006600,0x24000020,0x200000,0x51006600,0x24000020,0x810000, -0x51006600,0x24000020,0x1410000,0x51007300,0x24000000,0x200000,0x51007300,0x24000020,0x200000,0x51008002,0x7c00100,0x230400,0x51008301,0x2802000,0x962460,0x51008301, -0x2802400,0x962460,0x51008301,0x2802400,0xc62460,0x51008a00,0x7c00500,0x230400,0x51008e00,0x24000000,0x200000,0x51008e00,0x24000000,0x400000,0x51008e00,0x24000000, -0x810000,0x51008e00,0x24000000,0x1400000,0x51008e00,0x24000000,0x1410000,0x51008e00,0x24000000,0x1710000,0x51008e00,0x24000002,0x200000,0x51008e00,0x24000500,0x230400, -0x51008e00,0x2c000010,0xb48000,0x51009419,0x7c00100,0x220400,0x51009419,0x7c00100,0x22040e,0x51009419,0x7c00100,0x22040f,0x51009419,0x7c00100,0x250400,0x51009500, -0x4000400,0x200400,0x51009500,0x7c00500,0x230400,0x51009519,0x7c00100,0x220400,0x51009519,0x7c00100,0x22040f,0x51009519,0x7c00100,0x230400,0x51009519,0x7c00100, -0x250400,0x51009b71,0x2802100,0x962460,0x51009b71,0x6800000,0x1329800,0x51009b71,0x6800100,0x962540,0x51009b71,0x6804400,0x962540,0x51009b71,0x7c00100,0x230400, -0x51009c52,0x2802100,0x962460,0x51009c52,0x2802400,0x962460,0x51009c52,0x2802d00,0x962460,0x51009c52,0x4000010,0x400000,0x51009c52,0x6800000,0x1329800,0x51009c52, -0x6800100,0x962540,0x51009c52,0x7c00100,0x230400,0x51009c52,0xc000010,0x448000,0x51009d6d,0x6800000,0x1329800,0x51009d6d,0x7c00100,0x230400,0x51009d6d,0x7c00500, -0x230400,0x51009d6d,0x7c00d00,0x230400,0x51009d6d,0xc000010,0x448000,0x51009e08,0x2802100,0x962460,0x51009f63,0x4000010,0x400000,0x51009f63,0x6800000,0x1329800, -0x51009f63,0x7c00100,0x230400,0x51009f63,0x7c00900,0x230400,0x51009f63,0xc000010,0x448000,0x51009f63,0xc000010,0xb48000,0x5100a008,0x2000,0x962460,0x5100a008, -0x2802400,0x962460,0x5100a008,0x4000000,0x200000,0x5100a008,0x7c00100,0x220400,0x5100a008,0x7c00100,0x230400,0x5100a008,0x7c00100,0x250400,0x5100a008,0x7c00500, -0x230400,0x5100a16f,0x2806400,0x962460,0x5100a16f,0x6800000,0x1329800,0x5100a16f,0x6800100,0x962540,0x5100a16f,0x7c00100,0x230400,0x5100a16f,0xc000010,0x448000, -0x5100a24f,0x2802100,0x962460,0x5100a24f,0x2802400,0x962460,0x5100a24f,0x6800000,0x1329800,0x5100a24f,0x7c00100,0x230400,0x5100a24f,0xc000010,0x448000,0x5100a36e, -0x2802100,0x962460,0x5100a36e,0x4000000,0x200000,0x5100a36e,0x6800100,0x962540,0x5100a36e,0x6804400,0x962540,0x5100a36e,0x7c00100,0x230400,0x5100a442,0x2802100, -0x962460,0x5100a442,0x4000000,0x200000,0x5100a442,0x6800000,0x1329800,0x5100a442,0x6800100,0x962540,0x5100a442,0x7c00100,0x230400,0x5100a442,0xc000010,0x448000, -0x5100a500,0x4000000,0x200000,0x5100a600,0x4000000,0x200000,0x5100a601,0x2802000,0x962460,0x5100a76b,0x7c00100,0x230400,0x5100a868,0x7c00100,0x230400,0x5100a96c, -0x4000000,0x200000,0x5100a96c,0x7c00100,0x230400,0x5100aa00,0x4000000,0xe00000,0x5100ab00,0x4000000,0xe00000,0x51086600,0x24000020,0x810000,0x51086600,0x24000020, -0x1410000,0x510a4005,0x7c00100,0xe30400,0x510a4711,0x7c40300,0xe30000,0x510a7300,0x24000000,0x200000,0x510aaa00,0x4000000,0xe00000,0x5140a2fe,0x4000400,0x400000, -0x514a82ca,0x4000000,0xe00000,0x51802bbc,0x2802000,0x962460,0x51c00908,0x2802400,0x962460,0x51c0a008,0x2802400,0x962460,0x52000f0a,0x2802100,0x962460,0x52000f0a, -0x6800100,0x962540,0x52000f0a,0x7c00100,0x230400,0x52001004,0x4000000,0x1600000,0x52001b00,0x4000000,0x200000,0x52001c1c,0x2802100,0x1862460,0x52001c1c,0x6800100, -0x1862400,0x52001c1c,0x6800500,0x1862400,0x52001e12,0x7c00100,0x2230500,0x52001e12,0x7c00100,0x2330520,0x52002128,0x4000002,0x400000,0x52002128,0x7c00100,0x230400, -0x52002a00,0x4000000,0x1500000,0x52002a00,0x4000000,0x1600000,0x52002d00,0x4000000,0x200006,0x52003000,0x24000000,0x200000,0x52006108,0x7c00100,0x220400,0x52006108, -0x7c00100,0x250400,0x52008301,0x2802400,0x962460,0x52008407,0x2802400,0x962460,0x52008407,0x7c00100,0x220400,0x52008407,0x7c00100,0x250400,0x52008b3b,0x6800000, -0x1800000,0x52008b3b,0x7c00100,0x1830000,0x52008e00,0x24000000,0x400000,0x52009419,0x7c00100,0x250400,0x5200975b,0x4000000,0x200000,0x5200ac7e,0x2802000,0x962460, -0x5200ac7e,0x2802100,0x962460,0x5200ac7e,0x2802400,0x962460,0x5200ac7e,0x4000010,0x200000,0x5200ac7e,0x7c00100,0x230400,0x5200ac7e,0xc000010,0x248000,0x5200ad28, -0x7c00100,0x230400,0x5200ae6a,0x2802100,0x1862460,0x5200ae6a,0x2802400,0x962460,0x5200ae6a,0x2802400,0x1862460,0x5200ae6a,0x2806000,0x1862460,0x5200ae6a,0x4000000, -0x1800000,0x5200ae6a,0x6800000,0x1329800,0x5200ae6a,0x6800100,0x1862400,0x5200ae6a,0x6800100,0x1862540,0x5200ae6a,0x7c00100,0x1830000,0x5200ae6a,0x7c00900,0x1830000, -0x5200ae6a,0xc000010,0x1848000,0x5200b083,0x4000010,0x400000,0x5200b083,0x7c00100,0x230400,0x5200b083,0xc000010,0x448000,0x5200b182,0x2802400,0x962460,0x5200b182, -0x4000000,0x200000,0x5200b182,0x4000010,0x400000,0x5200b182,0x7c00100,0x230400,0x5200b182,0xc000010,0x448000,0x5200b30a,0x2802400,0x962460,0x5200b30a,0x4000000, -0x200000,0x5200b30a,0x7c00100,0x230400,0x5200b54e,0x2802100,0x962460,0x5200b54e,0x2802400,0x962460,0x5200b54e,0x4000000,0x200000,0x5200b54e,0x4000010,0x400000, -0x5200b54e,0x6800000,0x1329800,0x5200b54e,0x6800100,0x962540,0x5200b54e,0x6804400,0x962540,0x5200b54e,0x7c00100,0x230400,0x5200b54e,0xc000010,0x448000,0x5200b61c, -0x4000000,0x1800000,0x5200b61c,0x6800500,0x1862400,0x5200b61c,0x7c00100,0x1830000,0x5200b61c,0x7c00900,0x1830000,0x5200b77f,0x2802100,0x1862460,0x5200b77f,0x2802400, -0x1862460,0x5200b77f,0x4000000,0x1800000,0x5200b77f,0x4000010,0x1800000,0x5200b77f,0x7c00100,0x1830000,0x5200b77f,0x7c00500,0x1830000,0x5200b77f,0x7c00900,0x1830000, -0x5200b77f,0x7e00100,0x1830000,0x5200b873,0x2802100,0x962460,0x5200b873,0x2806400,0x962460,0x5200b873,0x6800000,0x1329800,0x5200b873,0x6800100,0x962540,0x5200b873, -0x6800400,0x962540,0x5200b873,0x7c00100,0x230400,0x5200b873,0xc000010,0x448000,0x5200b912,0x7c00100,0x2230500,0x5200b912,0x7c00100,0x2330520,0x5200ba74,0x4000000, -0x200000,0x5200ba74,0x4000010,0x400000,0x5200ba74,0x7c00100,0x230400,0x5200bb85,0x4000000,0x200000,0x5200bb85,0x7c00100,0x230400,0x5200bc75,0x4000000,0x400000, -0x5200bc75,0x4000010,0x400000,0x5200bc75,0x7c00100,0x230400,0x5200bd7d,0x4000000,0x200000,0x5200bd7d,0x7c00100,0x230400,0x5200be7a,0x4000000,0x200000,0x5200be7a, -0x7c00100,0x230400,0x5200bf58,0x7c00100,0x230400,0x5200c002,0x4000000,0x200000,0x5200c178,0x2802100,0x962460,0x5200c178,0x2802400,0x962460,0x5200c178,0x2806400, -0x962460,0x5200c178,0x4000000,0x200000,0x5200c178,0x6800100,0x962540,0x5200c178,0x7c00100,0x230400,0x5200c178,0x7c00100,0x230401,0x5200c178,0xc000010,0x448000, -0x5200c178,0x80000000,0x218960,0x5200c247,0x7c00100,0x230400,0x5200c247,0x7c00100,0x830400,0x5200c247,0x7c00100,0x1430400,0x5200c300,0x4000000,0x200003,0x52022d00, -0x4000000,0x100006,0x52023700,0x24000000,0x100000,0x52023700,0x24000000,0xe00000,0x52023700,0x24000000,0x2800000,0x52024400,0x4000000,0x100000,0x52027300,0x24000000, -0x100000,0x5202c300,0x4000000,0x100000,0x5202c300,0x4000000,0x100002,0x5202c300,0x4000000,0x100003,0x5202c300,0x4000000,0x10000d,0x5202c300,0x4000100,0x150400, -0x5202c300,0x4000100,0x15040d,0x520a1e12,0x7c00100,0x2130480,0x520a3700,0x24000000,0xe00000,0x520a3800,0x24000000,0x100000,0x520a4711,0x7c40300,0xe30000,0x520a4f11, -0x7c00300,0xe30001,0x520a7300,0x24000000,0x100000,0x520ab412,0x7c00100,0x2130480,0x520ac400,0x4000000,0xe00002,0x520ac400,0x4000000,0xe0000d,0x520ac414,0x4000000, -0xe0000d,0x520ac511,0x7c40300,0xe30000,0x5240af9c,0x7c00100,0x230400,0x5240afa1,0x4000400,0x200000,0x5240afa3,0x6800400,0x962540,0x5240afa3,0x7c00100,0x230400, -0x5240afad,0x7c00100,0x230400,0x5240afaf,0x7c00100,0x230400,0x5240b2d2,0x4000000,0x200000,0x5240b2d2,0x4000000,0x1500000,0x5240b2dd,0x4000000,0x200000,0x5240b2eb, -0x4000000,0x200000,0x524a44ca,0x4000000,0xe00003,0x5250b501,0x7c00900,0x230400,0x5280af9c,0x2802400,0x962460,0x5280af9d,0x2802400,0x962460,0x5280afa3,0x2802400, -0x962460,0x5280afa5,0x2802400,0x962460,0x5280afa7,0x2802400,0x962460,0x52c0b3f8,0x2802400,0x962460,0x52c0b3fc,0x7c00100,0x230400,0x60000c02,0x2802100,0x962460, -0x60000c02,0x7c00100,0x230400,0x60000f0a,0x2802100,0x962460,0x60000f0a,0x6800100,0x962540,0x60000f0a,0x7c00100,0x230400,0x6000131f,0x4000000,0x200000,0x6000171a, -0x7c00100,0x230400,0x6000171a,0x7c00100,0x230560,0x60001b27,0x2802100,0x962460,0x60001b27,0x4000000,0xc00000,0x60001b27,0x7c00100,0x230400,0x60001f0b,0x2802400, -0x962460,0x60002919,0x7c00100,0x22040e,0x60002a00,0x4000000,0x1600000,0x60003000,0x24000000,0x200000,0x60003000,0x24000000,0xe00000,0x60003700,0x24000000,0x200000, -0x60003800,0x24000000,0x1710000,0x60005102,0x4000000,0x200000,0x60006108,0x7c00100,0x220400,0x60006108,0x7c00100,0x250400,0x60006600,0x24000020,0x200000,0x60008301, -0x2802400,0xc62460,0x6000903c,0x2806000,0x962460,0x6000903c,0x4000000,0x400000,0x60009519,0x7c00100,0x220400,0x60009519,0x7c00100,0x250400,0x6000a008,0x7c00100, -0x220400,0x6000a008,0x7c00100,0x250400,0x6000c300,0x4000000,0x2703580,0x6000c654,0x2802000,0x962460,0x6000c654,0x4000010,0x200000,0x6000c654,0x7c00100,0x230400, -0x6000c73f,0x2802000,0x962460,0x6000c73f,0x2802100,0x962460,0x6000c73f,0x4000000,0x200000,0x6000c73f,0x6800100,0x962540,0x6000c73f,0x6804000,0x962540,0x6000c73f, -0x7c00100,0x230400,0x6000c80b,0x7c00100,0x230400,0x6000c941,0x2802100,0x962460,0x6000c941,0x2806400,0x962460,0x6000c941,0x4000000,0x200000,0x6000c941,0x4000010, -0x200000,0x6000c941,0x6800000,0x1329800,0x6000c941,0x6800100,0x962540,0x6000c941,0x7c00100,0x230400,0x6000c941,0xc000010,0x448000,0x6000ca82,0x7c00100,0x230400, -0x6000cc00,0x4000000,0xe00000,0x6000d000,0x4000000,0x200000,0x6002c300,0x4000000,0x100000,0x6002c300,0x4000000,0x10000d,0x6002c300,0x4000100,0x150400,0x6002c300, -0x4000100,0x15040d,0x600a3000,0x24000000,0x200000,0x600a3000,0x24000000,0xe00000,0x600a3700,0x24000000,0x200000,0x600a3800,0x24000000,0x200000,0x600a3800,0x24000000, -0x2800000,0x600a4305,0x7c00100,0xe30400,0x600ac300,0x4000000,0x100000,0x600ac400,0x4000000,0xe0000d,0x600acb14,0x7c00100,0xe30000,0x600acb16,0x7c00100,0xe30c00, -0x600acc00,0x4000000,0xe00000,0x600acd00,0x4000000,0x200000,0x600acd00,0x4000000,0xe00000,0x600acd00,0x4000000,0x2800000,0x600ace00,0x4000000,0xe00000,0x600ace00, -0x4000000,0x2800000,0x600acf00,0x4000000,0xe00000,0x600acf00,0x4000000,0x2800000,0x600ad111,0x7c40300,0xe30000,0x604ac4ca,0x4000000,0xe00003,0x61000a03,0x4000000, -0x1600000,0x61000c02,0x80000000,0x218960,0x6100120f,0x4000000,0x200000,0x61001a18,0x7c00100,0x1830000,0x61001d0c,0x7c00100,0x230400,0x61001d0c,0x7c00100,0x250400, -0x61006600,0x24000020,0x200000,0x61008407,0x7c00100,0x220400,0x61008407,0x7c00100,0x250400,0x6100870c,0x7c00100,0x220400,0x61008e00,0x24000000,0x200000,0x61008e00, -0x24000000,0x400000,0x61008e00,0x24000002,0x300000,0x6100903c,0x7c00100,0x230400,0x61009519,0x7c00100,0x220400,0x61009519,0x7c00100,0x250400,0x61009519,0x7c00500, -0x22040f,0x61009b71,0x2802100,0x962460,0x61009b71,0x2806400,0x962460,0x61009b71,0x7c00100,0x230400,0x6100a008,0x2802100,0x962460,0x6100c300,0x4000000,0x20000f, -0x6100cd00,0x4000000,0x200000,0x6100d202,0x2802400,0x962460,0x6100d202,0x2802500,0x962460,0x6100d202,0x7c00100,0x230400,0x6100d302,0x4000020,0x200000,0x6100d302, -0x7c00120,0x230405,0x6100d476,0x2802100,0x962460,0x6100d476,0x2802100,0x962461,0x6100d476,0x2806400,0x962460,0x6100d476,0x4000000,0x400000,0x6100d476,0x6800000, -0x1329800,0x6100d476,0x6800100,0x962540,0x6100d476,0x7c00100,0x230400,0x6100d476,0xc000010,0x448000,0x6100d573,0x2802100,0x962460,0x6100d573,0x2806400,0x962460, -0x6100d573,0x6800100,0x962540,0x6100d573,0x7c00100,0x230400,0x6100d573,0x7c00900,0x230400,0x6100d573,0xc000010,0x448000,0x6100d68d,0x7c00100,0x230400,0x6100d756, -0x7c00100,0x230400,0x6100d85c,0x2802500,0x962460,0x6100d85c,0x6800100,0x962540,0x6100d85c,0x7c00100,0x230400,0x6100d85c,0x7c00500,0x230400,0x6100d997,0x2802100, -0x962460,0x6100d997,0x4000000,0x200000,0x6100d997,0x4000000,0x400000,0x6100d997,0x6800000,0x1329800,0x6100d997,0x6800100,0x962540,0x6100d997,0x6804400,0x962540, -0x6100d997,0x7c00100,0x230400,0x6100d997,0x7c00100,0x230560,0x6100d997,0xc000010,0x448000,0x6100da98,0x6800000,0x1329800,0x6100da98,0x7c00100,0x230400,0x6100db71, -0x4000000,0x200000,0x6100dc99,0x2802100,0x962460,0x6100dc99,0x2802400,0x962460,0x6100dc99,0x6800000,0x1329800,0x6100dc99,0x6800100,0x962540,0x6100dc99,0x6804400, -0x962540,0x6100dc99,0x7c00100,0x230400,0x610a4711,0x7c40300,0xe30000,0x610a4f11,0x7c00300,0xe30001,0x610ace00,0x4000000,0xe00000,0x6140afa1,0x7c00100,0x230400, -0x6140afa3,0x7c00100,0x230400,0x6180af9e,0x2802400,0x962460,0x62002a00,0x4000000,0x1600000,0x63002800,0x80000,0x918820,0x63c00c15,0x80000,0x918820,0x7000080e, -0x7c00100,0x250400,0x70000a03,0x4000000,0x200000,0x70000c00,0x80000000,0x218960,0x70000f0a,0x7c00100,0x230400,0x70001004,0x7c00100,0x230400,0x70001524,0x2802100, -0x962460,0x70001524,0x7c00100,0x230400,0x70001615,0x2802100,0x962460,0x7000171a,0x2802100,0x962460,0x70001821,0x6800000,0x1329800,0x70002320,0x7c00100,0x230400, -0x70002a00,0x4000000,0x1500000,0x70002a00,0x4000000,0x1600000,0x70003000,0x24000000,0x200000,0x70003800,0x24000000,0xe00000,0x70005201,0x2802400,0x962460,0x7000581e, -0x7c00100,0x230400,0x70006108,0x7c00100,0x220400,0x70006108,0x7c00100,0x250400,0x70006f30,0x7c00100,0x230400,0x70007300,0x24000000,0x200000,0x70007f0e,0x4000000, -0x200000,0x70008301,0x2802100,0x962460,0x70008301,0x2802400,0x962460,0x70008e00,0x24000000,0x200000,0x70008e00,0x24000000,0x400000,0x70008e00,0x24000002,0x400000, -0x70008e00,0x24000008,0x1410000,0x70008e00,0x24000010,0x400000,0x70008e00,0x2c000010,0x448000,0x70009519,0x7c00100,0x220400,0x70009519,0x7c00100,0x230400,0x70009519, -0x7c00100,0x250400,0x70009865,0x7c00100,0x230400,0x70009965,0x4000010,0x400000,0x70009965,0x7c00100,0x230400,0x7000a008,0x7c00100,0x220400,0x7000a008,0x7c00100, -0x250400,0x7000a008,0x7c00500,0x22040f,0x7000a50e,0x4000000,0x200000,0x7000b61c,0x2802500,0x1862460,0x7000b61c,0x6800500,0x1862400,0x7000b61c,0x7c00100,0x1830000, -0x7000c300,0x4000000,0x100000,0x7000c941,0x2806000,0x962460,0x7000cc00,0x4000000,0xe00000,0x7000cd00,0x4000000,0x200000,0x7000cd00,0x4000000,0xe00000,0x7000cd00, -0x4000000,0x2800000,0x7000cf00,0x4000000,0xe00000,0x7000d202,0x2802100,0x962460,0x7000d202,0x7c00100,0x230400,0x7000d997,0x7c00100,0x230400,0x7000d997,0xc000010, -0x248000,0x7000dd86,0x2802400,0x962460,0x7000dd86,0x7c00100,0x230400,0x7000dd86,0xc000010,0x448000,0x7000de9f,0x4000000,0x200000,0x7000de9f,0x7c00100,0x230400, -0x7000e001,0x2400,0x962460,0x7000e001,0x2802400,0x962460,0x7000e187,0x2802000,0x962460,0x7000e187,0x2802100,0x962460,0x7000e187,0x4000000,0x200000,0x7000e187, -0x7c00100,0x230400,0x7000e187,0xc000010,0x448000,0x7000e288,0x7c00100,0x230400,0x7000e300,0x4000000,0x200000,0x7000e489,0x2802100,0x962460,0x7000e489,0x2802400, -0x962460,0x7000e489,0x6800100,0x962540,0x7000e489,0x6800100,0x962541,0x7000e489,0x6804400,0x962540,0x7000e489,0x7c00100,0x230400,0x7000e489,0x7c00900,0x230400, -0x7000e59d,0x2802100,0x962460,0x7000e59d,0x2802400,0x962460,0x7000e59d,0x4000000,0x200000,0x7000e59d,0x4000010,0x200000,0x7000e59d,0x6800100,0x962540,0x7000e59d, -0x6804400,0x962540,0x7000e59d,0x7c00100,0x230400,0x7000e59d,0xc000010,0x448000,0x7000e691,0x2802100,0x962460,0x7000e691,0x2802400,0x962460,0x7000e691,0x2806400, -0x962460,0x7000e691,0x6800000,0x1329800,0x7000e691,0x6800100,0x962540,0x7000e691,0x7c00100,0x230400,0x7000e700,0x4000400,0x200400,0x7000e70e,0x7c00100,0x220400, -0x7000e719,0x7c00100,0x220400,0x7000e719,0x7c00500,0x22040f,0x7000e853,0x7c00100,0x230400,0x7000e9a0,0x2802400,0x962460,0x7000e9a0,0x4000000,0x200000,0x7000e9a0, -0x4000000,0x500000,0x7000e9a0,0x7c00100,0x230400,0x7000ea79,0x2802400,0x962460,0x7000ea79,0x4000000,0x200000,0x7000ea79,0x4000000,0xf00000,0x7000ea79,0x4000010, -0x400000,0x7000ea79,0x7c00100,0x230400,0x7000eb8c,0x2802400,0x962460,0x7000eb8c,0x4000000,0x200000,0x7000eb8c,0x7c00100,0x230400,0x7000eca3,0x2802100,0x962460, -0x7000eca3,0x2806400,0x962460,0x7000eca3,0x4000000,0x200000,0x7000eca3,0x6800000,0x1329800,0x7000eca3,0x6800100,0x962540,0x7000eca3,0x7c00100,0x230400,0x7000eca3, -0xc000010,0x448000,0x7000ed95,0x6800000,0x1329800,0x7000ed95,0x7c00100,0x230400,0x7000ed95,0xc000010,0x448000,0x7000ee1c,0x2802500,0x1862460,0x7000ee1c,0x6800000, -0x1329800,0x7000ee1c,0x7c00100,0x1830000,0x7000ee1c,0x7c00900,0x1830000,0x7000ef8f,0x4000000,0x200000,0x7000ef8f,0x7c00100,0x230400,0x7000f08e,0x4000000,0x200000, -0x7000f08e,0x7c00100,0x230400,0x7000f159,0x2802100,0x962460,0x7000f159,0x7c00100,0x230400,0x7000f200,0x4000000,0x200000,0x7000f200,0x4000000,0x1200000,0x7000f200, -0x4000000,0x1710000,0x7000f34b,0x2802400,0x962460,0x7000f34b,0x4000000,0x200000,0x7000f34b,0x4000010,0x400000,0x7000f34b,0x6800000,0x1329800,0x7000f34b,0x7c00100, -0x230400,0x7000f34b,0x7c00900,0x230400,0x7000f34b,0xc000010,0x448000,0x7000f490,0x4000000,0x200000,0x7000f490,0x7c00100,0x230400,0x7000f5a5,0x7c00100,0x230400, -0x7000f67b,0x4000000,0x200000,0x7000f67b,0x4000010,0x200000,0x7000f67b,0x7c00100,0x230400,0x7000f8a6,0x2802100,0x962460,0x7000f8a6,0x2802400,0x962460,0x7000f8a6, -0x2806400,0x962460,0x7000f8a6,0x4000000,0x500000,0x7000f8a6,0x4000010,0xb00000,0x7000f8a6,0x4000800,0x200000,0x7000f8a6,0x6800100,0x962540,0x7000f8a6,0x6800100, -0x962541,0x7000f8a6,0x7c00100,0x230400,0x7000f8a6,0xc000010,0x448000,0x7000f921,0x4000000,0x200000,0x7000fa00,0x4000000,0x200000,0x7000fb9e,0x2802100,0x962460, -0x7000fb9e,0x2802400,0x962460,0x7000fb9e,0x2806400,0x962460,0x7000fb9e,0x4000000,0x200000,0x7000fb9e,0x6800000,0x1329800,0x7000fb9e,0x6800100,0x962540,0x7000fb9e, -0x6800100,0x962541,0x7000fb9e,0x7c00100,0x230400,0x7000fc92,0x4000000,0x200000,0x7000fc92,0x6800000,0x1329800,0x7000fc92,0x7c00100,0x220400,0x7000fc92,0x7c00100, -0x230400,0x7000fc92,0x7c00100,0x250400,0x700acd00,0x4000000,0xe00000,0x700acd00,0x4000000,0x2800000,0x700ace00,0x4000000,0xe00000,0x700acf00,0x4000000,0xe00000, -0x700acf00,0x4000000,0x2800000,0x7050df11,0x4000000,0x200000,0x7050f719,0x80000,0x918820,0x7080afa1,0x2802400,0x962460,0x7090df11,0x2802400,0x962460,0x70d0e417, -0x2802100,0x962460,0x70d0e417,0x2802400,0x962460,0x70d0e417,0x6800100,0x962540,0x70d0ea15,0x4000010,0x400000,0x8000120f,0x7c00100,0x230400,0x80001524,0x7c00100, -0x230400,0x8000171a,0x7c00100,0x230400,0x80002006,0x7c00100,0x220400,0x80002006,0x7c00100,0x250400,0x80002a00,0x4000000,0x1500000,0x80002d00,0x4000000,0x200000, -0x80005208,0x2802400,0x962460,0x80005c00,0x4000000,0x200000,0x80007300,0x24000000,0x200000,0x80009519,0x7c00100,0x220400,0x80009519,0x7c00100,0x230400,0x80009519, -0x7c00100,0x250400,0x80009865,0x7c00100,0x230400,0x8000a008,0x2802100,0x962460,0x8000b30a,0x4000000,0x500000,0x8000b30a,0x7c00100,0x230400,0x8000cd00,0x4000000, -0xe00000,0x8000d202,0x2802500,0x962460,0x8000d202,0x7c00100,0x230400,0x8000d68d,0x4000000,0x200000,0x8000d997,0x2802000,0x962460,0x8000d997,0x2802400,0x962460, -0x8000d997,0x4000000,0x400000,0x8000d997,0x4000000,0x500000,0x8000d997,0x7c00100,0x230400,0x8000d997,0xc000010,0x448000,0x8000e489,0x2802100,0x962460,0x8000e489, -0x7c00100,0x230400,0x8000e719,0x7c00100,0x220400,0x8000f8a6,0x2802100,0x962460,0x8000f8a6,0x7c00100,0x230400,0x8000f8a6,0xc000010,0x448000,0x8000fda1,0x2802100, -0x1862460,0x8000fda1,0x2806400,0x1862460,0x8000fda1,0x4000000,0x1800000,0x8000fda1,0x6800000,0x1329800,0x8000fda1,0x6800100,0x1862400,0x8000fda1,0x6800100,0x1862540, -0x8000fda1,0x7c00100,0x1830000,0x8000fda1,0xc000010,0x448000,0x8000fe9c,0x7c00100,0x230400,0x8000fe9c,0x7c00100,0x830400,0x8000fe9c,0x7c00100,0x1430400,0x8000ff06, -0x7c00100,0x220400,0x80010165,0x7c00100,0x230400,0x800102a2,0x4000000,0x200000,0x800102a2,0x7c00100,0x230400,0x800103a4,0x7c00100,0x230400,0x800103a4,0xc000010, -0x448000,0x8001044c,0x4000000,0x200000,0x8001044c,0x7c00100,0x220400,0x8001044c,0x7c00100,0x250400,0x80010670,0x2802000,0x962460,0x80010670,0x4000000,0x200000, -0x80010670,0x4000010,0x400000,0x80010670,0xc000010,0x448000,0x800a4711,0x7c40300,0xe30000,0x800acd00,0x4000000,0xe00000,0x800acd00,0x4000000,0x2902460,0x800ace00, -0x4000000,0xe00000,0x800acf00,0x4000000,0xe00000,0x800b0011,0x7c40300,0xe30000,0x800b0500,0x4000000,0xe00000,0x800b0500,0x4000000,0x2800000,0x90001615,0x7c00100, -0x230400,0x9000171a,0x4000000,0x200000,0x9000171a,0x7c00100,0x230400,0x90003000,0x24000000,0x200000,0x90007f0e,0x4000000,0x200000,0x90008301,0x2802400,0x962460, -0x90008e00,0x24000000,0x400000,0x90009519,0x7c00100,0x250400,0x9000a16f,0x2802100,0x962460,0x9000d200,0x80000000,0x218960,0x9000d202,0x2802000,0x962460,0x9000d202, -0x2802100,0x962460,0x9000d202,0x7c00100,0x230400,0x9000e59d,0x2802100,0x962460,0x90010500,0x4000000,0xe00000,0x900107a7,0x2802100,0x962460,0x900107a7,0x2802400, -0x962460,0x900107a7,0x2802c00,0x962460,0x900107a7,0x4000000,0x1400000,0x900107a7,0x6800000,0x1329800,0x900107a7,0x7c00100,0x220400,0x900107a7,0x7c00100,0x250400, -0x900108a8,0x2802100,0x962460,0x900108a8,0x2806400,0x962460,0x900108a8,0x4000000,0x200000,0x900108a8,0x4000000,0x400000,0x900108a8,0x4000010,0x400000,0x900108a8, -0x6800000,0x1329800,0x900108a8,0x6800100,0x962540,0x900108a8,0x7c00100,0x230400,0x900108a8,0xc000010,0x448000,0x90010908,0x7c00100,0x220400,0x90010a38,0x2802100, -0x962460,0x90010ca9,0x2802100,0x962460,0x90010ca9,0x4000000,0x500000,0x90010ca9,0x4000010,0xb00000,0x90010ca9,0x6800100,0x962540,0x90010ca9,0x7c00100,0x230400, -0x90010d1b,0x4000000,0x500000,0x90010eaa,0x2802100,0x962460,0x90010eaa,0x2802400,0x962460,0x90010eaa,0x2806400,0x962460,0x90010eaa,0x4000000,0x200000,0x90010eaa, -0x4000000,0x400000,0x90010eaa,0x4000010,0x400000,0x90010eaa,0x6800000,0x1329800,0x90010eaa,0x6800100,0x962540,0x90010eaa,0x7c00100,0x230400,0x90010eaa,0xc000010, -0x448000,0x90010fab,0x7c00100,0x220400,0x90010fab,0x7c00100,0x250400,0x9002c300,0x4000000,0x100000,0x900ac400,0x4000000,0xe0000d,0x900acd00,0x4000000,0xe00000, -0x900acd00,0x4000000,0x2800000,0x900acf00,0x4000000,0xe00000,0x900b0500,0x4000000,0xe00000,0x900b0500,0x4000000,0x2800000,0x900b0b9a,0x7c00900,0x1230400,0x900b109a, -0x7c00300,0xe30000,0x900b119a,0x7c00300,0xe30000,0x90408e06,0x24000000,0x400000,0xa0001004,0x4000000,0x200000,0xa0001004,0x7c00100,0x230400,0xa000120f,0x2802100, -0x962460,0xa000120f,0x2802400,0x962460,0xa000171a,0x2802100,0x962460,0xa000171a,0x2806400,0x962460,0xa0002a00,0x4000000,0x1600000,0xa0003000,0x24000000,0x200000, -0xa000581e,0x7c00100,0x230400,0xa0007300,0x24000000,0x200000,0xa0008301,0x2802400,0x962460,0xa0008e00,0x24000000,0x400000,0xa000cf00,0x4000000,0xe00000,0xa0010500, -0x4000000,0x200000,0xa00114af,0x2802100,0x962460,0xa00114af,0x2802400,0x962460,0xa00114af,0x2806400,0x962460,0xa00114af,0x6800000,0x1329800,0xa00114af,0x7c00100, -0x230400,0xa00114af,0x7c00100,0x230560,0xa00116b0,0x2802100,0x962460,0xa00116b0,0x2802800,0x962460,0xa00116b0,0x2806400,0x962460,0xa00116b0,0x4000000,0x400000, -0xa00116b0,0x4000000,0x500000,0xa00116b0,0x4000010,0x400000,0xa00116b0,0x6800100,0x962540,0xa00116b0,0x7c00100,0x230400,0xa00116b0,0x7c00100,0x230560,0xa00116b0, -0xc000010,0x448000,0xa0011722,0x7c00100,0x230400,0xa00118b1,0x2802000,0x962460,0xa00118b1,0x2802100,0x962460,0xa00118b1,0x2806400,0x962460,0xa00118b1,0x4000000, -0x200000,0xa00118b1,0x4000000,0x400000,0xa00118b1,0x4000000,0x500000,0xa00118b1,0x6800100,0x962540,0xa00118b1,0x7c00100,0x230400,0xa00118b1,0x7c00100,0x230560, -0xa00118b1,0xc000010,0x448000,0xa00a4005,0x7c00100,0xe30400,0xa00a4711,0x7c40300,0xe30000,0xa00ac400,0x4000000,0xe00000,0xa00acb14,0x7c00100,0xe30000,0xa00acf00, -0x4000000,0xe00000,0xa00b0500,0x4000000,0xe00000,0xa00b0500,0x4000000,0x2800000,0xa00b0b96,0x7c00900,0x1230400,0xa00b1211,0x7c40300,0xe30000,0xa00b1314,0x7c00100, -0xe30000,0xa00b1596,0x7c00300,0xe30000,0xa040afb7,0x6800400,0x962540,0xa08083b8,0x2802400,0x962460,0xb0000a03,0x7c00100,0x220400,0xb0000b13,0x7c00100,0x2633800, -0xb0001004,0x2802000,0x962460,0xb0001110,0x4000000,0x200000,0xb0001524,0x2802100,0x962460,0xb0001615,0x4000000,0x500000,0xb000251b,0x7c00100,0x230400,0xb0007300, -0x24000000,0x200000,0xb0008939,0x4000000,0x200000,0xb0008939,0x7c00100,0x230400,0xb0008e00,0x24000000,0x200000,0xb0008e00,0x24000000,0x400000,0xb0008e00,0x24000010, -0x400000,0xb0009257,0x2802000,0x962460,0xb0009257,0x4000000,0x1600000,0xb0009519,0x7c00100,0x220400,0xb0009519,0x7c00100,0x250400,0xb0009a00,0x4000000,0x200000, -0xb000b30a,0x2802100,0x962460,0xb000b30a,0x7c00100,0x230400,0xb000c178,0x80000000,0x218960,0xb000c300,0x4000000,0x200000,0xb000d202,0x2802000,0x962460,0xb000d476, -0x6800100,0x962540,0xb000d476,0x7c00100,0x230400,0xb000e300,0x4000000,0xe00000,0xb000fda1,0x7c00100,0x1830000,0xb0010eaa,0x2802000,0x962460,0xb00116b0,0x7c00100, -0x230400,0xb0011900,0x4000000,0xe00000,0xb0011ab2,0x2802100,0x962460,0xb0011ab2,0x2802400,0x962460,0xb0011ab2,0x2806400,0x962460,0xb0011ab2,0x4000000,0x200000, -0xb0011ab2,0x6800100,0x962540,0xb0011ab2,0x7c00100,0x230400,0xb0011b0c,0x7c00100,0x230400,0xb0011cb3,0x2802100,0x962460,0xb0011cb3,0x2806400,0x962460,0xb0011cb3, -0x6800000,0x1329800,0xb0011cb3,0x6800100,0x962540,0xb0011cb3,0x7c00100,0x230400,0xb0011db6,0x2802500,0x962460,0xb0011db6,0x6800000,0x1329800,0xb0011db6,0x7c00100, -0x230400,0xb0011db6,0x7c00500,0x230400,0xb0011e00,0x4000000,0x200000,0xb0011e00,0x4000000,0x1500000,0xb0011fb4,0x2802100,0x962460,0xb0011fb4,0x6800100,0x962540, -0xb0011fb4,0x7c00100,0x230400,0xb0011fb4,0xc000010,0x248000,0xb0012000,0x4000000,0x200000,0xb00121b5,0x4000000,0x200000,0xb00121b5,0x4000010,0x400000,0xb00121b5, -0x7c00100,0x220400,0xb00121b5,0x7c00100,0x250400,0xb00121b5,0xc000010,0x448000,0xb00122b8,0x4000000,0x200000,0xb00122b8,0x7c00100,0x230400,0xb00123b7,0x2802400, -0x962460,0xb00123b7,0x4000000,0x200000,0xb00123b7,0x7c00100,0x230400,0xb00123b7,0xc000010,0x248000,0xb00a4005,0x7c00100,0xe30400,0xb00a4711,0x7c40300,0xe30000, -0xb00acf00,0x4000000,0xe00000,0xb00b0500,0x4000000,0xe00000,0xb00b0500,0x4000000,0x2800000,0xb00b109a,0x7c00300,0xe30000,0xb080e487,0x2802000,0x962460,0xc0001524, -0x4000000,0x500000,0xc0001a18,0x2806400,0x1862460,0xc0001a18,0x7c00100,0x1830000,0xc0007300,0x24000000,0x200000,0xc0008e00,0x24000010,0x400000,0xc0009519,0x7c00100, -0x220400,0xc0009519,0x7c00100,0x250400,0xc000c300,0x4000000,0x20000f,0xc000d85c,0x2802100,0x962460,0xc000d85c,0x6800100,0x962540,0xc000d85c,0x7c00100,0x230400, -0xc000dc99,0x7c00100,0x230400,0xc000e719,0x7c00100,0x220400,0xc00107a7,0x7c00100,0x230400,0xc0010eaa,0x7c00100,0x230400,0xc00116b0,0x7c00100,0x230560,0xc0011900, -0x4000000,0x200000,0xc0012447,0,0x818820,0xc0012447,0,0xc18820,0xc0012447,0,0x1418820,0xc00125b9,0x7c00100,0x230400,0xc00126bb,0x2802100, -0x962460,0xc00126bb,0x2806400,0x962460,0xc00126bb,0x4000000,0x500000,0xc00126bb,0x6800100,0x962540,0xc00126bb,0x7c00100,0x230400,0xc00127ba,0x2802400,0x962460, -0xc00127ba,0x4000000,0x200000,0xc00127ba,0x6800000,0x1329800,0xc00127ba,0x7c00100,0x230400,0xc00127ba,0x7c00900,0x230400,0xc0012800,0x4000000,0x200000,0xc0012b23, -0x4000000,0x200000,0xc0012b23,0x4000000,0x400000,0xc0012b23,0x4000000,0x1500000,0xc0012cbc,0x2802400,0x962460,0xc0012cbc,0x4000000,0x1600000,0xc0012cbc,0x6800000, -0x1329800,0xc0012cbc,0x7c00100,0x230400,0xc00acf00,0x4000000,0xe00000,0xc00ae300,0x4000000,0xe00000,0xc00b0500,0x4000000,0xe00000,0xc00b0500,0x4000000,0x2800000, -0xc00b0b11,0x4000000,0x1200000,0xc00b0b11,0x7c00900,0x1230400,0xc00b109a,0x7c00300,0xe30000,0xc00b2914,0x7c00100,0x2530000,0xc00b2916,0x7c00100,0x2530c00,0xc00b2a00, -0x4000000,0xe00000,0xc040af5e,0x7c00100,0x230400,0xc0c12b89,0x4000000,0x200000,0xc14a44ca,0x4000000,0xe0000d,0xd000131f,0x2802c00,0x962460,0xd000171a,0x7c00100, -0x230400,0xd0001821,0x2802100,0x962460,0xd0007300,0x24000000,0x200000,0xd0008e00,0x24000000,0x200000,0xd0008f3a,0x2806000,0x962460,0xd0009519,0x7c00100,0x220400, -0xd0009519,0x7c00100,0x250400,0xd000a500,0x4000000,0x200000,0xd000c300,0x4000000,0xe00000,0xd000d202,0x7c00100,0x230400,0xd000d476,0x7c00100,0x230400,0xd000d997, -0x2802100,0x962460,0xd000d997,0x6800100,0x962540,0xd000e001,0x2802100,0x962460,0xd000e700,0x4000400,0x200000,0xd000e719,0x7c00100,0x220400,0xd000e719,0x7c00500, -0x22040f,0xd000fa00,0x4000000,0xe00000,0xd0010eaa,0x4000010,0x400000,0xd0010eaa,0x7c00100,0x230400,0xd0012dbd,0x4000000,0x200000,0xd0012dbd,0x7c00100,0x230400, -0xd0012fbe,0x2802100,0x962460,0xd0012fbe,0x2802400,0x962460,0xd0012fbe,0x2806400,0x962460,0xd0012fbe,0x4000000,0x400000,0xd0012fbe,0x6800000,0x1329800,0xd0012fbe, -0x6800100,0x962540,0xd0012fbe,0x6800100,0x962541,0xd0012fbe,0x6804400,0x962540,0xd0012fbe,0x7c00100,0x230400,0xd0012fbe,0x7c00100,0x230560,0xd0012fbe,0xc000010, -0x448000,0xd0013183,0x7c00100,0x230400,0xd0013200,0x4000000,0x200000,0xd0013200,0x6800000,0x1329805,0xd00134c0,0x2802100,0x962460,0xd00134c0,0x4000002,0x400000, -0xd00134c0,0x7c00100,0x230400,0xd00a4305,0x7c00100,0xe30400,0xd00a4611,0x7c40300,0xe30000,0xd00a4711,0x7c40300,0xe30000,0xd00a5e11,0x7c40300,0xe30000,0xd00acf00, -0x4000000,0xe00000,0xd00b0500,0x4000000,0xe00000,0xd00b0500,0x4000000,0x2800000,0xd00b0b11,0x6800500,0x962540,0xd00b0bbf,0x2802200,0xc62460,0xd00b119a,0x7c00300, -0xe30000,0xd00b2a00,0x4000000,0xe00000,0xd00b2e11,0x7c40300,0xe30000,0xd00b30bf,0x7c00300,0x230000,0xd00b339a,0x7c00300,0xe30000,0xe0000c02,0xc000010,0xb48000, -0xe0001524,0x2802400,0x962460,0xe0001524,0x7c00100,0x230400,0xe0001615,0x7c00100,0x230400,0xe000251b,0x12882000,0x962460,0xe0002a00,0x4000000,0x1500000,0xe0005102, -0x4000000,0x200000,0xe0005c00,0x4000000,0x200000,0xe000622a,0x6804400,0x962540,0xe000622a,0x7c00100,0x230400,0xe0008838,0x7c00100,0x220400,0xe0008838,0x7c00100, -0x250400,0xe0008e00,0x24000000,0x810000,0xe0008e00,0x24000000,0x1410000,0xe0008e00,0x24000002,0x400000,0xe0008e00,0x2c000010,0xb48000,0xe000933e,0x7c00100,0x230400, -0xe000933e,0xc000010,0x448000,0xe0009519,0x7c00100,0x220400,0xe0009519,0x7c00100,0x22040f,0xe0009519,0x7c00100,0x250400,0xe000c178,0x2802100,0x962460,0xe000c941, -0x2802100,0x962460,0xe000c941,0x2806400,0x962460,0xe000c941,0x7c00100,0x230400,0xe000d202,0x2802400,0x962460,0xe000d202,0x7c00100,0x230400,0xe000d202,0x7c00500, -0x230400,0xe000dc99,0x4000000,0x200000,0xe000e001,0x2802100,0x962460,0xe000e001,0x2802400,0x962460,0xe000fda1,0x7c00100,0x1830000,0xe0013502,0x2802400,0x962460, -0xe0013502,0x4000000,0x200000,0xe0013502,0x7c00100,0x230400,0xe0013502,0x80000000,0x218960,0xe00136c1,0x4000000,0x200000,0xe00136c1,0x7c00100,0x230400,0xe001370b, -0x7c00100,0x230400,0xe0013919,0x7c00500,0x220400,0xe0013919,0x7c00500,0x22040f,0xe0013919,0x7c00d00,0x23040f,0xe0013a19,0x7c00100,0x220400,0xe0013a19,0x7c00100, -0x230400,0xe0013bc2,0x2802400,0x962460,0xe0013bc2,0x7c00100,0x230400,0xe0013bc2,0xc000010,0x248000,0xe0013cc3,0x6800000,0x1329800,0xe0013cc3,0x7c00100,0x230400, -0xe0013dc4,0x2802400,0x962460,0xe0013dc4,0x7c00100,0x230400,0xe0013e28,0x7c00100,0x230400,0xe0013fc5,0x7c00100,0x220400,0xe0013fc5,0x7c00100,0x250400,0xe0014000, -0x4000000,0x200000,0xe0014001,0x2802400,0x962460,0xe00a4711,0x7c40300,0xe30000,0xe00a5e11,0x7c40300,0xe30000,0xe00ac511,0x7c40300,0xe30000,0xe00acf00,0x4000000, -0xe00000,0xe00ae300,0x4000000,0xe00000,0xe00b0500,0x4000000,0xe00000,0xe00b1314,0x7c00100,0xe30000,0xe00b1316,0x7c00100,0xe30c00,0xe00b2a00,0x4000000,0xe00000, -0xe00b2a00,0x4000000,0x2800000,0xe00b3816,0x7c00500,0x230c00,0xe0808328,0x2802400,0x962460,0xf0001615,0x6800100,0x962540,0xf0001a18,0x2802000,0x1862460,0xf000c247, -0x7c00100,0x230400,0xf000d000,0x4000000,0xe00000,0xf000e300,0x4000000,0xe00000,0xf000e59d,0x2802100,0x962460,0xf000e59d,0x7c00100,0x230400,0xf0012447,0, -0x818820,0xf0012447,0,0xc18820,0xf0012447,0,0x1418820,0xf0012447,0x2802000,0x962460,0xf0012447,0x2802400,0x962460,0xf0012447,0x7c00100,0x230400, -0xf0013a19,0x7c00100,0x220400,0xf0014102,0x2802400,0x962460,0xf0014308,0x2802100,0x962460,0xf0014308,0x7c00500,0x22040e,0xf0014308,0x7c00500,0x22040f,0xf001440a, -0x4000000,0x500000,0xf0014500,0x4000000,0x200000,0xf00146c6,0x2802100,0x962460,0xf00146c6,0x2806000,0x962460,0xf00146c6,0x4000000,0xe00000,0xf00146c6,0x6800000, -0x1329800,0xf00146c6,0x6800100,0x962540,0xf00146c6,0x6804000,0x962540,0xf00146c6,0x7c00100,0x230400,0xf00146c6,0x7c00100,0x230560,0xf00146c6,0xc000010,0x448000, -0xf00147c7,0x2802000,0x962460,0xf00147c7,0x6800000,0x1329800,0xf00147c7,0x7c00100,0x230400,0xf00ac511,0x7c40300,0xe30000,0xf00acf00,0x4000000,0xe00000,0xf00b2914, -0x7c00100,0x2530000,0xf00b2916,0x7c00100,0x2530c00,0xf00b2a00,0x4000000,0xe00000,0xf00b2a00,0x4000000,0x2800000,0xf00b4211,0x7c40300,0xe30000}; +0x2d67,0,0,0x3167,0x20000000,0,0x3267,0x20000000,0,0x3a67,0,0,0x3b67,0,0,0x3e67, +0,0,0x4067,0,0,0x4167,0,0,0x4467,0,0,0x4867,0,0,0x4967,0, +0,0x4a67,0,0,0x5067,0,0,0x5167,0,0,0x5467,0,0,0x5567,0,0, +0x5667,0x80000,0x20,0x5767,0,0,0x5867,0,0,0x5967,0,0,0x5b67,0,0,0x5c67, +0,0,0x5d67,0,0,0x6067,0x80000,0x20,0x6267,0,0,0x6367,0,0,0x6467,0, +0,0x6567,0,0,0x6f67,0,0,0x7067,0,0,0x7367,0x20000000,0,0x7567,0,0, +0x7667,0,0,0x7767,0,0,0x7867,0,0,0x7a67,0,0,0x7b67,0,0,0x7c67, +0,0,0x7e67,0,0,0x7f67,0,0,0x8167,0,0,0x8267,0,0,0x8467,0, +0,0x8567,0,0,0x8667,0,0,0x8767,0,0,0x8967,0,0,0x8b67,0,0, +0x8c67,0,0,0x8e67,0x20000000,0,0x8f67,0,0,0x9067,0,0,0x9167,0,0,0x9267, +0,0,0x9367,0,0,0x9567,0,0,0x9667,0,0,0x9767,0,0,0x9867,0, +0,0x9967,0,0,0x9a67,0,0,0x9c67,0,0,0x9f67,0,0,0xa167,0,0, +0xa367,0,0,0xa467,0,0,0xa567,0,0,0xa667,0,0,0xa767,0,0,0xa867, +0,0,0xa967,0,0,0xaa67,0,0xe00000,0xab67,0,0xe00000,0xac67,0,0,0xad67,0, +0,0xae67,0,0,0xaf67,0,0,0xb167,0,0,0xb267,0,0,0xb467,0,0, +0xb567,0,0,0xb767,0,0,0xb867,0,0,0xb967,0,0,0xba67,0,0,0xbc67, +0,0,0xbd67,0,0,0xbe67,0,0,0xbf67,0,0,0xc067,0,0,0xc167,0, +0,0xc367,0,0xe00000,0xc467,0,0xe00000,0xc667,0,0,0xc767,0,0,0xc867,0,0, +0xc967,0,0,0xca67,0,0,0xcc67,0,0xe00000,0xcf67,0,0xe00000,0xd067,0,0xe00000,0xd367, +0,0,0xd467,0,0,0xd567,0,0,0xd667,0,0,0xd867,0,0,0xda67,0, +0,0xdb67,0,0,0xdc67,0,0,0xdd67,0,0,0xde67,0,0,0xdf67,0,0, +0xe067,0,0,0xe167,0,0,0xe267,0,0,0xe367,0,0xe00000,0xe467,0,0,0xe567, +0,0,0xe667,0,0,0xe767,0,0,0xe867,0,0,0xe967,0,0,0xea67,0, +0,0xeb67,0,0,0xec67,0,0,0xed67,0,0,0xee67,0,0,0xef67,0,0, +0xf167,0,0,0xf367,0,0,0xf567,0,0,0xf667,0,0,0xf767,0,0,0xf867, +0,0,0xf967,0,0,0xfa67,0,0xe00000,0xfb67,0,0,0xfc67,0,0,0xfd67,0, +0,0xfe67,0,0,0x10167,0,0,0x10267,0,0,0x10367,0,0,0x10467,0,0, +0x10667,0,0,0x10767,0,0,0x10867,0,0,0x10967,0,0,0x10a67,0,0,0x10b67, +0,0,0x10c67,0,0,0x10d67,0,0,0x10e67,0,0,0x10f67,0,0,0x11067,0, +0,0x11367,0,0,0x11467,0,0,0x11567,0,0,0x11667,0,0,0x11767,0,0, +0x11867,0,0,0x11967,0,0xe00000,0x11a67,0,0,0x11b67,0,0,0x11c67,0,0,0x11d67, +0,0,0x11e67,0,0,0x11f67,0,0,0x12067,0,0,0x12167,0,0,0x12267,0, +0,0x12367,0,0,0x12467,0,0,0x12567,0,0,0x12667,0,0,0x12767,0,0, +0x12867,0,0,0x12967,0,0,0x12a67,0,0xe00000,0x12b67,0,0,0x12c67,0,0,0x12d67, +0,0,0x12f67,0,0,0x13067,0,0,0x13167,0,0,0x13267,0,0,0x13367,0, +0,0x13467,0,0,0x13567,0,0,0x13667,0,0,0x13767,0,0,0x13867,0,0, +0x13967,0,0,0x13a67,0,0,0x13b67,0,0,0x13c67,0,0,0x13d67,0,0,0x13f67, +0,0,0x14067,0,0,0x14167,0,0,0x14367,0,0,0x14467,0,0,0x14567,0, +0,0x14667,0,0,0x14767,0,0,0xa0067,0,0xe00000,0xa4f67,0,0xe00000,0xa5f67,0,0xe00000, +0xac567,0,0xe00000,0xad167,0,0xe00000,0xb0067,0,0xe00000,0xb1267,0,0xe00000,0xb2e67,0,0xe00000,0xb4867, +0,0xe00000,0x11000100,0,0x900020,0x11000100,0x40000001,0x4440020,0x11000100,0x40000001,0x4643020,0x11000100,0x40000001,0x4a5a040,0x11000100,0x40000001, +0x516a8a0,0x11000200,0,0x900020,0x11000200,0x4000001,0xc8c4000b,0x11000200,0x7c00100,0xc8220402,0x11000200,0x24000000,0x4200000,0x11000200,0x24000008,0x5710000, +0x11000200,0x40000001,0x5d3b020,0x11000219,0x7c00100,0xfc220401,0x11000219,0x7c00100,0xfc250401,0x11000319,0x7c00100,0xc8220402,0x11000319,0x7c00100,0xfc220401,0x11000319, +0x7c00100,0xfc250400,0x11000319,0x7c00100,0xfc250401,0x11000419,0x7c00100,0x8220400,0x11000419,0x7c00100,0x10220400,0x11000419,0x7c00100,0x10230400,0x11000419,0x7c00100, +0x18220400,0x11000419,0x7c00100,0x18230400,0x11000419,0x7c00100,0x20220400,0x11000419,0x7c00100,0x20250400,0x11000419,0x7c00100,0xc8220402,0x11000419,0x7c00100,0xc8250402, +0x11000419,0x7c00100,0xfc220401,0x11000419,0x7c00100,0xfc250400,0x11000419,0x7c00100,0xfc250401,0x11000519,0x7c00100,0x10220400,0x11000519,0x7c00100,0x10230400,0x11000519, +0x7c00100,0x18220400,0x11000519,0x7c00100,0x30220400,0x11000519,0x7c00100,0xfc220400,0x11000600,0x4000400,0x4200400,0x11000600,0x4000400,0xc8200002,0x11000600,0x7c00500, +0x10220400,0x11000600,0x7c00500,0x10230400,0x11000600,0x7c00500,0x10530400,0x11000600,0x7c00500,0xfc230400,0x11000600,0x7c00d00,0x10230400,0x11000619,0x7c00500,0xc822040f, +0x11000800,0x4000010,0xc9001401,0x11000800,0x4000400,0xc8200001,0x11000800,0x6800010,0xc8201001,0x11000800,0x7c00500,0xc8230401,0x11000807,0x7c00100,0x80220400,0x11000807, +0x7c00100,0x80250400,0x1100080e,0x4000400,0xc8200002,0x1100080e,0x4000400,0xf8200000,0x1100080e,0x7000500,0xc8220402,0x1100080e,0x7c00100,0x8250400,0x1100080e,0x7c00100, +0x18220400,0x1100080e,0x7c00100,0xc8220402,0x1100080e,0x7c00100,0xc8250401,0x1100080e,0x7c00100,0xfc220400,0x1100080e,0x7c00100,0xfc220401,0x1100080e,0x7c00100,0xfc250401, +0x1100080e,0x7c00120,0xc8220402,0x1100080e,0x7c00120,0xc8250402,0x11000908,0x4000000,0xc200000,0x11000908,0x7c00100,0x8220400,0x11000908,0x7c00100,0x8220401,0x11000908, +0x7c00100,0x8250400,0x11000908,0x7c00100,0x8250401,0x11000908,0x7c00100,0xfc220400,0x11000908,0x7c00100,0xfc220401,0x11000908,0x7c00100,0xfc250400,0x11000908,0x7c00100, +0xfc250401,0x11000a03,0x4000000,0x4200400,0x11000a03,0x4000000,0x4201000,0x11000a03,0x4000000,0x4270000,0x11000a03,0x7c00100,0xc8220402,0x11000a03,0x7c00100,0xfc220400, +0x11000a03,0x7c00100,0xfc250400,0x11000a03,0x7c00500,0xfc230400,0x11000a03,0xc000010,0x5049400,0x11000b13,0x2802500,0x20962460,0x11000b13,0x2802500,0xfc962460,0x11000b13, +0x4000000,0x4200000,0x11000b13,0x4000000,0xf8201000,0x11000b13,0x4000000,0xf8230400,0x11000b13,0x4000002,0x4400000,0x11000b13,0x4000010,0x4200000,0x11000b13,0x7c00100, +0xfe633800,0x11000c00,0x80000000,0x5329960,0x11000c02,0x2802100,0x20962460,0x11000c02,0x2802400,0x20962460,0x11000c02,0x4000000,0x4200000,0x11000c02,0x4000000,0x5329400, +0x11000c02,0x4000000,0x5329800,0x11000c02,0x4000000,0x5500000,0x11000c02,0x6800000,0xfd329800,0x11000c02,0x7c00100,0x8230400,0x11000c02,0x7c00100,0xc8230402,0x11000c02, +0x7c00100,0xfc230400,0x11000c02,0x7c00100,0xfc230401,0x11000c02,0x7c00500,0xfc230400,0x11000c02,0x7d00100,0xc0230400,0x11000f01,0x2802400,0x10962460,0x11000f0a,0x2802100, +0xfc962460,0x11000f0a,0x2802400,0xfc962460,0x11000f0a,0x2806400,0xfc962460,0x11000f0a,0x4000000,0x4200000,0x11000f0a,0x6800100,0xfc962540,0x11000f0a,0x7c00100,0xc8230401, +0x11000f0a,0x7c00100,0xfc230400,0x11000f0a,0x7c00100,0xfc230401,0x11001004,0x2802100,0xfc962460,0x11001004,0x2802400,0xfc962460,0x11001004,0x2806400,0xfc962460,0x11001004, +0x4000000,0x4200000,0x11001004,0x4000000,0x5500000,0x11001004,0x6800100,0xfc962540,0x11001004,0x6800100,0xfc962541,0x11001004,0x7c00100,0xc8230401,0x11001004,0x7c00100, +0xfc230400,0x11001110,0x2802100,0xfc962460,0x11001110,0x2802400,0xfc962460,0x11001110,0x2806400,0xfc962460,0x11001110,0x6800100,0xfc962540,0x11001110,0x7c00100,0xc8230401, +0x11001110,0x7c00100,0xfc230400,0x1100120f,0x2802100,0xfc962460,0x1100120f,0x2802400,0xfc962460,0x1100120f,0x2806400,0xfc962460,0x1100120f,0x6800100,0xfc962540,0x1100120f, +0x7c00100,0xfc230400,0x1100131f,0x2802100,0xfc962460,0x1100131f,0x2802400,0xfc962460,0x1100131f,0x2806400,0xfc962460,0x1100131f,0x4000000,0x4200000,0x1100131f,0x6800000, +0xfd329800,0x1100131f,0x6800100,0xfc962540,0x1100131f,0x6800100,0xfc962541,0x1100131f,0x7c00100,0xc8230401,0x1100131f,0x7c00100,0xfc230400,0x11001423,0x2802100,0xfc962460, +0x11001423,0x2806400,0xfc962460,0x11001423,0x6800100,0xfc962540,0x11001423,0x6800100,0xfc962541,0x11001423,0x7c00100,0xfc230400,0x11001423,0x7c00100,0xfc230401,0x11001524, +0x2802100,0xfc962460,0x11001524,0x2802100,0xfc962461,0x11001524,0x2806400,0xfc962460,0x11001524,0x6800000,0xfd329800,0x11001524,0x6800100,0xfc962540,0x11001524,0x7c00100, +0xfc230400,0x11001615,0x2802100,0xfc962460,0x11001615,0x2806400,0xfc962460,0x11001615,0x6800100,0xfc962540,0x11001615,0x6800100,0xfc962541,0x11001615,0x7c00100,0x8230400, +0x11001615,0x7c00100,0xfc230400,0x1100171a,0x2802100,0xfc962460,0x1100171a,0x2806400,0xfc962460,0x1100171a,0x6800000,0xfd329800,0x1100171a,0x6800100,0xfc962540,0x1100171a, +0x6800100,0xfc962541,0x1100171a,0x7c00100,0xfc230400,0x11001900,0x4000000,0x5600000,0x11001926,0x2802100,0xfd862460,0x11001926,0x2802400,0xfd862460,0x11001926,0x2806100, +0xfd862460,0x11001926,0x4000000,0x4200000,0x11001926,0x4000010,0x4400000,0x11001926,0x6800000,0xfd329800,0x11001926,0x7800100,0xc9830142,0x11001926,0x7c00100,0xfd830000, +0x11001926,0x7c00900,0xfd830000,0x11001926,0x7e00100,0xfd830000,0x11001a18,0x2802100,0xfd862460,0x11001a18,0x2802400,0xfd862460,0x11001a18,0x6800000,0xfd329800,0x11001a18, +0x7800100,0xc9830142,0x11001a18,0x7c00100,0xc9830002,0x11001a18,0x7c00100,0xfd830000,0x11001a18,0x7c00900,0xfd830000,0x11001a18,0x7e00100,0xfd830000,0x11001d0c,0x7c00100, +0x8230400,0x11001d0c,0x7c00100,0x8250400,0x11001d0c,0x7c00100,0xfc230400,0x11001e12,0x7c00100,0xa230500,0x11001e12,0x7c00100,0xa330520,0x11001e12,0x7c80100,0xc6330520, +0x11002619,0x7c00100,0xc8220402,0x11002619,0x7c00100,0xfc220401,0x11002619,0x7c00100,0xfc250401,0x1100270e,0x4000400,0xc8200001,0x1100270e,0x4000400,0xc8200002,0x1100270e, +0x4000400,0xc8500001,0x1100270e,0x7c00100,0xc8220401,0x1100270e,0x7c00100,0xc8250401,0x1100270e,0x7c00100,0xfc220401,0x1100270e,0x7c00100,0xfc250401,0x11002800,0x80000, +0xc4918820,0x11002800,0x80000,0xc5c18020,0x11002800,0x180000,0xc0918820,0x11002800,0x4000001,0xc8445801,0x11002800,0x4000001,0xc8445802,0x11002800,0x4000001,0xc8c4000b, +0x11002800,0x6800000,0x10201c00,0x11002800,0x6800020,0x10201c00,0x11002800,0x24000000,0x4200000,0x11002800,0x24000000,0x4810000,0x11002800,0x24000000,0x5410000,0x11002800, +0x24000000,0x5500000,0x11002800,0x24000000,0xc8200002,0x11002800,0x24000000,0xc9500002,0x11002800,0x24000002,0x4400000,0x11002800,0x24000006,0xc8c0000b,0x11002800,0x24000008, +0x5410000,0x11002800,0x24000008,0x5710000,0x11002800,0x24000020,0x5001400,0x11002800,0x24000020,0xc9500002,0x11002800,0x2c000010,0x5248000,0x11002800,0x2c000010,0xc9248002, +0x11002800,0x40000001,0x463b020,0x11002800,0x40080000,0xc4918820,0x11002801,0x2880000,0xc6a65620,0x11002801,0x2882000,0xc4962460,0x11002900,0x4000000,0xc820000e,0x11002900, +0x4000000,0xc820000f,0x11002900,0x4000020,0xc820000e,0x11002900,0x4000020,0xc820000f,0x11002900,0x4000020,0xc881000e,0x11002900,0x4000020,0xc881000f,0x11002900,0x4000020, +0xc941000e,0x11002900,0x4000020,0xc941000f,0x11002900,0x4000022,0xc820000e,0x11002900,0x4000022,0xc820000f,0x11002a00,0x4000000,0x5500000,0x11002a00,0x4000000,0x5600000, +0x11002a00,0x4000000,0xc9600002,0x11002b01,0x2000,0x14962460,0x11002b01,0x2802020,0x10962460,0x11002c00,0x4000000,0x4200000,0x11002c00,0x4000000,0xc200000,0x11002c00, +0x4000000,0xc8200002,0x11002c00,0x4000000,0xc820000f,0x11002c00,0x4000020,0x4200000,0x11002c00,0x7c00000,0x10200000,0x11002c00,0x7c00020,0x10200000,0x11002c00,0x7c00120, +0xc8220405,0x11002c00,0x7c00120,0xc8230402,0x11002c00,0x7c00120,0xc8250402,0x11002c00,0x7c00120,0xc8250405,0x11002c19,0x7c00100,0x8250400,0x11002c19,0x7c00100,0xc8250401, +0x11002d00,0x4000000,0xc8100006,0x11002d00,0x4000000,0xc8200006,0x11002d19,0x7c00100,0x18230400,0x11002d19,0x7c00100,0xc8220402,0x11002d19,0x7c00100,0xc8250402,0x11002e00, +0x24000000,0x4200000,0x11002e00,0x24000020,0x4200000,0x11002e00,0x24000020,0x4200001,0x11002f00,0x24000020,0x4200000,0x11002f00,0x24000020,0x4200001,0x11002f00,0x24000020, +0x4f00000,0x11002f00,0x24000020,0x5600000,0x11002f00,0x24000020,0xc8200002,0x11002f00,0x24000022,0x5600000,0x11003000,0x24000000,0x4200000,0x11003000,0x24000020,0x4200000, +0x11003000,0x24000020,0x4810000,0x11003000,0x24000020,0x5410000,0x11003100,0x24000000,0x4200000,0x11003200,0x24000000,0x4200000,0x11003300,0x4000000,0xc8100003,0x11003400, +0x24000000,0x4100000,0x11003400,0x24000000,0x4200000,0x11003500,0x24000000,0x4200000,0x11003600,0x24000000,0x4200000,0x11003600,0x24000020,0x4200000,0x11003700,0x24000000, +0x4200000,0x11003700,0x24000000,0x4e00000,0x11003700,0x24000000,0x6800000,0x11003700,0x24000020,0x4200000,0x11003800,0x4000000,0x4100000,0x11003800,0x24000000,0x4200000, +0x11003800,0x24000000,0x4b00000,0x11003800,0x24000000,0x4e00000,0x11003800,0x24000000,0x5710000,0x11003800,0x24000000,0x6800000,0x11005003,0x7c00100,0xc8220402,0x11005013, +0x2802500,0x30962460,0x11005013,0x4000020,0xc8200005,0x11005013,0x7c00100,0xca633801,0x11005013,0x7c00100,0xca633802,0x11005013,0x7c00100,0xca633805,0x11005019,0x7c00100, +0xc8220402,0x11005102,0x7000100,0xc8230408,0x11005102,0x7c00100,0xc8230404,0x11005102,0x7c00100,0xc8230407,0x11005102,0x7c00100,0xc8230408,0x11005102,0x7c00100,0xc8230409, +0x11005201,0x2802400,0x10962460,0x11005500,0x80000,0xc5e18820,0x11005502,0x7000100,0xc8230408,0x11005502,0x7c00100,0xc8230404,0x11005502,0x7c00100,0xc8230407,0x11005502, +0x7c00100,0xc8230408,0x11005502,0x7c00100,0xc8230409,0x11005667,0x1000,0,0x11020200,0x80004,0xc4418820,0x11020200,0x4000000,0xc8100006,0x11020200,0x4000000, +0xc810000f,0x11020200,0x4000400,0xc8100002,0x11020200,0x4000400,0xc8500002,0x11020200,0x6800c00,0xf8101000,0x11020200,0x24000000,0x4100000,0x11020200,0x24000000,0x4200000, +0x11020200,0x24000000,0x5400000,0x11020200,0x24000000,0x5500000,0x11020200,0x24000000,0x5600000,0x11020200,0x24000020,0x4100000,0x11020200,0x24000020,0x5600000,0x11020219, +0x7c00100,0xc812040f,0x11020219,0x7c00100,0xfc220400,0x11020219,0x7c00100,0xfc220401,0x11020219,0x7c00100,0xfc250400,0x11020319,0x7c00100,0xc8220402,0x11020319,0x7c00100, +0xc8250402,0x11020319,0x7c00100,0xfc220400,0x11020319,0x7c00100,0xfc220401,0x11020319,0x7c00100,0xfc250400,0x11020319,0x7d00100,0xc0220402,0x11020419,0x7c00100,0xfc220401, +0x11020519,0x7c00100,0x10220400,0x11020600,0x4000400,0x4200400,0x11020600,0x4000400,0xc8100002,0x11020600,0x7c00500,0x10130400,0x11020600,0x7c00d00,0x10130400,0x11020701, +0x2802400,0x10962460,0x11020701,0x2802400,0x10c62460,0x11020701,0x2802400,0x20962460,0x11020701,0x2802400,0xc8962461,0x11020701,0x2802400,0xfc962460,0x1102080e,0x7c00100, +0xfc220400,0x1102080e,0x7c00100,0xfc250400,0x11020908,0x7c00100,0xfc220400,0x11020908,0x7c00100,0xfc220401,0x11020908,0x7c00100,0xfc250400,0x11020908,0x7c00100,0xfc250401, +0x11022800,0x24000000,0x4100000,0x11022800,0x24000000,0x4200000,0x11022800,0x24000000,0x5500000,0x11022800,0x24000000,0xc8200002,0x11022800,0x24000000,0xc8f00002,0x11022800, +0x24000000,0xc8f0ac02,0x11022800,0x24000000,0xf8401000,0x11022800,0x24000002,0x4100000,0x11022800,0x24000002,0x4370000,0x11022800,0x24000002,0x4470000,0x11022800,0x24000006, +0xf8400000,0x11022800,0x24000008,0x5710000,0x11022800,0x24000008,0x5712c00,0x11022800,0x24000008,0xf9712c00,0x11022800,0x24000020,0x4100000,0x11022800,0x24000020,0x5500000, +0x11022800,0x24000020,0xc9500002,0x11022900,0x4000000,0xc810000e,0x11022900,0x4000000,0xc810000f,0x11022919,0x7c00100,0xc812040f,0x11022c00,0x4000000,0xc8100002,0x11022c00, +0x4000000,0xc810000f,0x11022c00,0x4000000,0xc9500002,0x11022c00,0x4000000,0xc9600002,0x11022c00,0x7c00120,0xc8120405,0x11022c0e,0x7c00100,0xc8250401,0x11022c19,0x7c00100, +0xc8150401,0x11022d00,0x4000000,0xc8100006,0x11022d00,0x4000000,0xc8200006,0x11022d19,0x7c00100,0xc8120402,0x11022d19,0x7c00100,0xc8150402,0x11022e00,0x24000000,0x4200000, +0x11022e00,0x24000020,0x4100000,0x11022f00,0x24000020,0x4100000,0x11022f00,0x24000020,0x4100001,0x11022f00,0x24000020,0xc8100002,0x11023000,0x24000000,0x4100000,0x11023300, +0x4000000,0xc8100002,0x11023300,0x4000000,0xc8100003,0x11023300,0x4000100,0xc8120403,0x11023300,0x4000100,0xc8150403,0x11023400,0x24000000,0x4100000,0x11023500,0x24000000, +0x4100000,0x11023600,0x24000000,0x4100000,0x11023600,0x24000020,0x4100000,0x11023700,0x24000000,0x4100000,0x11023700,0x24000000,0x4e00000,0x11023700,0x24000020,0x4100000, +0x11023800,0x4000000,0x4100000,0x11023800,0x24000000,0x4200000,0x11024e67,0,0,0x11025600,0x4000000,0x4100000,0x11042a00,0x4000000,0x5600000,0x11045700, +0x4000000,0xc820000a,0x11045700,0x4000020,0xc820000a,0x11045712,0x7c00100,0xc8e3040a,0x11045712,0x7c80100,0xc4e3040a,0x11045716,0x7c00100,0xc8e30c0a,0x11045716,0x7c00100, +0xca530c0a,0x11063d00,0x4000001,0xc8445811,0x11065700,0x4000000,0xc8810011,0x11065700,0x4000000,0xc8e00011,0x11065700,0x4000000,0xc9410011,0x11065700,0x4000000,0xc9500011, +0x11065700,0x4000000,0xc9600011,0x11065700,0x4000006,0xc8e70011,0x11065700,0x4000008,0xc8e00011,0x11065700,0x4000008,0xc8e02c11,0x11065700,0x4000010,0xc8871411,0x11065700, +0x4000010,0xc9201411,0x11065700,0x4000010,0xc9271011,0x11065700,0x4000020,0xc8e00011,0x11065700,0x4000400,0xc8e00011,0x11065700,0x4000420,0xc8e00011,0x11065700,0x6800000, +0xc8e01c11,0x11065700,0x6800040,0xc8e29811,0x11065700,0xc000010,0xc880ac11,0x11065700,0xc000010,0xc8b48011,0x11065719,0x7c00100,0xc8e20411,0x11065719,0x7c00100,0xc8e50411, +0x11065719,0x7c00140,0xc8e20411,0x11065719,0x7c00140,0xc8e50411,0x11080100,0x6800000,0xfc201c00,0x11080100,0x68000c0,0xfd329800,0x11080100,0x24000000,0x4200000,0x11080100, +0x24000000,0x4810000,0x11080100,0x24000000,0x5410000,0x11080100,0x24000000,0x5500000,0x11080100,0x24000000,0x5600000,0x11080100,0x24000000,0x5b00000,0x11080100,0x24000000, +0x6410000,0x11080100,0x24000006,0xf8d70000,0x11080100,0x24000008,0x5714000,0x11080100,0x24000008,0xf9713c00,0x11080100,0x24000010,0x5001400,0x11080100,0x24000010,0x5071400, +0x11080100,0x24000010,0xf9071000,0x11080100,0x24000020,0x4200000,0x11080100,0x24000020,0x4400000,0x11080100,0x24000020,0x5600000,0x11080100,0x24000400,0x4200000,0x11080100, +0x24000420,0x4200000,0x11080100,0x2c000010,0x4b48000,0x11080100,0x2c000010,0xf900ac00,0x11080100,0x44000001,0x5a45800,0x11080119,0x7c00100,0xfc220400,0x11080119,0x7c00100, +0xfc250400,0x11080119,0x7c001c0,0xfc220400,0x11080119,0x7c001c0,0xfc250400,0x11080200,0x4000400,0xc8200002,0x11080200,0x24000000,0x4200000,0x11080200,0x24000000,0x5500000, +0x11080200,0x24000000,0x5600000,0x11080200,0x24000020,0x4200000,0x110a1e12,0x7c00100,0xa130480,0x110a1e12,0x7c80100,0xc6130480,0x110a3000,0x24000000,0x4e00000,0x110a3000, +0x24100000,0xc0810001,0x110a3000,0x24100000,0xc1410001,0x110a3700,0x24000000,0x4200000,0x110a3d00,0x4000000,0x4e00000,0x110a3d00,0x4000000,0xc8e00002,0x110a3d00,0x24000000, +0x4e00000,0x110a3d11,0x7c00300,0x10e30000,0x110a3d11,0x7c00300,0xfce30000,0x110a3d11,0x7c00900,0xfd230400,0x110a3d12,0x2802400,0x18962460,0x110a3e14,0x7c00100,0xfce30000, +0x110a3e14,0x7c00100,0xfce30001,0x110a3e14,0x7c00100,0xfe530000,0x110a3e14,0x7c00900,0xfd230000,0x110a3e14,0x7c00900,0xfd230001,0x110a3f16,0x7c00100,0xfce30c00,0x110a3f16, +0x7c00100,0xfce30c01,0x110a3f16,0x7c00100,0xfe530c00,0x110a3f16,0x7c00900,0xfd230c00,0x110a3f16,0x7c00900,0xfd230c01,0x110a4005,0x7c00100,0xfce30400,0x110a4112,0x7c00100, +0xc8e30402,0x110a4112,0x7c80100,0xc4e30402,0x110a4400,0x4000000,0x14e00000,0x110a4412,0x4000000,0xc8e00002,0x110a4412,0x4000000,0xc8e00003,0x110a4416,0x4000000,0xc8e00c03, +0x110a4500,0x4000000,0xc8e0000d,0x110a4516,0x4000000,0xc8e00c0d,0x110a4711,0x7c40300,0xfce30000,0x110a4f11,0x7c00300,0xc8e30001,0x110a4f11,0x7c40300,0xfce30000,0x110a5300, +0x4000000,0xc8810010,0x110a5300,0x4000000,0xc8e00002,0x110a5300,0x4000000,0xc8e00010,0x110a5300,0x4000000,0xc9410010,0x110a5300,0x4000002,0xc8e70010,0x110a5300,0x4000008, +0xc8810010,0x110a5300,0x4000008,0xc9410010,0x110a5300,0x6800000,0xc8e01c02,0x110a5300,0x6800000,0xc8e01c10,0x110a5400,0x4000000,0xc881000c,0x110a5400,0x4000000,0xc8e0000c, +0x110a5400,0x4000000,0xc941000c,0x110a5400,0x4000000,0xc950000c,0x110a5400,0x4000000,0xc960000c,0x110a5400,0x4000002,0xc8e7000c,0x110a5400,0x4000010,0xc887140c,0x110a5400, +0x4000010,0xc8e7000c,0x110a5400,0x4000010,0xc920140c,0x110a5400,0x4000010,0xc927100c,0x110a5400,0x4000020,0xc8e0000c,0x110a5400,0x4000026,0xc8e7000c,0x110a5400,0xc000010, +0xc880ac0c,0x110a5400,0xc000010,0xc8b4800c,0x11400c0c,0x4000010,0x4b00000,0x11400c0c,0x4000010,0x5071400,0x11400c17,0xc000010,0x4b48000,0x11400c1e,0x7c00900,0x8230400, +0x11400f4b,0xc000010,0x4448000,0x11400f5f,0xc000010,0x4448000,0x11401d94,0x4000000,0x4200000,0x11403dcc,0x4000000,0x4e00000,0x114457c1,0x4000008,0xc881000a,0x114457c1, +0x4000008,0xc941000a,0x114457c1,0x4000010,0xc887000a,0x114457c1,0x6800004,0xc920000a,0x114457c1,0xc000010,0xc884800a,0x114457ca,0x3802500,0xc926246a,0x114457ca,0x7c00d00, +0xca530c0a,0x114a3dc1,0x24000000,0x4810000,0x114a3dc1,0x24000000,0x5410000,0x114a3dc1,0x24000008,0x4810000,0x114a3dc1,0x24000008,0x5410000,0x114a3dc1,0x24000010,0x4870000, +0x114a3dc1,0x2c000010,0x4848000,0x114a3dc7,0x4000000,0x4e00000,0x114a3dc7,0x24000000,0x4e00000,0x114a3dc7,0x24000002,0x4e00000,0x114a3dc7,0x24000002,0x5200000,0x114a3dc7, +0x24000008,0x4810000,0x114a3dc7,0x24000008,0x5410000,0x114a3dc7,0x24000008,0xc810000,0x114a3dca,0x7c00900,0x10930c00,0x114a3dca,0x7c00900,0x10e30c00,0x114a3dcc,0x7c00300, +0xfce30000,0x114a3eca,0x7000400,0xc9200c02,0x114a3fc1,0x6800004,0xf9200000,0x114a3fca,0x7c00d00,0xfe530c00,0x114a42cc,0x4000000,0x4e00000,0x114a42cc,0x4000000,0xc8e0000f, +0x114a44cc,0x4000000,0xc8e00002,0x114a44cc,0x4000000,0xc8e00003,0x114a45cc,0x4000000,0xc8e00002,0x114a45cc,0x4000000,0xc8e0000d,0x11505113,0x24000000,0x14810000,0x11505113, +0x24000000,0x15410000,0x1180090a,0x2802400,0x18962460,0x11800c27,0x2802100,0xfc962460,0x11800c27,0x2802500,0xfc962460,0x11800f32,0x2802400,0x8962460,0x11800f3f,0x2802400, +0x8962460,0x11820700,0x2802400,0xfc962460,0x11820700,0x2802500,0xfc962460,0x118a3dcd,0x2802400,0x10962460,0x118a3eca,0x2802400,0xfc962460,0x11c00904,0x2802400,0x8962460, +0x11c00908,0x2802400,0x18962460,0x11c00c2c,0x6800000,0xfd329800,0x11c00c30,0xc000010,0x4b48000,0x11c00f78,0x6800000,0xfd329800,0x11c0107d,0x6800000,0xfd329800,0x11c01181, +0x6800000,0xfd329800,0x11c01285,0x6800000,0xfd329800,0x11c01489,0x4000000,0x4200000,0x11c01489,0x6800000,0xfd329800,0x11c0168d,0x6800000,0xfd329800,0x11d05117,0x7c00100, +0xc8230408,0x20000067,0x1000,0,0x20000b13,0x2802400,0x20962460,0x20000b13,0x2802500,0x20962460,0x20001b27,0x2802100,0xc8962461,0x20001b27,0x2802100,0xfc962460, +0x20001b27,0x2802400,0x10962460,0x20001b27,0x2802400,0x20962460,0x20001b27,0x2802400,0xfc962460,0x20001b27,0x2802500,0xfc962460,0x20001b27,0x2806400,0xfc962460,0x20001b27, +0x2902100,0xc0962462,0x20001b27,0x4000000,0x4200000,0x20001b27,0x4000000,0x4400000,0x20001b27,0x4000000,0x4500000,0x20001b27,0x4000000,0x4810000,0x20001b27,0x4000000, +0x4b00000,0x20001b27,0x4000000,0x5410000,0x20001b27,0x4000000,0xc8c0000b,0x20001b27,0x4000000,0xf8400000,0x20001b27,0x4000010,0x4b00000,0x20001b27,0x4000010,0x4c00000, +0x20001b27,0x6800000,0xfd329800,0x20001b27,0x6800100,0xfc462540,0x20001b27,0x6800400,0xfc962540,0x20001b27,0x7c00100,0xc8230401,0x20001b27,0x7c00100,0xfc230400,0x20002619, +0x7c00100,0xc8220401,0x20002a00,0x4000000,0x5600000,0x20004b67,0,0x1900000,0x20004c67,0,0x1900000,0x20004d67,0,0x1900000,0x20006d67,0x1000, +0,0x20006e67,0x1000,0,0x20026d67,0,0,0x20026e67,0,0,0x200a4a12,0x7c00100,0xfdf304c1,0x200a4a12,0x7c00100,0xfe0304e1, +0x21005600,0x4000000,0x4700000,0x21022a00,0x4000000,0x5600000,0x30000419,0x7c00100,0x8220400,0x30000419,0x7c00100,0x8250400,0x30000419,0x7c00100,0x20220400,0x30000419, +0x7c00100,0x20250400,0x30000419,0x7c00100,0xfc220401,0x30000419,0x7c00100,0xfc250401,0x30000519,0x7c00100,0x10220400,0x30000600,0x4000400,0x4200400,0x30000600,0x7c00500, +0x10230400,0x30000600,0x7c00500,0xfc230400,0x30000605,0x4000400,0x4200400,0x3000080e,0x7c00100,0x8220400,0x3000080e,0x7c00100,0x10220400,0x30000908,0x2000,0xc962460, +0x30000908,0x7c00100,0xfc220400,0x30000908,0x7c00100,0xfc220401,0x30000908,0x7c00100,0xfc250400,0x30000908,0x7c00100,0xfc250401,0x30000a03,0x4000006,0xf8400400,0x30000c02, +0x4000000,0xf8200000,0x30000c02,0x7c00100,0xfc230400,0x30000d22,0x2802100,0x40962460,0x30000d22,0x2802400,0x50962460,0x30000d22,0x2802500,0x40962460,0x30000d22,0x4000000, +0x44200000,0x30000d22,0x4000010,0x44200000,0x30000d22,0x7c00100,0x40230400,0x30000d22,0xc000010,0x44248000,0x30000d22,0x80000000,0x44218560,0x30000e25,0x2802500,0xfc962460, +0x30000e25,0x7c00100,0xfc230400,0x30001821,0x2802100,0x30962460,0x30001821,0x2802100,0xfc962460,0x30001821,0x2806400,0xfc962460,0x30001821,0x4000000,0x4200000,0x30001821, +0x6800100,0x30962540,0x30001821,0x6800100,0xfc962540,0x30001821,0x6800100,0xfc962541,0x30001821,0x7c00100,0x30230400,0x30001821,0x7c00100,0xfc230400,0x30001b27,0x2802100, +0xfc962460,0x30001b27,0x2802400,0xfc962460,0x30001b27,0x4000000,0x4200000,0x30001b27,0x4000000,0x4400000,0x30001b27,0x7c00100,0xfc230400,0x30001c1c,0x2802100,0xfd862460, +0x30001c1c,0x2802400,0xfd862460,0x30001c1c,0x2806400,0xfd862460,0x30001c1c,0x4000000,0x4200000,0x30001c1c,0x6800100,0xfd862400,0x30001c1c,0x6800100,0xfd862540,0x30001c1c, +0x7c00100,0xfd830000,0x30001c1c,0x7c00100,0xfd830001,0x30001c1c,0xc000010,0x4448000,0x30001f0b,0x4000000,0x4200000,0x30001f0b,0x4000010,0x4200000,0x30001f0b,0x4000010, +0x4400000,0x30001f0b,0x6800000,0x8200000,0x30001f0b,0x7c00100,0xfc230400,0x30001f0b,0xc000010,0x4248000,0x30002006,0x7c00100,0x40250400,0x30002128,0x4000000,0x44200000, +0x30002128,0x7c00100,0x40230400,0x30002128,0xc000010,0x44248000,0x3000221d,0x4000000,0x84810000,0x3000221d,0x4000000,0x85410000,0x3000221d,0x4000001,0x84445800,0x3000221d, +0x7c00100,0x80230400,0x30002300,0x4000010,0x4400000,0x30002320,0x7c00100,0x80230400,0x30002417,0x2802100,0xfd862460,0x30002417,0x2802400,0x9862460,0x30002417,0x2802400, +0x11862460,0x30002417,0x2802400,0x19862460,0x30002417,0x2802400,0xfd862460,0x30002417,0x2806400,0xfd862460,0x30002417,0x2882000,0xc5862460,0x30002417,0x4000000,0x4200000, +0x30002417,0x4000000,0x5600000,0x30002417,0x4000000,0xc400000,0x30002417,0x4000010,0x4400000,0x30002417,0x4000010,0x5200000,0x30002417,0x6800000,0xfd329800,0x30002417, +0x6800100,0xfd862540,0x30002417,0x7c00100,0x9830000,0x30002417,0x7c00100,0xfd830000,0x30002417,0x7d00100,0xc1830000,0x30002417,0xc000010,0x4448000,0x3000251b,0x80000, +0xc4c18820,0x3000251b,0x2802100,0xa0962460,0x3000251b,0x3c02100,0x80962460,0x3000251b,0x4000000,0x84200000,0x3000251b,0x4000006,0x84500000,0x3000251b,0x4000010,0x84400000, +0x3000251b,0x4000010,0x84b70000,0x3000251b,0x4000800,0x84200000,0x3000251b,0x6800000,0x81329800,0x3000251b,0x7c00100,0x80230400,0x3000251b,0x7c00900,0x80230400,0x3000251b, +0xc000010,0x84b48000,0x3000251b,0x12882000,0xc4962460,0x30002800,0x24000000,0x4200000,0x30002800,0x2c000010,0xc9248002,0x30002a00,0x4000000,0x5600000,0x30002b01,0x2000, +0x14962460,0x30002c00,0x4000000,0x4200000,0x30002c00,0x7c00100,0xc8220405,0x30002d19,0x7c00100,0x18250400,0x30002e00,0x24000000,0x4200000,0x30003000,0x24000000,0x4200000, +0x30003100,0x24000000,0x4200000,0x30003600,0x24000000,0x4200000,0x30003700,0x24000000,0x4200000,0x3000392e,0x24000000,0x14200000,0x30005013,0x7c00100,0xca633801,0x30005600, +0,0x4918820,0x30020600,0x4000400,0x4500400,0x30020701,0x2802400,0x10962460,0x30020701,0x2802400,0x10c62460,0x300a3a11,0x4020000,0x4e00000,0x300a3a11,0x4020000, +0xc8e00002,0x300a3b11,0x4020000,0xc8e00002,0x300a3c00,0x4008000,0x4e00000,0x300a3c00,0x4010000,0x4e00000,0x300a3d11,0x7c00300,0xc8e30002,0x300a4305,0x7c00100,0xfce30400, +0x300a4611,0x7c40300,0xfce30000,0x300a4829,0x7c00100,0x40e30400,0x300a4829,0x7c00900,0x41230400,0x300a4929,0x4000000,0x44e00000,0x3040259a,0x4000010,0x84400000,0x3040259a, +0x4000010,0x84b70000,0x3040259a,0xc000010,0x84b48000,0x304028bc,0x4000001,0xc8c41c0b,0x304a3dcc,0x4000000,0x4e00000,0x30800c27,0x2802100,0xfc962460,0x30c01c92,0x6800000, +0xfd329800,0x3100080e,0x7c00120,0xc8220402,0x3100080e,0x7c00120,0xc8250402,0x31005167,0x1000,0,0x3100581e,0x4000000,0x84200000,0x3100581e,0x7c00100,0x80230400, +0x3100590d,0x7c00100,0x80230400,0x31005a09,0x7c00100,0x80220400,0x31005a09,0x7c00100,0x80250400,0x31005b00,0x4000000,0x14200000,0x31005c00,0x80000,0xc4918820,0x31005c00, +0x2802000,0x10962460,0x31005c00,0x2802400,0x10962460,0x31005c00,0x4000000,0x14200000,0x31005c00,0x4000000,0xc8200001,0x31005c00,0x6800000,0x10962540,0x31005c00,0x6800400, +0x10962540,0x31005c01,0x2802400,0x10962460,0x31005d00,0x4000020,0xc8200005,0x31005d00,0x6800020,0xc9329805,0x31005d00,0x7c00120,0xc8220405,0x31005d00,0x7c00120,0xc8250405, +0x31006000,0x82000,0xc4962460,0x31006000,0x180000,0xc0918820,0x310a5e11,0x7c40300,0xfce30000,0x310a5f11,0x7c00300,0xc8e30001,0x32000419,0x7c00100,0x20250400,0x3200080e, +0x4000020,0x4200000,0x3200080e,0x7c00100,0x8220400,0x3200080e,0x7c00100,0x8250400,0x32000908,0x7c00100,0xfc220400,0x32000908,0x7c00100,0xfc250400,0x32000c02,0x7c00100, +0x8230400,0x32000e25,0x7c00100,0xfc230400,0x32001d0c,0x7c00100,0xfc230400,0x32002800,0x80000,0xc5e18820,0x32002800,0x80020,0xc4218820,0x32002800,0x4000001,0xc8445802, +0x32002800,0x24000000,0x4200000,0x32002800,0x24000000,0xc9500002,0x32002800,0x24000020,0x4200000,0x32002800,0x2c000010,0xc9248002,0x32002919,0x7c00100,0xc822040f,0x32002a00, +0x4000000,0x5600000,0x32002b01,0x2000,0x14962460,0x32002b01,0x2802000,0x10962460,0x32002b01,0x2802020,0x10962460,0x32002c00,0x4000000,0x4200000,0x32002c00,0x4000020, +0x4200000,0x32002c00,0x4000020,0xc8200005,0x32002c00,0x7c00120,0xc8220405,0x32002c00,0x7c00120,0xc8250405,0x32002e00,0x24000020,0x4200000,0x32002f00,0x24000020,0x4200000, +0x32003000,0x24000000,0x4200000,0x32003000,0x24000020,0x4200000,0x32003500,0x24000000,0x4200000,0x32003600,0x24000020,0x4200000,0x32003700,0x24000000,0x4100000,0x32003700, +0x24000000,0x4200000,0x32003800,0x24000000,0x4810000,0x32003800,0x24000000,0x5410000,0x32005102,0x4000000,0xc9500008,0x32005502,0x7c00100,0x10230400,0x32006108,0x7c00100, +0x8220400,0x32006108,0x7c00100,0x8250400,0x3200622a,0x2802100,0x80962460,0x3200622a,0x2806400,0x80962460,0x3200622a,0x7c00100,0x80230400,0x3200632b,0x2802100,0x80962460, +0x3200632b,0x6804000,0x80962540,0x3200632b,0x7c00100,0x80230400,0x3200642c,0x2802100,0x80962460,0x3200642c,0x7c00100,0x80230400,0x3200652d,0x2802100,0x80962460,0x3200652d, +0x7c00100,0x80230400,0x32006600,0x24000020,0x4200000,0x32006700,0x24000020,0x4200000,0x32006800,0x24000020,0x4200000,0x32006900,0x24000020,0x4200000,0x32006900,0x24000020, +0x4810000,0x32006900,0x24000020,0x5410000,0x32006a00,0x24000020,0x4200000,0x32006a00,0x24000020,0xc8200001,0x32006a00,0x24000020,0xc8200002,0x32020701,0x2882000,0xc4c62460, +0x32023300,0x4000000,0x14100000,0x32026c01,0x12882000,0xc4962460,0x32065700,0x4000000,0xc8810011,0x32065700,0x4000000,0xc9410011,0x32086600,0x24000020,0x4810000,0x32086600, +0x24000020,0x5410000,0x32086900,0x24000020,0x4810000,0x32086900,0x24000020,0x5410000,0x320a3600,0x24000020,0x4200000,0x320a3d11,0x7c00100,0x11230400,0x320a3e14,0x7c00100, +0xc8e30010,0x320a3e14,0x7c00100,0xfe530000,0x320a3f16,0x7c00100,0xc8e30c10,0x320a4400,0x4000000,0xc8e00003,0x320a4929,0x4000000,0x44e00000,0x320a4f11,0x7c00300,0xc8e30001, +0x320a6b16,0x7c00100,0xa530c00,0x32406396,0xc000010,0x84448000,0x324a3dcf,0x4000000,0x4e00000,0x324a3dcf,0x7c00100,0x11230400,0x324a3fca,0x4000002,0xf9200c00,0x324a53c7, +0x24000000,0x14e00000,0x32820701,0x2802000,0x8962460,0x40000419,0x7c00100,0x10220400,0x40000419,0x7c00100,0x20220400,0x40000519,0x7c00100,0x10220400,0x40000600,0x4000400, +0x4200400,0x4000080e,0x7c00100,0x8220400,0x4000080e,0x7c00100,0x8250400,0x4000080e,0x7c00100,0xc8250402,0x40000c02,0x2802100,0x20962460,0x40000c02,0x2802400,0x20962460, +0x40000c02,0x2802500,0x20962460,0x40000c02,0x4000000,0x4200000,0x40000c02,0x4000000,0x5071400,0x40000c02,0x7c00100,0xfc230400,0x40000c02,0x80000000,0x5329960,0x40000d22, +0x7c00100,0x40230400,0x40000f0a,0x7c00100,0xfc230400,0x40001004,0x7c00100,0xfc230400,0x40001110,0x2802100,0xfc962460,0x40001110,0x6800100,0xfc962540,0x4000120f,0x2802100, +0xfc962460,0x4000120f,0x4000000,0x5600000,0x4000120f,0x7c00100,0xfc230400,0x4000131f,0x7c00100,0xfc230400,0x40001423,0x4000000,0x4200000,0x40001423,0x4000000,0x5600000, +0x40001615,0x2802400,0xfc962460,0x40001615,0x7c00100,0xfc230400,0x40002417,0x2802400,0x19862460,0x40002417,0x4000000,0x4200000,0x40002800,0x6800000,0x20201c00,0x40002800, +0x24000002,0x4200000,0x40002c00,0x4000000,0xc8200002,0x40003000,0x24000000,0x4200000,0x40003000,0x24000020,0x4200000,0x40003700,0x24000000,0x4200000,0x40005a09,0x7c00100, +0x80220400,0x40005a09,0x7c00100,0x80250400,0x40005d00,0x7c00120,0xc8220405,0x40006f30,0x2802100,0x40962460,0x40006f30,0x2802400,0x40962460,0x40006f30,0x4000000,0x44200000, +0x40006f30,0x6800000,0x41329800,0x40006f30,0x6800100,0x40962540,0x40006f30,0x7c00100,0x40230400,0x40006f30,0xc000010,0x44b48000,0x40007034,0x7c00100,0x41830000,0x40007117, +0x4000000,0x4200000,0x40007208,0x7c00100,0x10220400,0x4000720e,0x7c00100,0x10220400,0x4000720e,0x7c00500,0xc822040e,0x4000720e,0x7c00500,0xc822040f,0x40007219,0x7c00100, +0x10220400,0x40007219,0x7c00500,0x10220400,0x40007219,0x7c00500,0xc822040e,0x40007219,0x7c00500,0xc822040f,0x40007300,0x24000000,0x4200000,0x40007400,0x4000000,0x14200000, +0x40007531,0x7c00100,0x80230400,0x40007631,0x7c00100,0x80230400,0x40007835,0x4000010,0x84400000,0x40007835,0x7c00100,0x80230400,0x40007933,0x7c00100,0x80230400,0x40007a32, +0x6800000,0x81329800,0x40007a32,0x7c00100,0x80230400,0x40007b2f,0x7c00100,0x80230400,0x40007c00,0x4000000,0x14200000,0x40020701,0x2802400,0x10962460,0x40020701,0x2802400, +0x10c62460,0x40023300,0x4000000,0x14200000,0x40027d01,0x12882000,0xc4962460,0x400a3700,0x24000000,0x4200000,0x400a3700,0x24000000,0x4e00000,0x400a4400,0x4000000,0xc8e0000d, +0x400a4412,0x4000000,0xc8e00002,0x400a4412,0x4000000,0xc8e00003,0x400a4500,0x4000000,0xc8e0000d,0x400a5300,0x4000000,0xc8810010,0x400a5300,0x4000000,0xc9410010,0x40507719, +0x4000000,0x84200000,0x4050771c,0x4000000,0x84400000,0x4050771f,0x4000000,0x84200000,0x4050771f,0x4000000,0x84400000,0x40c01489,0x4000000,0x4200000,0x40d05117,0x4000000, +0x14200000,0x41000419,0x7c00100,0x20220400,0x41000419,0x7c00100,0x20250400,0x4100080e,0x7c00100,0xfc220400,0x4100080e,0x7c00100,0xfc250400,0x41000908,0x7c00100,0xfc220400, +0x41000908,0x7c00100,0xfc250400,0x41000b13,0x2802000,0x28962460,0x41000b13,0x2802100,0x28962460,0x41000b13,0x2802100,0x30962460,0x41000b13,0x4000000,0xcb00000,0x41000c02, +0x2802100,0x20962460,0x41000c02,0x4000000,0x5500000,0x41000c02,0xc000010,0x4b48000,0x41000f0a,0x7c00100,0xfc230400,0x41001004,0x7c00100,0xfc230400,0x41001423,0x7c00100, +0xfc230400,0x41001b27,0x4000000,0x4500000,0x41001d0c,0x7c00100,0xc822040f,0x41001d0c,0x7c00100,0xfc230400,0x41001f0b,0x2802400,0xfc962460,0x41001f0b,0x4000000,0x4200000, +0x41001f0b,0x7c00100,0xfc230400,0x41002800,0x24000000,0x4200000,0x41002800,0x24000000,0xc200000,0x41002800,0x24000000,0xc400000,0x41002919,0x7c00100,0xc822040e,0x41002a00, +0x4000000,0x5600000,0x41002b01,0x2802020,0x10962460,0x41002c00,0x4000000,0x4200000,0x41002c00,0x7c00120,0xc8220405,0x41003000,0x24000000,0x4200000,0x41003700,0x24000000, +0x4200000,0x41003700,0x24000000,0x4e00000,0x41005d00,0x7c00120,0xc8220405,0x41006600,0x24000020,0x4200000,0x41006600,0x24000020,0x4810000,0x41006600,0x24000020,0x5410000, +0x41007208,0x7c00100,0xc822040f,0x41007219,0x7c00100,0x10220400,0x41007300,0x24000000,0x4200000,0x41007e0e,0x2802000,0x18962460,0x41007e0e,0x4000000,0xc200000,0x41007f0e, +0x4000000,0x4200000,0x41007f0e,0x7c00100,0x8230400,0x41008002,0x7c00100,0xfc230400,0x41008137,0x2802100,0x80962460,0x41008137,0x4000000,0x84200000,0x41008137,0x6800100, +0x80962540,0x41008137,0x7c00100,0x80230400,0x41008301,0x2802000,0x18962460,0x41008407,0x4000000,0x84200000,0x41008407,0x4000000,0x84400000,0x41008407,0x4000000,0x84b00000, +0x41008407,0x7c00100,0x80220400,0x41008407,0x7c00100,0x80250400,0x4100850b,0x7c00100,0xfc230400,0x4100860b,0x4000000,0x4200000,0x4100860b,0x7c00100,0xfc230400,0x4100870c, +0x7c00100,0x8220400,0x41008838,0x7c00100,0x80220400,0x41008838,0x7c00100,0x80250400,0x41008939,0x2802000,0x80962460,0x41008939,0x2802100,0x80962460,0x41008939,0x2806000, +0x80962460,0x41008939,0x4000000,0x84200000,0x41008939,0x4000000,0x84400000,0x41008939,0x7c00100,0x80230400,0x41008939,0xc000010,0x84448000,0x41008a00,0x4000400,0x14200400, +0x41008b3b,0x4000000,0x45800000,0x41008b3b,0x6800000,0x41329800,0x41008b3b,0x7c00100,0x41830000,0x41008b3b,0x7e00100,0x41830000,0x41008c3d,0x4000010,0x84400000,0x41008c3d, +0x7c00100,0x80230400,0x41008d0e,0x7c00100,0xc822040f,0x41008d19,0x7c00100,0x10220400,0x41008d19,0x7c00100,0xc822040f,0x41008e00,0x24000000,0x5710000,0x41008e00,0x24000000, +0xc200000,0x41008e00,0x24000000,0xc400000,0x41008e00,0x24000000,0x1d710000,0x41008e00,0x24000006,0x4400000,0x41008f3a,0x2802100,0x40962460,0x41008f3a,0x2806000,0x40962460, +0x41008f3a,0x4000000,0x44200000,0x41008f3a,0x6800100,0x40962540,0x41008f3a,0x7c00100,0x40230400,0x4100903c,0x7c00100,0x40230400,0x4100903c,0x7c00100,0xc823040f,0x41020701, +0x2802000,0x10962460,0x41020701,0x2802000,0x10c62460,0x41020701,0x2802000,0x20962460,0x410a3700,0x24000000,0x4200000,0x410a3700,0x24000000,0x4e00000,0x410a4412,0x4000000, +0xc8e00003,0x410a4711,0x7c40300,0xfce30000,0x410a4f11,0x7c00300,0xc8e30001,0x410a9100,0x4000000,0xc8800010,0x410a9100,0x4000000,0xc8810010,0x410a9100,0x4000000,0xc8870010, +0x410a9100,0x4000000,0xc8b00010,0x410a9100,0x4000000,0xc8f00010,0x410a9100,0x4000000,0xc9001410,0x410a9100,0x4000000,0xc9071010,0x410a9100,0x4000000,0xc9071410,0x410a9100, +0x4000000,0xc9410010,0x41408ad2,0x4000400,0xc200000,0x414a82cc,0x4000000,0x4e00000,0x41808300,0x2802000,0x18962460,0x41c01489,0x6800000,0xfd329800,0x50000419,0x7c00100, +0x20220400,0x50000419,0x7c00100,0x20250400,0x5000080e,0x7c00100,0xfc220400,0x50000908,0x7c00100,0xfc220400,0x50000908,0x7c00100,0xfc250400,0x50000b13,0x2802500,0x20962460, +0x50000f0a,0x7c00100,0xfc230400,0x50001615,0x2802100,0xfc962460,0x50001615,0x7c00100,0xfc230400,0x50002b01,0x2802020,0x10962460,0x50002c00,0x4000000,0x4200000,0x50002c19, +0x7c00100,0x8220400,0x50002d19,0x7c00100,0x8220400,0x50003000,0x24000000,0x4200000,0x50003000,0x24000020,0x4200000,0x50003700,0x24000000,0x4200000,0x50005d00,0x7c00120, +0xc8220405,0x50005d00,0x7c00120,0xc8250405,0x50006108,0x7c00100,0xfc220400,0x50006108,0x7c00100,0xfc250400,0x50006600,0x24000020,0x4200000,0x50007300,0x24000000,0x4200000, +0x50008301,0x2802400,0x10962460,0x50008a00,0x7c00500,0xfc230400,0x50009257,0x2802400,0x40962460,0x50009257,0x4000000,0x44200000,0x50009257,0x4000010,0x45071400,0x50009257, +0x6800000,0x41329800,0x50009257,0x7c00100,0x40230400,0x50009257,0x7c00100,0x48230400,0x50009257,0x7c00500,0x40230400,0x50009257,0x7c00900,0x48230400,0x50009257,0xc000010, +0x44b48000,0x5000933e,0x2802100,0x40962460,0x5000933e,0x2802400,0x40962460,0x5000933e,0x2802400,0x50962460,0x5000933e,0x4000000,0x44400000,0x5000933e,0x4000000,0x44e00000, +0x5000933e,0x4000010,0x44400000,0x5000933e,0x6800000,0x40e29800,0x5000933e,0x6800100,0x40962540,0x5000933e,0x6800100,0x40962541,0x5000933e,0x6804400,0x42f62540,0x5000933e, +0x7c00100,0x42b30400,0x5000933e,0x7c00100,0x42b30401,0x5000933e,0xc000010,0x44448000,0x50009419,0x7c00100,0x8220400,0x50009419,0x7c00100,0x8250400,0x50009419,0x7c00100, +0x10220400,0x50009419,0x7c00100,0x10250400,0x50009419,0x7c00100,0x20220400,0x50009419,0x7c00100,0x20250400,0x50009500,0x4000400,0x4200400,0x5000965a,0x4000000,0x84500000, +0x5000965a,0x7c00100,0x80230400,0x5000965a,0xc000010,0x84b48000,0x5000975b,0x4000000,0x84200000,0x5000975b,0x4000010,0x84400000,0x5000975b,0x7c00100,0x80230400,0x50009865, +0x7c00100,0x80230400,0x50009965,0x4000010,0x84400000,0x50009965,0x7c00100,0x80230400,0x50409acc,0x4000000,0x4200000,0x5100080e,0x7c00100,0x8220400,0x5100080e,0x7c00100, +0x8250400,0x5100080e,0x7c00100,0x10250400,0x51000c02,0x2802100,0x20962460,0x51000c02,0x4000000,0x5500000,0x51000c02,0x4000020,0x4200000,0x51000c02,0x7c00100,0xfc230400, +0x51000f0a,0x7c00100,0xfc230400,0x51000f0a,0x7c00500,0xfc230400,0x51001110,0x2802100,0x20962460,0x5100131f,0x2802100,0x20962460,0x51001423,0x7c00100,0xfc230400,0x51001524, +0x2802100,0x20962460,0x51001524,0x4000000,0x4200000,0x51001524,0x7c00100,0x8230400,0x51001524,0x7c00100,0xfc230400,0x5100171a,0x2802100,0x20962460,0x5100171a,0x4000000, +0x4200000,0x5100171a,0x4000000,0x5500000,0x5100171a,0x7c00100,0xfc230400,0x51001b27,0x4000000,0x4200000,0x51001b27,0x4000000,0x4400000,0x51001b27,0x4000000,0x4500000, +0x51001b27,0x7c00100,0xfc230400,0x51001c1c,0x2802100,0xfd862460,0x51001c1c,0x2802500,0xfd862460,0x51001c1c,0x2806400,0xfd862460,0x51001c1c,0x4000000,0x5800000,0x51001c1c, +0x6800000,0xfd329800,0x51001c1c,0x6800100,0xfd862400,0x51001c1c,0x6800100,0xfd862540,0x51001c1c,0x6800500,0xfd862400,0x51001c1c,0x7c00100,0xfd830000,0x5100251b,0x7c00100, +0x80230400,0x51002619,0x7c00100,0x10220400,0x51002619,0x7c00100,0x10250400,0x51002619,0x7c00100,0xfc250400,0x51002800,0x80020,0xc4218820,0x51002c00,0x4000000,0xc200000, +0x51002d19,0x7c00100,0x8230400,0x51003700,0x24000000,0x4200000,0x51003700,0x24000000,0x4e00000,0x51005201,0x2802400,0x10962460,0x51005c00,0x4000000,0x14200000,0x51006108, +0x7c00100,0xfc220400,0x51006108,0x7c00100,0xfc250400,0x51006600,0x24000020,0x4200000,0x51006600,0x24000020,0x4810000,0x51006600,0x24000020,0x5410000,0x51007300,0x24000000, +0x4200000,0x51007300,0x24000020,0x4200000,0x51008002,0x7c00100,0xfc230400,0x51008301,0x2802000,0x10962460,0x51008301,0x2802000,0x18962460,0x51008301,0x2802400,0x10962460, +0x51008301,0x2802400,0x10c62460,0x51008301,0x2802400,0x18962460,0x51008a00,0x7c00500,0xfc230400,0x51008e00,0x24000000,0x4200000,0x51008e00,0x24000000,0x4400000,0x51008e00, +0x24000000,0x4810000,0x51008e00,0x24000000,0x5400000,0x51008e00,0x24000000,0x5410000,0x51008e00,0x24000000,0x5710000,0x51008e00,0x24000000,0xc400000,0x51008e00,0x24000002, +0x4200000,0x51008e00,0x24000500,0xc230400,0x51008e00,0x2c000010,0xcb48000,0x51009419,0x7c00100,0x8220400,0x51009419,0x7c00100,0x8250400,0x51009419,0x7c00100,0x10220400, +0x51009419,0x7c00100,0xc822040e,0x51009419,0x7c00100,0xc822040f,0x51009500,0x4000400,0x4200400,0x51009500,0x7c00500,0xfc230400,0x51009519,0x7c00100,0x8220400,0x51009519, +0x7c00100,0x8230400,0x51009519,0x7c00100,0x8250400,0x51009519,0x7c00100,0x18220400,0x51009519,0x7c00100,0x18250400,0x51009519,0x7c00100,0x20220400,0x51009519,0x7c00100, +0x20250400,0x51009519,0x7c00100,0xc822040f,0x51009b71,0x2802100,0x40962460,0x51009b71,0x6800000,0x41329800,0x51009b71,0x6800100,0x40962540,0x51009b71,0x6804400,0x40962540, +0x51009b71,0x7c00100,0x40230400,0x51009c52,0x2802100,0x40962460,0x51009c52,0x2802400,0x40962460,0x51009c52,0x2802d00,0x40962460,0x51009c52,0x4000010,0x44400000,0x51009c52, +0x6800000,0x41329800,0x51009c52,0x6800100,0x40962540,0x51009c52,0x7c00100,0x40230400,0x51009c52,0xc000010,0x44448000,0x51009d6d,0x6800000,0x41329800,0x51009d6d,0x7c00100, +0x40230400,0x51009d6d,0x7c00500,0x40230400,0x51009d6d,0x7c00d00,0x40230400,0x51009d6d,0xc000010,0x44448000,0x51009e08,0x2802100,0x8962460,0x51009f63,0x4000010,0x44400000, +0x51009f63,0x6800000,0x41329800,0x51009f63,0x7c00100,0x40230400,0x51009f63,0x7c00100,0x48230400,0x51009f63,0x7c00900,0x40230400,0x51009f63,0xc000010,0x44448000,0x51009f63, +0xc000010,0x44b48000,0x5100a008,0x2000,0xc962460,0x5100a008,0x2802400,0x20962460,0x5100a008,0x4000000,0x4200000,0x5100a008,0x4000000,0xc200000,0x5100a008,0x7c00100, +0x8220400,0x5100a008,0x7c00100,0x8230400,0x5100a008,0x7c00100,0x8250400,0x5100a008,0x7c00500,0xfc230400,0x5100a16f,0x2806400,0x40962460,0x5100a16f,0x6800000,0x41329800, +0x5100a16f,0x6800100,0x40962540,0x5100a16f,0x7c00100,0x40230400,0x5100a16f,0xc000010,0x44448000,0x5100a24f,0x2802100,0x40962460,0x5100a24f,0x2802400,0x40962460,0x5100a24f, +0x6800000,0x41329800,0x5100a24f,0x7c00100,0x40230400,0x5100a24f,0xc000010,0x44448000,0x5100a36e,0x2802100,0x80962460,0x5100a36e,0x4000000,0x84200000,0x5100a36e,0x6800100, +0x80962540,0x5100a36e,0x6804400,0x80962540,0x5100a36e,0x7c00100,0x80230400,0x5100a442,0x2802100,0x40962460,0x5100a442,0x4000000,0x44e00000,0x5100a442,0x6800000,0x40e29800, +0x5100a442,0x6800100,0x40962540,0x5100a442,0x7c00100,0x40430400,0x5100a442,0x7c00100,0x42d30400,0x5100a442,0xc000010,0x44448000,0x5100a500,0x4000000,0x4200000,0x5100a600, +0x4000000,0xc200000,0x5100a601,0x2802000,0x8962460,0x5100a76b,0x7c00100,0x80230400,0x5100a868,0x7c00100,0x80230400,0x5100a96c,0x4000000,0x84200000,0x5100a96c,0x7c00100, +0x80230400,0x5100aa00,0x4000000,0x4e00000,0x5100ab00,0x4000000,0x4e00000,0x51086600,0x24000020,0x4810000,0x51086600,0x24000020,0x5410000,0x510a4005,0x7c00100,0xfce30400, +0x510a4711,0x7c40300,0xfce30000,0x510a7300,0x24000000,0x4200000,0x510aaa00,0x4000000,0x4e00000,0x514a82cc,0x4000000,0x4e00000,0x5150a20e,0x4000400,0x4400000,0x51802bbe, +0x2802000,0x10962460,0x51c00908,0x2802400,0x18962460,0x51c0a008,0x2802400,0x20962460,0x52000f0a,0x2802100,0x20962460,0x52000f0a,0x6800100,0x8962540,0x52000f0a,0x7c00100, +0xfc230400,0x52001004,0x4000000,0x5600000,0x52001b00,0x4000000,0x4200000,0x52001c1c,0x2802100,0xfd862460,0x52001c1c,0x6800100,0xfd862400,0x52001c1c,0x6800500,0xfd862400, +0x52001e12,0x7c00100,0xa230500,0x52001e12,0x7c00100,0xa330520,0x52002128,0x4000002,0x44400000,0x52002128,0x7c00100,0x40230400,0x52002a00,0x4000000,0x5500000,0x52002a00, +0x4000000,0x5600000,0x52002d00,0x4000000,0xc8200006,0x52003000,0x24000000,0x4200000,0x52006108,0x7c00100,0xfc220400,0x52006108,0x7c00100,0xfc250400,0x52008301,0x2802400, +0x10962460,0x52008407,0x2802400,0x80962460,0x52008407,0x2802400,0x90962460,0x52008407,0x7c00100,0x80220400,0x52008407,0x7c00100,0x80250400,0x52008b3b,0x6800000,0x41800000, +0x52008b3b,0x7c00100,0x41830000,0x52008e00,0x24000000,0xc400000,0x52009419,0x7c00100,0x8250400,0x5200975b,0x4000000,0x84200000,0x5200ac7e,0x2802000,0x80962460,0x5200ac7e, +0x2802100,0x80962460,0x5200ac7e,0x2802400,0x80962460,0x5200ac7e,0x4000010,0x84200000,0x5200ac7e,0x7c00100,0x80230400,0x5200ac7e,0xc000010,0x84248000,0x5200ad28,0x7c00100, +0x40230400,0x5200ae6a,0x2802100,0x41862460,0x5200ae6a,0x2802400,0x40962460,0x5200ae6a,0x2802400,0x41862460,0x5200ae6a,0x2806000,0x41862460,0x5200ae6a,0x4000000,0x45800000, +0x5200ae6a,0x6800000,0x41329800,0x5200ae6a,0x6800100,0x41862400,0x5200ae6a,0x6800100,0x41862540,0x5200ae6a,0x7c00100,0x41830000,0x5200ae6a,0x7c00900,0x41830000,0x5200ae6a, +0xc000010,0x45848000,0x5200b083,0x4000010,0x44400000,0x5200b083,0x7c00100,0x40230400,0x5200b083,0xc000010,0x44448000,0x5200b182,0x2802400,0x40962460,0x5200b182,0x4000000, +0x44200000,0x5200b182,0x4000010,0x44400000,0x5200b182,0x7c00100,0x40230400,0x5200b182,0xc000010,0x44448000,0x5200b30a,0x2802400,0x8962460,0x5200b30a,0x4000000,0xc200000, +0x5200b30a,0x7c00100,0x8230400,0x5200b54e,0x2802100,0x40962460,0x5200b54e,0x2802400,0x40962460,0x5200b54e,0x4000000,0x44e00000,0x5200b54e,0x4000010,0x44400000,0x5200b54e, +0x6800000,0x40e29800,0x5200b54e,0x6800100,0x40962540,0x5200b54e,0x6804400,0x42f62540,0x5200b54e,0x7c00100,0x42b30400,0x5200b54e,0xc000010,0x44448000,0x5200b61c,0x4000000, +0x5800000,0x5200b61c,0x6800500,0xfd862400,0x5200b61c,0x7c00100,0xfd830000,0x5200b61c,0x7c00900,0xfd830000,0x5200b77f,0x2802100,0x41862460,0x5200b77f,0x2802400,0x41862460, +0x5200b77f,0x4000000,0x45800000,0x5200b77f,0x4000010,0x45800000,0x5200b77f,0x7c00100,0x41830000,0x5200b77f,0x7c00500,0x41830000,0x5200b77f,0x7c00900,0x41830000,0x5200b77f, +0x7e00100,0x41830000,0x5200b873,0x2802100,0x40962460,0x5200b873,0x2806400,0x40962460,0x5200b873,0x6800000,0x41329800,0x5200b873,0x6800100,0x40962540,0x5200b873,0x6800400, +0x40962540,0x5200b873,0x7c00100,0x40230400,0x5200b873,0xc000010,0x44448000,0x5200b912,0x7c00100,0xa230500,0x5200b912,0x7c00100,0xa330520,0x5200ba74,0x4000000,0x84200000, +0x5200ba74,0x4000010,0x84400000,0x5200ba74,0x7c00100,0x80230400,0x5200bb85,0x4000000,0x84200000,0x5200bb85,0x7c00100,0x80230400,0x5200bc75,0x4000000,0x84400000,0x5200bc75, +0x4000010,0x84400000,0x5200bc75,0x7c00100,0x80230400,0x5200bd7d,0x4000000,0x84200000,0x5200bd7d,0x7c00100,0x80230400,0x5200be7a,0x4000000,0x84200000,0x5200be7a,0x7c00100, +0x80230400,0x5200bf58,0x7c00100,0x80230400,0x5200c002,0x4000000,0x4200000,0x5200c178,0x2802100,0x80962460,0x5200c178,0x2802400,0x80962460,0x5200c178,0x2806400,0x80962460, +0x5200c178,0x4000000,0x84200000,0x5200c178,0x6800100,0x80962540,0x5200c178,0x7c00100,0x80230400,0x5200c178,0x7c00100,0x80230401,0x5200c178,0xc000010,0x84448000,0x5200c178, +0x80000000,0x85329960,0x5200c247,0x7c00100,0x80230400,0x5200c247,0x7c00100,0x80830400,0x5200c247,0x7c00100,0x81430400,0x5200c300,0x4000000,0xc8200003,0x52022d00,0x4000000, +0xc8100006,0x52023700,0x24000000,0x4100000,0x52023700,0x24000000,0x4e00000,0x52023700,0x24000000,0x6800000,0x52024400,0x4000000,0x4100000,0x52027300,0x24000000,0x4100000, +0x5202c300,0x4000000,0x4100000,0x5202c300,0x4000000,0xc8100002,0x5202c300,0x4000000,0xc8100003,0x5202c300,0x4000000,0xc810000d,0x5202c300,0x4000100,0x4150400,0x5202c300, +0x4000100,0xc815040d,0x520a1e12,0x7c00100,0xa130480,0x520a3700,0x24000000,0x4e00000,0x520a3800,0x24000000,0x4100000,0x520a4711,0x7c40300,0xfce30000,0x520a4f11,0x7c00300, +0xc8e30001,0x520a7300,0x24000000,0x4100000,0x520ab412,0x7c00100,0xa130480,0x520ac400,0x4000000,0xc8e00002,0x520ac400,0x4000000,0xc8e0000d,0x520ac414,0x4000000,0xc8e0000d, +0x520ac511,0x7c40300,0xfce30000,0x5240af9c,0x7c00100,0x8230400,0x5240afa1,0x4000400,0xc200000,0x5240afa3,0x6800400,0x8962540,0x5240afa3,0x7c00100,0x8230400,0x5240afad, +0x7c00100,0x8230400,0x5240afaf,0x7c00100,0x8230400,0x5240b2d4,0x4000000,0x4200000,0x5240b2e3,0x4000000,0x4200000,0x5240b2f1,0x4000000,0x4200000,0x5240b2fc,0x4000000, +0x5500000,0x524a44cc,0x4000000,0xc8e00003,0x5250b511,0x7c00900,0x60430400,0x5280af9c,0x2802400,0x8962460,0x5280af9d,0x2802400,0x8962460,0x5280afa3,0x2802400,0x8962460, +0x5280afa5,0x2802400,0x8962460,0x5280afa7,0x2802400,0x8962460,0x52d0b308,0x2802400,0x8962460,0x52d0b30c,0x7c00100,0x8230400,0x60000c02,0x2802100,0x20962460,0x60000c02, +0x7c00100,0xfc230400,0x60000f0a,0x2802100,0xfc962460,0x60000f0a,0x6800100,0xfc962540,0x60000f0a,0x7c00100,0xfc230400,0x6000131f,0x4000000,0x4200000,0x6000171a,0x7c00100, +0xfc230400,0x6000171a,0x7c00100,0xfc230560,0x60001b27,0x2802100,0xfc962460,0x60001b27,0x4000000,0x4c00000,0x60001b27,0x7c00100,0xfc230400,0x60001f0b,0x2802400,0xfc962460, +0x60002919,0x7c00100,0xc822040e,0x60002a00,0x4000000,0x5600000,0x60003000,0x24000000,0x4200000,0x60003000,0x24000000,0x4e00000,0x60003700,0x24000000,0x4200000,0x60003800, +0x24000000,0x5710000,0x60005102,0x4000000,0x14200000,0x60006108,0x7c00100,0xfc220400,0x60006108,0x7c00100,0xfc250400,0x60006600,0x24000020,0x4200000,0x60008301,0x2802400, +0x10c62460,0x6000903c,0x2806000,0x40962460,0x6000903c,0x4000000,0x44400000,0x60009519,0x7c00100,0x8220400,0x60009519,0x7c00100,0x8250400,0x60009519,0x7c00100,0x10220400, +0x60009519,0x7c00100,0xfc250400,0x6000a008,0x7c00100,0x8220400,0x6000a008,0x7c00100,0x8250400,0x6000c300,0x4000000,0x6703580,0x6000c654,0x2802000,0x40962460,0x6000c654, +0x4000010,0x44200000,0x6000c654,0x7c00100,0x40230400,0x6000c73f,0x2802000,0x40962460,0x6000c73f,0x2802100,0x40962460,0x6000c73f,0x4000000,0x44200000,0x6000c73f,0x6800100, +0x40962540,0x6000c73f,0x6804000,0x42e62540,0x6000c73f,0x7c00100,0x42d30400,0x6000c80b,0x7c00100,0xfc230400,0x6000c941,0x2802100,0x80962460,0x6000c941,0x2806400,0x82f62460, +0x6000c941,0x4000000,0x84e00000,0x6000c941,0x4000010,0x84e00000,0x6000c941,0x6800000,0x82d29800,0x6000c941,0x6800100,0x80962540,0x6000c941,0x7c00100,0x82b30400,0x6000c941, +0x7c00100,0x82c30400,0x6000c941,0xc000010,0x84448000,0x6000ca82,0x7c00100,0x40230400,0x6000cc00,0x4000000,0x4e00000,0x6000d000,0x4000000,0x4200000,0x6002c300,0x4000000, +0x4100000,0x6002c300,0x4000000,0xc810000d,0x6002c300,0x4000100,0x4150400,0x6002c300,0x4000100,0xc815040d,0x600a3000,0x24000000,0x4200000,0x600a3000,0x24000000,0x4e00000, +0x600a3700,0x24000000,0x4200000,0x600a3800,0x24000000,0x4200000,0x600a3800,0x24000000,0x6800000,0x600a4305,0x7c00100,0xfce30400,0x600ac300,0x4000000,0x4100000,0x600ac400, +0x4000000,0xc8e0000d,0x600acb14,0x7c00100,0x8e30000,0x600acb16,0x7c00100,0x8e30c00,0x600acc00,0x4000000,0x4e00000,0x600acd00,0x4000000,0x4200000,0x600acd00,0x4000000, +0x4e00000,0x600acd00,0x4000000,0x6800000,0x600ace00,0x4000000,0x4e00000,0x600ace00,0x4000000,0x6800000,0x600acf00,0x4000000,0x4e00000,0x600acf00,0x4000000,0x6800000, +0x600ad111,0x7c40300,0xfce30000,0x604ac4cc,0x4000000,0xc8e00003,0x61000a03,0x4000000,0x5600000,0x61000c02,0x80000000,0x5329960,0x6100120f,0x4000000,0x4200000,0x61001a18, +0x7c00100,0xfd830000,0x61001d0c,0x7c00100,0xfc230400,0x61001d0c,0x7c00100,0xfc250400,0x61006600,0x24000020,0x4200000,0x61008407,0x7c00100,0x80220400,0x61008407,0x7c00100, +0x80250400,0x6100870c,0x7c00100,0xfc220400,0x61008e00,0x24000000,0x4200000,0x61008e00,0x24000000,0x4400000,0x61008e00,0x24000000,0xc200000,0x61008e00,0x24000002,0x4300000, +0x6100903c,0x7c00100,0x40230400,0x61009519,0x7c00100,0xfc220400,0x61009519,0x7c00100,0xfc250400,0x61009519,0x7c00500,0xc822040f,0x61009b71,0x2802100,0x40962460,0x61009b71, +0x2806400,0x40962460,0x61009b71,0x7c00100,0x40230400,0x6100a008,0x2802100,0x8962460,0x6100c300,0x4000000,0xc820000f,0x6100cd00,0x4000000,0x4200000,0x6100d202,0x2802400, +0x20962460,0x6100d202,0x2802500,0x20962460,0x6100d202,0x7c00100,0xfc230400,0x6100d302,0x4000020,0x4200000,0x6100d302,0x7c00120,0xc8230405,0x6100d476,0x2802100,0x40962460, +0x6100d476,0x2802100,0x40962461,0x6100d476,0x2806400,0x40962460,0x6100d476,0x4000000,0x44400000,0x6100d476,0x6800000,0x41329800,0x6100d476,0x6800100,0x40962540,0x6100d476, +0x7c00100,0x40230400,0x6100d476,0xc000010,0x44448000,0x6100d573,0x2802100,0x40962460,0x6100d573,0x2806400,0x40962460,0x6100d573,0x6800100,0x40962540,0x6100d573,0x7c00100, +0x40230400,0x6100d573,0x7c00900,0x40230400,0x6100d573,0xc000010,0x44448000,0x6100d68d,0x7c00100,0x80230400,0x6100d756,0x7c00100,0x80230400,0x6100d85c,0x2802500,0x40962460, +0x6100d85c,0x6800100,0x40962540,0x6100d85c,0x7c00100,0x40230400,0x6100d85c,0x7c00500,0x40230400,0x6100d997,0x2802100,0x80962460,0x6100d997,0x4000000,0x84200000,0x6100d997, +0x4000000,0x84400000,0x6100d997,0x6800000,0x81329800,0x6100d997,0x6800100,0x80962540,0x6100d997,0x6804400,0x80962540,0x6100d997,0x7c00100,0x80230400,0x6100d997,0x7c00100, +0x80230560,0x6100d997,0xc000010,0x84448000,0x6100da98,0x6800000,0x81329800,0x6100da98,0x7c00100,0x80230400,0x6100db71,0x4000000,0x44200000,0x6100dc99,0x2802100,0x80962460, +0x6100dc99,0x2802400,0x80962460,0x6100dc99,0x6800000,0x81329800,0x6100dc99,0x6800100,0x80962540,0x6100dc99,0x6804400,0x80962540,0x6100dc99,0x7c00100,0x80230400,0x610a4711, +0x7c40300,0xfce30000,0x610a4f11,0x7c00300,0xc8e30001,0x610ace00,0x4000000,0x4e00000,0x6140afa1,0x7c00100,0x8230400,0x6140afa3,0x7c00100,0x8230400,0x6180af9e,0x2802400, +0x8962460,0x62002a00,0x4000000,0x5600000,0x63002800,0x80000,0xc4918820,0x63c00c15,0x80000,0xc4918820,0x7000080e,0x7c00100,0x8250400,0x70000a03,0x4000000,0x4200000, +0x70000c00,0x80000000,0x5329960,0x70000f0a,0x7c00100,0x8230400,0x70001004,0x7c00100,0x8230400,0x70001524,0x2802100,0x8962460,0x70001524,0x7c00100,0x8230400,0x70001615, +0x2802100,0x8962460,0x7000171a,0x2802100,0x8962460,0x70001821,0x6800000,0x9329800,0x70002320,0x7c00100,0x80230400,0x70002a00,0x4000000,0x5500000,0x70002a00,0x4000000, +0x5600000,0x70003000,0x24000000,0x4200000,0x70003800,0x24000000,0x4e00000,0x70005201,0x2802400,0x10962460,0x7000581e,0x7c00100,0x80230400,0x70006108,0x7c00100,0x8220400, +0x70006108,0x7c00100,0x8250400,0x70006108,0x7c00100,0xfc220400,0x70006108,0x7c00100,0xfc250400,0x70006f30,0x7c00100,0x40230400,0x70007300,0x24000000,0x4200000,0x70007f0e, +0x4000000,0x4200000,0x70008301,0x2802100,0x10962460,0x70008301,0x2802400,0x10962460,0x70008e00,0x24000000,0x4200000,0x70008e00,0x24000000,0x4400000,0x70008e00,0x24000002, +0x4400000,0x70008e00,0x24000008,0x5410000,0x70008e00,0x24000010,0x4400000,0x70008e00,0x2c000010,0x4448000,0x70009519,0x7c00100,0x8220400,0x70009519,0x7c00100,0x8230400, +0x70009519,0x7c00100,0x8250400,0x70009865,0x7c00100,0x80230400,0x70009965,0x4000010,0x84400000,0x70009965,0x7c00100,0x80230400,0x7000a008,0x7c00100,0x8220400,0x7000a008, +0x7c00100,0x8250400,0x7000a008,0x7c00500,0xc822040f,0x7000a50e,0x4000000,0x4200000,0x7000b61c,0x2802500,0xfd862460,0x7000b61c,0x6800500,0xfd862400,0x7000b61c,0x7c00100, +0xfd830000,0x7000c300,0x4000000,0x4100000,0x7000c941,0x2806000,0x80c62460,0x7000cc00,0x4000000,0x4e00000,0x7000cd00,0x4000000,0x4200000,0x7000cd00,0x4000000,0x4e00000, +0x7000cd00,0x4000000,0x6800000,0x7000cf00,0x4000000,0x4e00000,0x7000d202,0x2802100,0x20962460,0x7000d202,0x7c00100,0x8230400,0x7000d202,0x7c00100,0xfc230400,0x7000d997, +0x7c00100,0x80230400,0x7000d997,0xc000010,0x84248000,0x7000dd86,0x2802400,0x80962460,0x7000dd86,0x7c00100,0x80230400,0x7000dd86,0xc000010,0x84448000,0x7000de9f,0x4000000, +0x84200000,0x7000de9f,0x7c00100,0x80230400,0x7000e001,0x2400,0x4962460,0x7000e001,0x2802400,0x8962460,0x7000e187,0x2802000,0x80962460,0x7000e187,0x2802100,0x80962460, +0x7000e187,0x4000000,0x84200000,0x7000e187,0x7c00100,0x80230400,0x7000e187,0xc000010,0x84448000,0x7000e288,0x7c00100,0x80230400,0x7000e300,0x4000000,0x4200000,0x7000e489, +0x2802100,0x80962460,0x7000e489,0x2802400,0x80962460,0x7000e489,0x6800100,0x80962540,0x7000e489,0x6800100,0x80962541,0x7000e489,0x6804400,0x82f62540,0x7000e489,0x7c00100, +0x80430400,0x7000e489,0x7c00100,0x82b30400,0x7000e489,0x7c00100,0x82d30400,0x7000e489,0x7c00900,0x80430400,0x7000e59d,0x2802100,0x80962460,0x7000e59d,0x2802400,0x80962460, +0x7000e59d,0x4000000,0x84200000,0x7000e59d,0x4000010,0x84200000,0x7000e59d,0x6800100,0x80962540,0x7000e59d,0x6804400,0x80962540,0x7000e59d,0x7c00100,0x80230400,0x7000e59d, +0xc000010,0x84448000,0x7000e691,0x2802100,0x80962460,0x7000e691,0x2802400,0x80962460,0x7000e691,0x2806400,0x80962460,0x7000e691,0x6800000,0x81329800,0x7000e691,0x6800100, +0x80962540,0x7000e691,0x7c00100,0x80230400,0x7000e700,0x4000400,0x4200400,0x7000e70e,0x7c00100,0x8220400,0x7000e719,0x7c00100,0x8220400,0x7000e719,0x7c00500,0xc822040f, +0x7000e853,0x7c00100,0x80230400,0x7000e9a0,0x2802400,0x80962460,0x7000e9a0,0x4000000,0x84200000,0x7000e9a0,0x4000000,0x84500000,0x7000e9a0,0x7c00100,0x80230400,0x7000ea79, +0x2802400,0x80962460,0x7000ea79,0x4000000,0x84200000,0x7000ea79,0x4000000,0x84f00000,0x7000ea79,0x4000010,0x84400000,0x7000ea79,0x7c00100,0x80230400,0x7000eb8c,0x2802400, +0x80962460,0x7000eb8c,0x4000000,0x84200000,0x7000eb8c,0x7c00100,0x80230400,0x7000eca3,0x2802100,0x80962460,0x7000eca3,0x2806400,0x80962460,0x7000eca3,0x4000000,0x84200000, +0x7000eca3,0x6800000,0x81329800,0x7000eca3,0x6800100,0x80962540,0x7000eca3,0x7c00100,0x80230400,0x7000eca3,0xc000010,0x84448000,0x7000ed95,0x6800000,0xa1329800,0x7000ed95, +0x7c00100,0xa0230400,0x7000ed95,0xc000010,0x84448000,0x7000ee1c,0x2802500,0x9862460,0x7000ee1c,0x6800000,0xfd329800,0x7000ee1c,0x7c00100,0x9830000,0x7000ee1c,0x7c00100, +0xfd830000,0x7000ee1c,0x7c00900,0x9830000,0x7000ef8f,0x4000000,0x84200000,0x7000ef8f,0x7c00100,0x80230400,0x7000f08e,0x4000000,0x84200000,0x7000f08e,0x7c00100,0x80230400, +0x7000f159,0x2802100,0x80962460,0x7000f159,0x7c00100,0x80230400,0x7000f200,0x4000000,0x4200000,0x7000f200,0x4000000,0x5200000,0x7000f200,0x4000000,0x5710000,0x7000f34b, +0x2802400,0x80962460,0x7000f34b,0x4000000,0x84200000,0x7000f34b,0x4000010,0x84400000,0x7000f34b,0x6800000,0x81329800,0x7000f34b,0x7c00100,0x80230400,0x7000f34b,0x7c00900, +0x80230400,0x7000f34b,0xc000010,0x84448000,0x7000f490,0x4000000,0x84200000,0x7000f490,0x7c00100,0x80230400,0x7000f5a5,0x7c00100,0x80230400,0x7000f67b,0x4000000,0x84200000, +0x7000f67b,0x4000010,0x84200000,0x7000f67b,0x7c00100,0x80230400,0x7000f8a6,0x2802100,0x80962460,0x7000f8a6,0x2802400,0x80962460,0x7000f8a6,0x2806400,0x80962460,0x7000f8a6, +0x4000000,0x84500000,0x7000f8a6,0x4000010,0x84b00000,0x7000f8a6,0x4000800,0x84200000,0x7000f8a6,0x6800100,0x80962540,0x7000f8a6,0x6800100,0x80962541,0x7000f8a6,0x7c00100, +0x80230400,0x7000f8a6,0xc000010,0x84448000,0x7000f921,0x4000000,0x4200000,0x7000fa00,0x4000000,0x4200000,0x7000fb9e,0x2802100,0x80962460,0x7000fb9e,0x2802400,0x80962460, +0x7000fb9e,0x2806400,0x80962460,0x7000fb9e,0x4000000,0x84200000,0x7000fb9e,0x6800000,0x81329800,0x7000fb9e,0x6800100,0x80962540,0x7000fb9e,0x6800100,0x80962541,0x7000fb9e, +0x7c00100,0x80230400,0x7000fc92,0x4000000,0x84200000,0x7000fc92,0x6800000,0x81329800,0x7000fc92,0x7c00100,0x80220400,0x7000fc92,0x7c00100,0x80230400,0x7000fc92,0x7c00100, +0x80250400,0x700acd00,0x4000000,0x4e00000,0x700acd00,0x4000000,0x6800000,0x700ace00,0x4000000,0x4e00000,0x700acf00,0x4000000,0x4e00000,0x700acf00,0x4000000,0x6800000, +0x7050df21,0x4000000,0xc200000,0x7050f729,0x80000,0xc4918820,0x7080afa1,0x2802400,0x8962460,0x7090df21,0x2802400,0x8962460,0x70d0e427,0x2802100,0xfc962460,0x70d0e427, +0x2802400,0xfc962460,0x70d0e427,0x6800100,0xfc962540,0x70d0ea25,0x4000010,0x84400000,0x8000120f,0x7c00100,0x20230400,0x80001524,0x7c00100,0x20230400,0x8000171a,0x7c00100, +0x8230400,0x80002006,0x7c00100,0x40220400,0x80002006,0x7c00100,0x40250400,0x80002a00,0x4000000,0x5500000,0x80002d00,0x4000000,0x24200000,0x80005208,0x2802400,0x30962460, +0x80005c00,0x4000000,0x34200000,0x80007300,0x24000000,0x24200000,0x80009519,0x7c00100,0x20220400,0x80009519,0x7c00100,0x20230400,0x80009519,0x7c00100,0x20250400,0x80009865, +0x7c00100,0x80230400,0x8000a008,0x2802100,0x28962460,0x8000b30a,0x4000000,0x2c500000,0x8000b30a,0x7c00100,0x28230400,0x8000cd00,0x4000000,0x24e00000,0x8000d202,0x2802500, +0x20962460,0x8000d202,0x7c00100,0x20230400,0x8000d68d,0x4000000,0x84200000,0x8000d997,0x2802000,0x80962460,0x8000d997,0x2802400,0x80962460,0x8000d997,0x4000000,0x84400000, +0x8000d997,0x4000000,0x84500000,0x8000d997,0x7c00100,0x80230400,0x8000d997,0xc000010,0x84448000,0x8000e489,0x2802100,0x80962460,0x8000e489,0x7c00100,0x82d30400,0x8000e719, +0x7c00100,0x20220400,0x8000f8a6,0x2802100,0x80962460,0x8000f8a6,0x7c00100,0x80230400,0x8000f8a6,0xc000010,0x84448000,0x8000fda1,0x2802100,0x81862460,0x8000fda1,0x2806400, +0x81862460,0x8000fda1,0x4000000,0x85800000,0x8000fda1,0x6800000,0x81329800,0x8000fda1,0x6800100,0x81862400,0x8000fda1,0x6800100,0x81862540,0x8000fda1,0x7c00100,0x81830000, +0x8000fda1,0xc000010,0x84448000,0x8000fe9c,0x7c00100,0x80230400,0x8000fe9c,0x7c00100,0x80830400,0x8000fe9c,0x7c00100,0x81430400,0x8000ff06,0x7c00100,0x40220400,0x80010165, +0x7c00100,0x80230400,0x800102a2,0x4000000,0x84200000,0x800102a2,0x7c00100,0x80230400,0x800103a4,0x7c00100,0x80230400,0x800103a4,0xc000010,0x84448000,0x8001044c,0x4000000, +0x84200000,0x8001044c,0x7c00100,0x80220400,0x8001044c,0x7c00100,0x80250400,0x80010670,0x2802000,0x80962460,0x80010670,0x4000000,0x84200000,0x80010670,0x4000010,0x84400000, +0x80010670,0xc000010,0x84448000,0x800a4711,0x7c40300,0xfce30000,0x800acd00,0x4000000,0x4e00000,0x800acd00,0x4000000,0x6902460,0x800ace00,0x4000000,0x4e00000,0x800acf00, +0x4000000,0x4e00000,0x800b0011,0x7c40300,0xfce30000,0x800b0500,0x4000000,0x4e00000,0x800b0500,0x4000000,0x6800000,0x90001615,0x7c00100,0xfc230400,0x9000171a,0x4000000, +0x4200000,0x9000171a,0x7c00100,0xfc230400,0x90003000,0x24000000,0x4200000,0x90007f0e,0x4000000,0x4200000,0x90008301,0x2802400,0x10962460,0x90008e00,0x24000000,0x4400000, +0x90009519,0x7c00100,0x10250400,0x9000a16f,0x2802100,0x40962460,0x9000d200,0x80000000,0x5329960,0x9000d202,0x2802000,0x20962460,0x9000d202,0x2802100,0x20962460,0x9000d202, +0x7c00100,0xfc230400,0x9000e59d,0x2802100,0x80962460,0x90010500,0x4000000,0x4e00000,0x900107a7,0x2802100,0x40962460,0x900107a7,0x2802400,0x40962460,0x900107a7,0x2802c00, +0x40962460,0x900107a7,0x4000000,0x45400000,0x900107a7,0x6800000,0x41329800,0x900107a7,0x7c00100,0x40220400,0x900107a7,0x7c00100,0x40250400,0x900108a8,0x2802100,0x80962460, +0x900108a8,0x2806400,0x80962460,0x900108a8,0x4000000,0x84200000,0x900108a8,0x4000000,0x84400000,0x900108a8,0x4000010,0x84400000,0x900108a8,0x6800000,0x81329800,0x900108a8, +0x6800100,0x80962540,0x900108a8,0x7c00100,0x80230400,0x900108a8,0xc000010,0x84448000,0x90010908,0x7c00100,0x8220400,0x90010a38,0x2802100,0x80962460,0x90010ca9,0x2802100, +0x80962460,0x90010ca9,0x4000000,0x84500000,0x90010ca9,0x4000010,0x84b00000,0x90010ca9,0x6800100,0x80962540,0x90010ca9,0x7c00100,0x80230400,0x90010d1b,0x4000000,0x84500000, +0x90010eaa,0x2802100,0x40962460,0x90010eaa,0x2802400,0x40962460,0x90010eaa,0x2806400,0x40962460,0x90010eaa,0x4000000,0x44200000,0x90010eaa,0x4000000,0x44400000,0x90010eaa, +0x4000010,0x44400000,0x90010eaa,0x6800000,0x41329800,0x90010eaa,0x6800100,0x40962540,0x90010eaa,0x7c00100,0x40230400,0x90010eaa,0xc000010,0x44448000,0x90010fab,0x7c00100, +0x40220400,0x90010fab,0x7c00100,0x40250400,0x9002c300,0x4000000,0x4100000,0x900ac400,0x4000000,0xc8e0000d,0x900acd00,0x4000000,0x4e00000,0x900acd00,0x4000000,0x6800000, +0x900acf00,0x4000000,0x4e00000,0x900b0500,0x4000000,0x4e00000,0x900b0500,0x4000000,0x6800000,0x900b0b9a,0x7c00900,0x81230400,0x900b109a,0x7c00300,0x80e30000,0x900b119a, +0x7c00300,0x80e30000,0x90408e06,0x24000000,0x4400000,0xa0001004,0x4000000,0x4200000,0xa0001004,0x7c00100,0x8230400,0xa000120f,0x2802100,0xfc962460,0xa000120f,0x2802400, +0xfc962460,0xa000171a,0x2802100,0xfc962460,0xa000171a,0x2806400,0x8962460,0xa0002a00,0x4000000,0x5600000,0xa0003000,0x24000000,0x4200000,0xa000581e,0x7c00100,0x80230400, +0xa0007300,0x24000000,0x4200000,0xa0008301,0x2802400,0x10962460,0xa0008e00,0x24000000,0x4400000,0xa000cf00,0x4000000,0x4e00000,0xa0010500,0x4000000,0x4200000,0xa00114af, +0x2802100,0x80962460,0xa00114af,0x2802400,0x80962460,0xa00114af,0x2806400,0x80962460,0xa00114af,0x6800000,0x81329800,0xa00114af,0x7c00100,0x80230400,0xa00114af,0x7c00100, +0x80230560,0xa00116b0,0x2802100,0x80962460,0xa00116b0,0x2802800,0x80962460,0xa00116b0,0x2806400,0x80962460,0xa00116b0,0x4000000,0x84400000,0xa00116b0,0x4000000,0x84500000, +0xa00116b0,0x4000010,0x84400000,0xa00116b0,0x6800100,0x80962540,0xa00116b0,0x7c00100,0x80230400,0xa00116b0,0x7c00100,0x80230560,0xa00116b0,0xc000010,0x84448000,0xa0011722, +0x7c00100,0x40230400,0xa00118b1,0x2802000,0x80962460,0xa00118b1,0x2802100,0x80962460,0xa00118b1,0x2806400,0x80962460,0xa00118b1,0x4000000,0x84200000,0xa00118b1,0x4000000, +0x84400000,0xa00118b1,0x4000000,0x84500000,0xa00118b1,0x6800100,0x80962540,0xa00118b1,0x7c00100,0x80230400,0xa00118b1,0x7c00100,0x80230560,0xa00118b1,0xc000010,0x84448000, +0xa00a4005,0x7c00100,0x8e30400,0xa00a4711,0x7c40300,0xfce30000,0xa00ac400,0x4000000,0x4e00000,0xa00acb14,0x7c00100,0x8e30000,0xa00acf00,0x4000000,0x4e00000,0xa00b0500, +0x4000000,0x4e00000,0xa00b0500,0x4000000,0x6800000,0xa00b0b96,0x7c00900,0x81230400,0xa00b1211,0x7c40300,0xfce30000,0xa00b1314,0x7c00100,0x8e30000,0xa00b1596,0x7c00300, +0x80e30000,0xa040afb9,0x6800400,0x8962540,0xa08083ba,0x2802400,0x10962460,0xb0000a03,0x7c00100,0x10220400,0xb0000b13,0x7c00100,0xfe633800,0xb0001004,0x2802000,0xfc962460, +0xb0001110,0x4000000,0x4200000,0xb0001524,0x2802100,0xfc962460,0xb0001615,0x4000000,0x4500000,0xb000251b,0x7c00100,0x80230400,0xb0007300,0x24000000,0x4200000,0xb0008939, +0x4000000,0x84200000,0xb0008939,0x7c00100,0x80230400,0xb0008e00,0x24000000,0x4200000,0xb0008e00,0x24000000,0x4400000,0xb0008e00,0x24000010,0x4400000,0xb0009257,0x2802000, +0x40962460,0xb0009257,0x4000000,0x45600000,0xb0009519,0x7c00100,0x10220400,0xb0009519,0x7c00100,0x20220400,0xb0009519,0x7c00100,0x20250400,0xb0009a00,0x4000000,0x4200000, +0xb000b30a,0x2802100,0x8962460,0xb000b30a,0x7c00100,0x8230400,0xb000c178,0x80000000,0x85329960,0xb000c300,0x4000000,0x4200000,0xb000d202,0x2802000,0x20962460,0xb000d476, +0x6800100,0x40962540,0xb000d476,0x7c00100,0x40230400,0xb000e300,0x4000000,0x4e00000,0xb000fda1,0x7c00100,0x81830000,0xb0010eaa,0x2802000,0x40962460,0xb00116b0,0x7c00100, +0x80230400,0xb0011900,0x4000000,0x4e00000,0xb0011ab2,0x2802100,0x80962460,0xb0011ab2,0x2802400,0x80962460,0xb0011ab2,0x2806400,0x80962460,0xb0011ab2,0x4000000,0x84200000, +0xb0011ab2,0x6800100,0x80962540,0xb0011ab2,0x7c00100,0x80230400,0xb0011b0c,0x7c00100,0xfc230400,0xb0011cb3,0x2802100,0x40962460,0xb0011cb3,0x2806400,0x40962460,0xb0011cb3, +0x6800000,0x41329800,0xb0011cb3,0x6800100,0x40962540,0xb0011cb3,0x7c00100,0x40230400,0xb0011db6,0x2802500,0x40962460,0xb0011db6,0x6800000,0x41329800,0xb0011db6,0x7c00100, +0x40230400,0xb0011db6,0x7c00500,0x40230400,0xb0011e00,0x4000000,0x4200000,0xb0011e00,0x4000000,0x5500000,0xb0011fb4,0x2802100,0x80962460,0xb0011fb4,0x6800100,0x80962540, +0xb0011fb4,0x7c00100,0x80430400,0xb0011fb4,0x7c00100,0x82d30400,0xb0011fb4,0xc000010,0x84448000,0xb0012000,0x4000000,0x4200000,0xb00121b5,0x4000000,0x84200000,0xb00121b5, +0x4000010,0x84400000,0xb00121b5,0x7c00100,0x80220400,0xb00121b5,0x7c00100,0x80250400,0xb00121b5,0xc000010,0x84448000,0xb00122b8,0x4000000,0x84200000,0xb00122b8,0x7c00100, +0x80230400,0xb00123b7,0x2802400,0x80962460,0xb00123b7,0x4000000,0x84200000,0xb00123b7,0x7c00100,0x80230400,0xb00123b7,0xc000010,0x84248000,0xb00a4005,0x7c00100,0xfce30400, +0xb00a4711,0x7c40300,0xfce30000,0xb00acf00,0x4000000,0x4e00000,0xb00b0500,0x4000000,0x4e00000,0xb00b0500,0x4000000,0x6800000,0xb00b109a,0x7c00300,0x80e30000,0xb080e487, +0x2802000,0xfc962460,0xc0001524,0x4000000,0x4500000,0xc0001a18,0x2806400,0xfd862460,0xc0001a18,0x7c00100,0xfd830000,0xc0007300,0x24000000,0x4200000,0xc0008e00,0x24000010, +0x4400000,0xc0009519,0x7c00100,0x10220400,0xc0009519,0x7c00100,0x10250400,0xc0009519,0x7c00100,0xfc220400,0xc0009519,0x7c00100,0xfc250400,0xc000c300,0x4000000,0xc820000f, +0xc000d85c,0x2802100,0x40962460,0xc000d85c,0x6800100,0x40962540,0xc000d85c,0x7c00100,0x40230400,0xc000dc99,0x7c00100,0x80230400,0xc000e719,0x7c00100,0xfc220400,0xc00107a7, +0x7c00100,0x40230400,0xc0010eaa,0x7c00100,0x40230400,0xc00116b0,0x7c00100,0x80230560,0xc0011900,0x4000000,0x4200000,0xc0012447,0,0x84818820,0xc0012447,0, +0x84c18820,0xc0012447,0,0x85418820,0xc00125b9,0x7c00100,0x80230400,0xc00126bb,0x2802100,0x80962460,0xc00126bb,0x2806400,0x80962460,0xc00126bb,0x4000000,0x84500000, +0xc00126bb,0x6800100,0x80962540,0xc00126bb,0x7c00100,0x80230400,0xc00127ba,0x2802400,0x40962460,0xc00127ba,0x4000000,0x44200000,0xc00127ba,0x6800000,0x41329800,0xc00127ba, +0x7c00100,0x40230400,0xc00127ba,0x7c00900,0x40230400,0xc0012800,0x4000000,0x4200000,0xc0012b23,0x4000000,0x4200000,0xc0012b23,0x4000000,0x4400000,0xc0012b23,0x4000000, +0x5500000,0xc0012cbc,0x2802400,0x40962460,0xc0012cbc,0x4000000,0x45600000,0xc0012cbc,0x6800000,0x41329800,0xc0012cbc,0x7c00100,0x40230400,0xc00acf00,0x4000000,0x4e00000, +0xc00ae300,0x4000000,0x4e00000,0xc00b0500,0x4000000,0x4e00000,0xc00b0500,0x4000000,0x6800000,0xc00b0b11,0x4000000,0x5200000,0xc00b0b11,0x7c00900,0x9230400,0xc00b109a, +0x7c00300,0x80e30000,0xc00b2914,0x7c00100,0xfe530000,0xc00b2916,0x7c00100,0xfe530c00,0xc00b2a00,0x4000000,0x4e00000,0xc040af5e,0x7c00100,0x80230400,0xc0c12b89,0x4000000, +0x4200000,0xc14a44cc,0x4000000,0xc8e0000d,0xd000131f,0x2802c00,0xfc962460,0xd000171a,0x7c00100,0x18230400,0xd0001821,0x2802100,0x10962460,0xd0007300,0x24000000,0x4200000, +0xd0008e00,0x24000000,0x4200000,0xd0008f3a,0x2806000,0x40962460,0xd0009519,0x7c00100,0x8220400,0xd0009519,0x7c00100,0x8250400,0xd0009519,0x7c00100,0xfc220400,0xd0009519, +0x7c00100,0xfc250400,0xd000a500,0x4000000,0x4200000,0xd000c300,0x4000000,0x4e00000,0xd000d202,0x7c00100,0xfc230400,0xd000d476,0x7c00100,0x40230400,0xd000d997,0x2802100, +0x80962460,0xd000d997,0x6800100,0x80962540,0xd000e001,0x2802100,0x10962460,0xd000e700,0x4000400,0x4200000,0xd000e719,0x7c00100,0x10220400,0xd000e719,0x7c00500,0xc822040f, +0xd000fa00,0x4000000,0x4e00000,0xd0010eaa,0x4000010,0x44400000,0xd0010eaa,0x7c00100,0x40230400,0xd0012dbd,0x4000000,0x84200000,0xd0012dbd,0x7c00100,0x80230400,0xd0012fbe, +0x2802100,0x80962460,0xd0012fbe,0x2802400,0x80962460,0xd0012fbe,0x2806400,0x82f62460,0xd0012fbe,0x4000000,0x84400000,0xd0012fbe,0x6800000,0x80e29800,0xd0012fbe,0x6800100, +0x80962540,0xd0012fbe,0x6800100,0x80962541,0xd0012fbe,0x6804400,0x80962540,0xd0012fbe,0x7c00100,0x82b30400,0xd0012fbe,0x7c00100,0x82c30560,0xd0012fbe,0xc000010,0x84448000, +0xd0013183,0x7c00100,0x40230400,0xd0013200,0x4000000,0x4200000,0xd0013200,0x6800000,0xc9329805,0xd00134c0,0x2802100,0x80962460,0xd00134c0,0x4000002,0x84400000,0xd00134c0, +0x7c00100,0x80230400,0xd00a4305,0x7c00100,0xfce30400,0xd00a4611,0x7c40300,0xfce30000,0xd00a4711,0x7c40300,0xfce30000,0xd00a5e11,0x7c40300,0xfce30000,0xd00acf00,0x4000000, +0x4e00000,0xd00b0500,0x4000000,0x4e00000,0xd00b0500,0x4000000,0x6800000,0xd00b0b11,0x6800500,0xfc962540,0xd00b0bbf,0x2802200,0x80c62460,0xd00b119a,0x7c00300,0x80e30000, +0xd00b2a00,0x4000000,0x4e00000,0xd00b2e11,0x7c40300,0xfce30000,0xd00b30bf,0x7c00300,0x80230000,0xd00b339a,0x7c00300,0x80e30000,0xe0000c02,0xc000010,0x4b48000,0xe0001524, +0x2802400,0xfc962460,0xe0001524,0x7c00100,0xfc230400,0xe0001615,0x7c00100,0xfc230400,0xe000251b,0x12882000,0xc4962460,0xe0002a00,0x4000000,0x5500000,0xe0005102,0x4000000, +0x14200000,0xe0005c00,0x4000000,0x14200000,0xe000622a,0x6804400,0x80962540,0xe000622a,0x7c00100,0x80230400,0xe0008838,0x7c00100,0x80220400,0xe0008838,0x7c00100,0x80250400, +0xe0008e00,0x24000000,0x4810000,0xe0008e00,0x24000000,0x5410000,0xe0008e00,0x24000002,0x4400000,0xe0008e00,0x2c000010,0x4b48000,0xe000933e,0x7c00100,0x42b30400,0xe000933e, +0xc000010,0x44448000,0xe0009519,0x7c00100,0xc822040f,0xe0009519,0x7c00100,0xfc220400,0xe0009519,0x7c00100,0xfc250400,0xe000c178,0x2802100,0x80962460,0xe000c941,0x2802100, +0x80962460,0xe000c941,0x2806400,0x80962460,0xe000c941,0x7c00100,0x82b30400,0xe000d202,0x2802400,0x20962460,0xe000d202,0x7c00100,0xfc230400,0xe000d202,0x7c00500,0xfc230400, +0xe000dc99,0x4000000,0x84200000,0xe000e001,0x2802100,0x20962460,0xe000e001,0x2802400,0x20962460,0xe000fda1,0x7c00100,0x81830000,0xe0013502,0x2802400,0x20962460,0xe0013502, +0x4000000,0x4200000,0xe0013502,0x7c00100,0xfc230400,0xe0013502,0x80000000,0x5329960,0xe00136c1,0x4000000,0x84200000,0xe00136c1,0x7c00100,0x80230400,0xe001370b,0x7c00100, +0xfc230400,0xe0013919,0x7c00500,0x20220400,0xe0013919,0x7c00500,0xc822040f,0xe0013919,0x7c00d00,0xc823040f,0xe0013a19,0x7c00100,0xfc220400,0xe0013a19,0x7c00100,0xfc230400, +0xe0013bc2,0x2802400,0x80962460,0xe0013bc2,0x7c00100,0x80230400,0xe0013bc2,0xc000010,0x84248000,0xe0013cc3,0x6800000,0x81329800,0xe0013cc3,0x7c00100,0x80230400,0xe0013dc4, +0x2802400,0x80962460,0xe0013dc4,0x7c00100,0x80230400,0xe0013e28,0x7c00100,0x40230400,0xe0013fc5,0x7c00100,0x80220400,0xe0013fc5,0x7c00100,0x80250400,0xe0014000,0x4000000, +0x14200000,0xe0014001,0x2802400,0x10962460,0xe00a4711,0x7c40300,0xfce30000,0xe00a5e11,0x7c40300,0xfce30000,0xe00ac511,0x7c40300,0xfce30000,0xe00acf00,0x4000000,0x4e00000, +0xe00ae300,0x4000000,0x4e00000,0xe00b0500,0x4000000,0x4e00000,0xe00b1314,0x7c00100,0xfce30000,0xe00b1316,0x7c00100,0xfce30c00,0xe00b2a00,0x4000000,0x4e00000,0xe00b2a00, +0x4000000,0x6800000,0xe00b3816,0x7c00500,0x20230c00,0xe0808328,0x2802400,0x50962460,0xf0001615,0x6800100,0xfc962540,0xf0001a18,0x2802000,0xfd862460,0xf000c247,0x7c00100, +0x81430400,0xf000d000,0x4000000,0x4e00000,0xf000e300,0x4000000,0x4e00000,0xf000e59d,0x2802100,0x80962460,0xf000e59d,0x7c00100,0x80230400,0xf0012447,0,0x84818820, +0xf0012447,0,0x84c18820,0xf0012447,0,0x85418820,0xf0012447,0x2802000,0x80962460,0xf0012447,0x2802400,0x80962460,0xf0012447,0x7c00100,0x80230400,0xf0013a19, +0x7c00100,0xfc220400,0xf0014102,0x2802400,0x20962460,0xf0014308,0x2802100,0xfc962460,0xf0014308,0x7c00500,0xc822040e,0xf0014308,0x7c00500,0xc822040f,0xf001440a,0x4000000, +0x4500000,0xf0014500,0x4000000,0x4200000,0xf00146c6,0x2802100,0x80962460,0xf00146c6,0x2806000,0x82f62460,0xf00146c6,0x4000000,0x84e00000,0xf00146c6,0x6800000,0x82d29800, +0xf00146c6,0x6800100,0x80962540,0xf00146c6,0x6804000,0x80962540,0xf00146c6,0x7c00100,0x82b30400,0xf00146c6,0x7c00100,0x82c30560,0xf00146c6,0xc000010,0x84448000,0xf00147c7, +0x2802000,0x80962460,0xf00147c7,0x6800000,0x81329800,0xf00147c7,0x7c00100,0x80230400,0xf00ac511,0x7c40300,0xfce30000,0xf00acf00,0x4000000,0x4e00000,0xf00b2914,0x7c00100, +0xfe530000,0xf00b2916,0x7c00100,0xfe530c00,0xf00b2a00,0x4000000,0x4e00000,0xf00b2a00,0x4000000,0x6800000,0xf00b4211,0x7c40300,0xfce30000,0xf10a3c00,0x4000000,0x4e00000, +0xf10a3c00,0x4008000,0x4e00000,0xf10a8200,0x4008000,0x4e00000,0xf10b4811,0x7c40300,0xfce30000}; -static const int32_t countPropsVectors=7230; +static const int32_t countPropsVectors=7497; static const int32_t propsVectorsColumns=3; -static const uint16_t scriptExtensions[282]={ +static const uint16_t scriptExtensions[298]={ 0x800e,0x8019,8,0x8059,8,2,8,0x8038,8,6,8,0x8019,2,0x22,0x25,0x57, 0xb6,0x80c0,2,0x22,0x8025,2,0x12,2,0x22,0x25,0x57,0xa7,0xb6,0x80c0,2,0x22, 0x54,0x79,0x7b,0xa7,0xb6,0xb7,0x80c2,2,0x8022,2,0x25,0x80c0,2,0x29,2,0x80b6, @@ -3998,14 +4029,15 @@ static const uint16_t scriptExtensions[282]={ 0x80a4,0x10,0x7f,0xf,0x809d,0xf,0x83,0x23,0x8089,0x23,0x87,0x15,0x80bb,0x15,0x8b,0x1c, 0x34,0x8076,0x1c,0x8f,0xc,0x8019,0x2a,0x2b,0x2c,0x802d,0x1b,0x805a,0x800a,4,0xa,0x15, 0x8089,0xa,0x8089,4,0x800a,0xa,0x8097,0xa,0x15,0x1a,0x1f,0x23,0x8024,0xa,0x80bb,4, -0xa,0x15,0x1f,0x24,0x89,0x9e,0x80bb,0x8004,8,0x8022,0x19,0x801b,0xa,0x19,0x8089,5, -0x11,0x12,0x14,0x16,0x8029,5,0x11,0x12,0x14,0x8016,0x8011,5,0x8011,0x11,0x14,0x8016, -0x11,0x8019,0xa,0xf,0x10,0x78,0x91,0x99,0x9d,0x9e,0xa0,0xa3,0x80b2,0xa,0xf,0x10, -0x15,0x1a,0x78,0x91,0x99,0x9d,0x9e,0xa0,0xa3,0xb2,0x80bb,0xa,0xf,0x10,0x15,0x78, -0x91,0x99,0x9d,0x9e,0xa0,0xa3,0xb2,0x80bb,0xa,0xa3,0xa,0x8023,0xa,0xfa,0x19,0x1c, -0x804f,0x37,0x804e,2,0x8057,2,0x8025,2,0x105,0x2f,0x31,0x8053,0x2f,0x31,0x80c1,0x2f, -0x8031,2,0x8007,0x79,0x80c2,0x79,0x113,0x89,0x87,0x8087}; +0xa,0x15,0x1a,0x1f,0x21,0x24,0x89,0x9e,0x80bb,0x8004,8,0x8022,0x19,0x801b,0xa,0x19, +0x8089,5,0x11,0x12,0x14,0x16,0x8029,5,0x11,0x12,0x14,0x8016,0x8011,5,0x8011,0x11, +0x14,0x8016,0x11,0x8019,0xa,0xf,0x10,0x15,0x1a,0x78,0x91,0x97,0x99,0x9d,0x9e,0xa0, +0xa3,0xb2,0x80bb,0xa,0xf,0x10,0x15,0x78,0x91,0x97,0x99,0x9d,0x9e,0xa0,0xa3,0xb2, +0x80bb,0xa,0xf,0x10,0x78,0x91,0x99,0x9d,0x9e,0xa0,0xa3,0x80b2,0xa,0xf,0x10,0x78, +0x91,0x97,0x99,0x9d,0x9e,0xa0,0xa3,0x80b2,0xa,0xa3,0xa,0x8023,0xa,0x10a,0x19,0x1c, +0x804f,0x37,0x804e,2,0x8057,2,0x8025,2,0x115,0x2f,0x31,0x8053,0x2f,0x31,0x80c1,0x2f, +0x8031,2,0x8007,0x79,0x80c2,0x79,0x123,0x89,0x87,0x8087}; -static const int32_t indexes[UPROPS_INDEX_COUNT]={0x2d08,0x2d08,0x2d08,0x2d08,0x6ce6,3,0x8924,0x89b1,0x89b1,0x89b1,0xb47c7,0x2a75a31,0,0,0,0}; +static const int32_t indexes[UPROPS_INDEX_COUNT]={0x2d4e,0x2d4e,0x2d4e,0x2d4e,0x6d5a,3,0x8aa3,0x8b38,0x8b38,0x8b38,0xb48c8,0x2f75a31,0,0,0,0}; #endif // INCLUDED_FROM_UCHAR_C diff --git a/contrib/libs/icu/common/uchriter.cpp b/contrib/libs/icu/common/uchriter.cpp index a7d30977e0..c8b86e5d4d 100644 --- a/contrib/libs/icu/common/uchriter.cpp +++ b/contrib/libs/icu/common/uchriter.cpp @@ -20,14 +20,14 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(UCharCharacterIterator) UCharCharacterIterator::UCharCharacterIterator() : CharacterIterator(), - text(0) + text(nullptr) { // never default construct! } UCharCharacterIterator::UCharCharacterIterator(ConstChar16Ptr textPtr, int32_t length) - : CharacterIterator(textPtr != 0 ? (length>=0 ? length : u_strlen(textPtr)) : 0), + : CharacterIterator(textPtr != nullptr ? (length >= 0 ? length : u_strlen(textPtr)) : 0), text(textPtr) { } @@ -35,7 +35,7 @@ UCharCharacterIterator::UCharCharacterIterator(ConstChar16Ptr textPtr, UCharCharacterIterator::UCharCharacterIterator(ConstChar16Ptr textPtr, int32_t length, int32_t position) - : CharacterIterator(textPtr != 0 ? (length>=0 ? length : u_strlen(textPtr)) : 0, position), + : CharacterIterator(textPtr != nullptr ? (length >= 0 ? length : u_strlen(textPtr)) : 0, position), text(textPtr) { } @@ -45,7 +45,8 @@ UCharCharacterIterator::UCharCharacterIterator(ConstChar16Ptr textPtr, int32_t textBegin, int32_t textEnd, int32_t position) - : CharacterIterator(textPtr != 0 ? (length>=0 ? length : u_strlen(textPtr)) : 0, textBegin, textEnd, position), + : CharacterIterator(textPtr != nullptr ? (length >= 0 ? length : u_strlen(textPtr)) : 0, + textBegin, textEnd, position), text(textPtr) { } @@ -352,7 +353,7 @@ UCharCharacterIterator::move32(int32_t delta, CharacterIterator::EOrigin origin) void UCharCharacterIterator::setText(ConstChar16Ptr newText, int32_t newTextLength) { text = newText; - if(newText == 0 || newTextLength < 0) { + if (newText == nullptr || newTextLength < 0) { newTextLength = 0; } end = textLength = newTextLength; diff --git a/contrib/libs/icu/common/ucnv.cpp b/contrib/libs/icu/common/ucnv.cpp index a7a07d65d6..34a5a203d0 100644 --- a/contrib/libs/icu/common/ucnv.cpp +++ b/contrib/libs/icu/common/ucnv.cpp @@ -473,8 +473,6 @@ ucnv_setSubstChars (UConverter * converter, * we set subChar1 to 0. */ converter->subChar1 = 0; - - return; } U_CAPI void U_EXPORT2 @@ -1754,7 +1752,7 @@ ucnv_fromUChars(UConverter *cnv, destLimit=dest+destCapacity; /* perform the conversion */ - ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, true, pErrorCode); + ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, nullptr, true, pErrorCode); destLength=(int32_t)(dest-originalDest); /* if an overflow occurs, then get the preflighting length */ @@ -1765,7 +1763,7 @@ ucnv_fromUChars(UConverter *cnv, do { dest=buffer; *pErrorCode=U_ZERO_ERROR; - ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, true, pErrorCode); + ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, nullptr, true, pErrorCode); destLength+=(int32_t)(dest-buffer); } while(*pErrorCode==U_BUFFER_OVERFLOW_ERROR); } @@ -1810,7 +1808,7 @@ ucnv_toUChars(UConverter *cnv, destLimit=dest+destCapacity; /* perform the conversion */ - ucnv_toUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, true, pErrorCode); + ucnv_toUnicode(cnv, &dest, destLimit, &src, srcLimit, nullptr, true, pErrorCode); destLength=(int32_t)(dest-originalDest); /* if an overflow occurs, then get the preflighting length */ @@ -1822,7 +1820,7 @@ ucnv_toUChars(UConverter *cnv, do { dest=buffer; *pErrorCode=U_ZERO_ERROR; - ucnv_toUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, true, pErrorCode); + ucnv_toUnicode(cnv, &dest, destLimit, &src, srcLimit, nullptr, true, pErrorCode); destLength+=(int32_t)(dest-buffer); } while(*pErrorCode==U_BUFFER_OVERFLOW_ERROR); diff --git a/contrib/libs/icu/common/ucnv_err.cpp b/contrib/libs/icu/common/ucnv_err.cpp index 761c442632..7d49a50509 100644 --- a/contrib/libs/icu/common/ucnv_err.cpp +++ b/contrib/libs/icu/common/ucnv_err.cpp @@ -109,7 +109,6 @@ UCNV_FROM_U_CALLBACK_STOP ( *err = U_ZERO_ERROR; } /* the caller must have set the error code accordingly */ - return; } @@ -125,7 +124,6 @@ UCNV_TO_U_CALLBACK_STOP ( { /* the caller must have set the error code accordingly */ (void)context; (void)toUArgs; (void)codePoints; (void)length; (void)reason; (void)err; - return; } U_CAPI void U_EXPORT2 @@ -353,8 +351,6 @@ UCNV_FROM_U_CALLBACK_ESCAPE ( *err = err2; return; } - - return; } diff --git a/contrib/libs/icu/common/ucnv_u7.cpp b/contrib/libs/icu/common/ucnv_u7.cpp index 398b528e83..bbdaf98dff 100644 --- a/contrib/libs/icu/common/ucnv_u7.cpp +++ b/contrib/libs/icu/common/ucnv_u7.cpp @@ -455,7 +455,6 @@ unicodeMode: pArgs->source=(const char *)source; pArgs->target=target; pArgs->offsets=offsets; - return; } static void U_CALLCONV @@ -731,7 +730,6 @@ unicodeMode: pArgs->source=source; pArgs->target=(char *)target; pArgs->offsets=offsets; - return; } static const char * U_CALLCONV @@ -1156,7 +1154,6 @@ endloop: pArgs->source=(const char *)source; pArgs->target=target; pArgs->offsets=offsets; - return; } static void U_CALLCONV @@ -1443,7 +1440,6 @@ unicodeMode: pArgs->source=source; pArgs->target=(char *)target; pArgs->offsets=offsets; - return; } U_CDECL_END diff --git a/contrib/libs/icu/common/ucnvbocu.cpp b/contrib/libs/icu/common/ucnvbocu.cpp index 007722e474..3b736aa1e9 100644 --- a/contrib/libs/icu/common/ucnvbocu.cpp +++ b/contrib/libs/icu/common/ucnvbocu.cpp @@ -1165,7 +1165,6 @@ endloop: pArgs->source=(const char *)source; pArgs->target=target; pArgs->offsets=offsets; - return; } /* @@ -1363,7 +1362,6 @@ endloop: /* write back the updated pointers */ pArgs->source=(const char *)source; pArgs->target=target; - return; } /* miscellaneous ------------------------------------------------------------ */ diff --git a/contrib/libs/icu/common/ucnvisci.cpp b/contrib/libs/icu/common/ucnvisci.cpp index 507a50c892..c14dbaa08c 100644 --- a/contrib/libs/icu/common/ucnvisci.cpp +++ b/contrib/libs/icu/common/ucnvisci.cpp @@ -1537,12 +1537,12 @@ _ISCII_SafeClone(const UConverter *cnv, int32_t bufferSizeNeeded = sizeof(struct cloneISCIIStruct); if (U_FAILURE(*status)) { - return 0; + return nullptr; } if (*pBufferSize == 0) { /* 'preflighting' request - set needed size into *pBufferSize */ *pBufferSize = bufferSizeNeeded; - return 0; + return nullptr; } localClone = (struct cloneISCIIStruct *)stackBuffer; diff --git a/contrib/libs/icu/common/ucnvscsu.cpp b/contrib/libs/icu/common/ucnvscsu.cpp index 2138e289ca..e6f8660df4 100644 --- a/contrib/libs/icu/common/ucnvscsu.cpp +++ b/contrib/libs/icu/common/ucnvscsu.cpp @@ -572,7 +572,6 @@ endloop: pArgs->source=(const char *)source; pArgs->target=target; pArgs->offsets=offsets; - return; } /* @@ -864,7 +863,6 @@ endloop: /* write back the updated pointers */ pArgs->source=(const char *)source; pArgs->target=target; - return; } U_CDECL_END /* SCSU-from-Unicode conversion functions ----------------------------------- */ @@ -1978,12 +1976,12 @@ _SCSUSafeClone(const UConverter *cnv, int32_t bufferSizeNeeded = sizeof(struct cloneSCSUStruct); if (U_FAILURE(*status)){ - return 0; + return nullptr; } if (*pBufferSize == 0){ /* 'preflighting' request - set needed size into *pBufferSize */ *pBufferSize = bufferSizeNeeded; - return 0; + return nullptr; } localClone = (struct cloneSCSUStruct *)stackBuffer; diff --git a/contrib/libs/icu/common/ucurr.cpp b/contrib/libs/icu/common/ucurr.cpp index ffca8aac5f..dbad1e5014 100644 --- a/contrib/libs/icu/common/ucurr.cpp +++ b/contrib/libs/icu/common/ucurr.cpp @@ -11,6 +11,8 @@ #if !UCONFIG_NO_FORMATTING +#include <utility> + #include "unicode/ucurr.h" #include "unicode/locid.h" #include "unicode/ures.h" @@ -293,7 +295,7 @@ myUCharsToChars(char* resultOfLen4, const char16_t* currency) { static const int32_t* _findMetaData(const char16_t* currency, UErrorCode& ec) { - if (currency == 0 || *currency == 0) { + if (currency == nullptr || *currency == 0) { if (U_SUCCESS(ec)) { ec = U_ILLEGAL_ARGUMENT_ERROR; } @@ -346,10 +348,10 @@ _findMetaData(const char16_t* currency, UErrorCode& ec) { // ------------------------------------- -static void -idForLocale(const char* locale, char* countryAndVariant, int capacity, UErrorCode* ec) +static CharString +idForLocale(const char* locale, UErrorCode* ec) { - ulocimp_getRegionForSupplementalData(locale, false, countryAndVariant, capacity, ec); + return ulocimp_getRegionForSupplementalData(locale, false, *ec); } // ------------------------------------------ @@ -368,7 +370,7 @@ U_CDECL_END struct CReg; static UMutex gCRegLock; -static CReg* gCRegHead = 0; +static CReg* gCRegHead = nullptr; struct CReg : public icu::UMemory { CReg *next; @@ -376,7 +378,7 @@ struct CReg : public icu::UMemory { char id[ULOC_FULLNAME_CAPACITY]; CReg(const char16_t* _iso, const char* _id) - : next(0) + : next(nullptr) { int32_t len = (int32_t)uprv_strlen(_id); if (len > (int32_t)(sizeof(id)-1)) { @@ -405,7 +407,7 @@ struct CReg : public icu::UMemory { } *status = U_MEMORY_ALLOCATION_ERROR; } - return 0; + return nullptr; } static UBool unreg(UCurrRegistryKey key) { @@ -461,9 +463,8 @@ U_CAPI UCurrRegistryKey U_EXPORT2 ucurr_register(const char16_t* isoCode, const char* locale, UErrorCode *status) { if (status && U_SUCCESS(*status)) { - char id[ULOC_FULLNAME_CAPACITY]; - idForLocale(locale, id, sizeof(id), status); - return CReg::reg(isoCode, id, status); + CharString id = idForLocale(locale, status); + return CReg::reg(isoCode, id.data(), status); } return nullptr; } @@ -520,27 +521,26 @@ ucurr_forLocale(const char* locale, return 0; } - char currency[4]; // ISO currency codes are alpha3 codes. UErrorCode localStatus = U_ZERO_ERROR; - int32_t resLen = uloc_getKeywordValue(locale, "currency", - currency, UPRV_LENGTHOF(currency), &localStatus); - if (U_SUCCESS(localStatus) && resLen == 3 && uprv_isInvariantString(currency, resLen)) { + CharString currency = ulocimp_getKeywordValue(locale, "currency", localStatus); + int32_t resLen = currency.length(); + + if (U_SUCCESS(localStatus) && resLen == 3 && uprv_isInvariantString(currency.data(), resLen)) { if (resLen < buffCapacity) { - T_CString_toUpperCase(currency); - u_charsToUChars(currency, buff, resLen); + T_CString_toUpperCase(currency.data()); + u_charsToUChars(currency.data(), buff, resLen); } return u_terminateUChars(buff, buffCapacity, resLen, ec); } // get country or country_variant in `id' - char id[ULOC_FULLNAME_CAPACITY]; - idForLocale(locale, id, UPRV_LENGTHOF(id), ec); + CharString id = idForLocale(locale, ec); if (U_FAILURE(*ec)) { return 0; } #if !UCONFIG_NO_SERVICE - const char16_t* result = CReg::get(id); + const char16_t* result = CReg::get(id.data()); if (result) { if(buffCapacity > u_strlen(result)) { u_strcpy(buff, result); @@ -550,13 +550,13 @@ ucurr_forLocale(const char* locale, } #endif // Remove variants, which is only needed for registration. - char *idDelim = uprv_strchr(id, VAR_DELIM); + char *idDelim = uprv_strchr(id.data(), VAR_DELIM); if (idDelim) { - idDelim[0] = 0; + id.truncate(idDelim - id.data()); } const char16_t* s = nullptr; // Currency code from data file. - if (id[0] == 0) { + if (id.isEmpty()) { // No point looking in the data for an empty string. // This is what we would get. localStatus = U_MISSING_RESOURCE_ERROR; @@ -565,7 +565,7 @@ ucurr_forLocale(const char* locale, localStatus = U_ZERO_ERROR; UResourceBundle *rb = ures_openDirect(U_ICUDATA_CURR, CURRENCY_DATA, &localStatus); UResourceBundle *cm = ures_getByKey(rb, CURRENCY_MAP, rb, &localStatus); - UResourceBundle *countryArray = ures_getByKey(rb, id, cm, &localStatus); + UResourceBundle *countryArray = ures_getByKey(rb, id.data(), cm, &localStatus); // https://unicode-org.atlassian.net/browse/ICU-21997 // Prefer to use currencies that are legal tender. if (U_SUCCESS(localStatus)) { @@ -595,13 +595,13 @@ ucurr_forLocale(const char* locale, ures_close(countryArray); } - if ((U_FAILURE(localStatus)) && strchr(id, '_') != 0) { + if ((U_FAILURE(localStatus)) && strchr(id.data(), '_') != nullptr) { // We don't know about it. Check to see if we support the variant. - uloc_getParent(locale, id, UPRV_LENGTHOF(id), ec); + CharString parent = ulocimp_getParent(locale, *ec); *ec = U_USING_FALLBACK_WARNING; - // TODO: Loop over the shortened id rather than recursing and + // TODO: Loop over the parent rather than recursing and // looking again for a currency keyword. - return ucurr_forLocale(id, buff, buffCapacity, ec); + return ucurr_forLocale(parent.data(), buff, buffCapacity, ec); } if (*ec == U_ZERO_ERROR || localStatus != U_ZERO_ERROR) { // There is nothing to fallback to. Report the failure/warning if possible. @@ -624,20 +624,19 @@ ucurr_forLocale(const char* locale, * @return true if the fallback happened; false if locale is already * root (""). */ -static UBool fallback(char *loc) { - if (!*loc) { +static UBool fallback(CharString& loc) { + if (loc.isEmpty()) { return false; } UErrorCode status = U_ZERO_ERROR; - if (uprv_strcmp(loc, "en_GB") == 0) { + if (loc == "en_GB") { // HACK: See #13368. We need "en_GB" to fall back to "en_001" instead of "en" // in order to consume the correct data strings. This hack will be removed // when proper data sink loading is implemented here. - // NOTE: "001" adds 1 char over "GB". However, both call sites allocate - // arrays with length ULOC_FULLNAME_CAPACITY (plenty of room for en_001). - uprv_strcpy(loc + 3, "001"); + loc.truncate(3); + loc.append("001", status); } else { - uloc_getParent(loc, loc, (int32_t)uprv_strlen(loc), &status); + loc = ulocimp_getParent(loc.data(), status); } /* char *i = uprv_strrchr(loc, '_'); @@ -670,13 +669,13 @@ ucurr_getName(const char16_t* currency, //|} if (U_FAILURE(*ec)) { - return 0; + return nullptr; } int32_t choice = (int32_t) nameStyle; if (choice < 0 || choice > 4) { *ec = U_ILLEGAL_ARGUMENT_ERROR; - return 0; + return nullptr; } // In the future, resource bundles may implement multi-level @@ -692,11 +691,10 @@ ucurr_getName(const char16_t* currency, // this function. UErrorCode ec2 = U_ZERO_ERROR; - char loc[ULOC_FULLNAME_CAPACITY]; - uloc_getName(locale, loc, sizeof(loc), &ec2); - if (U_FAILURE(ec2) || ec2 == U_STRING_NOT_TERMINATED_WARNING) { + CharString loc = ulocimp_getName(locale, ec2); + if (U_FAILURE(ec2)) { *ec = U_ILLEGAL_ARGUMENT_ERROR; - return 0; + return nullptr; } char buf[ISO_CURRENCY_CODE_LENGTH+1]; @@ -707,7 +705,7 @@ ucurr_getName(const char16_t* currency, const char16_t* s = nullptr; ec2 = U_ZERO_ERROR; - LocalUResourceBundlePointer rb(ures_open(U_ICUDATA_CURR, loc, &ec2)); + LocalUResourceBundlePointer rb(ures_open(U_ICUDATA_CURR, loc.data(), &ec2)); if (nameStyle == UCURR_NARROW_SYMBOL_NAME || nameStyle == UCURR_FORMAL_SYMBOL_NAME || nameStyle == UCURR_VARIANT_SYMBOL_NAME) { CharString key; @@ -723,7 +721,7 @@ ucurr_getName(const char16_t* currency, break; default: *ec = U_UNSUPPORTED_ERROR; - return 0; + return nullptr; } key.append("/", ec2); key.append(buf, ec2); @@ -784,18 +782,17 @@ ucurr_getPluralName(const char16_t* currency, //|} if (U_FAILURE(*ec)) { - return 0; + return nullptr; } // Use a separate UErrorCode here that does not propagate out of // this function. UErrorCode ec2 = U_ZERO_ERROR; - char loc[ULOC_FULLNAME_CAPACITY]; - uloc_getName(locale, loc, sizeof(loc), &ec2); - if (U_FAILURE(ec2) || ec2 == U_STRING_NOT_TERMINATED_WARNING) { + CharString loc = ulocimp_getName(locale, ec2); + if (U_FAILURE(ec2)) { *ec = U_ILLEGAL_ARGUMENT_ERROR; - return 0; + return nullptr; } char buf[ISO_CURRENCY_CODE_LENGTH+1]; @@ -803,7 +800,7 @@ ucurr_getPluralName(const char16_t* currency, const char16_t* s = nullptr; ec2 = U_ZERO_ERROR; - UResourceBundle* rb = ures_open(U_ICUDATA_CURR, loc, &ec2); + UResourceBundle* rb = ures_open(U_ICUDATA_CURR, loc.data(), &ec2); rb = ures_getByKey(rb, CURRENCYPLURALS, rb, &ec2); @@ -904,13 +901,17 @@ getCurrencyNameCount(const char* loc, int32_t* total_currency_name_count, int32_ *total_currency_name_count = 0; *total_currency_symbol_count = 0; const char16_t* s = nullptr; - char locale[ULOC_FULLNAME_CAPACITY] = ""; - uprv_strcpy(locale, loc); + CharString locale; + { + UErrorCode status = U_ZERO_ERROR; + locale.append(loc, status); + if (U_FAILURE(status)) { return; } + } const icu::Hashtable *currencySymbolsEquiv = getCurrSymbolsEquiv(); for (;;) { UErrorCode ec2 = U_ZERO_ERROR; // TODO: ures_openDirect? - UResourceBundle* rb = ures_open(U_ICUDATA_CURR, locale, &ec2); + UResourceBundle* rb = ures_open(U_ICUDATA_CURR, locale.data(), &ec2); UResourceBundle* curr = ures_getByKey(rb, CURRENCIES, nullptr, &ec2); int32_t n = ures_getSize(curr); for (int32_t i=0; i<n; ++i) { @@ -979,14 +980,13 @@ collectCurrencyNames(const char* locale, // Look up the Currencies resource for the given locale. UErrorCode ec2 = U_ZERO_ERROR; - char loc[ULOC_FULLNAME_CAPACITY] = ""; - uloc_getName(locale, loc, sizeof(loc), &ec2); - if (U_FAILURE(ec2) || ec2 == U_STRING_NOT_TERMINATED_WARNING) { + CharString loc = ulocimp_getName(locale, ec2); + if (U_FAILURE(ec2)) { ec = U_ILLEGAL_ARGUMENT_ERROR; } // Get maximum currency name count first. - getCurrencyNameCount(loc, total_currency_name_count, total_currency_symbol_count); + getCurrencyNameCount(loc.data(), total_currency_name_count, total_currency_symbol_count); *currencyNames = (CurrencyNameStruct*)uprv_malloc (sizeof(CurrencyNameStruct) * (*total_currency_name_count)); @@ -1014,7 +1014,7 @@ collectCurrencyNames(const char* locale, for (int32_t localeLevel = 0; ; ++localeLevel) { ec2 = U_ZERO_ERROR; // TODO: ures_openDirect - UResourceBundle* rb = ures_open(U_ICUDATA_CURR, loc, &ec2); + UResourceBundle* rb = ures_open(U_ICUDATA_CURR, loc.data(), &ec2); UResourceBundle* curr = ures_getByKey(rb, CURRENCIES, nullptr, &ec2); int32_t n = ures_getSize(curr); for (int32_t i=0; i<n; ++i) { @@ -1364,7 +1364,6 @@ searchCurrencyName(const CurrencyNameStruct* currencyNames, break; } } - return; } //========================= currency name cache ===================== @@ -1421,7 +1420,7 @@ currency_cache_cleanup() { for (int32_t i = 0; i < CURRENCY_NAME_CACHE_NUM; ++i) { if (currCache[i]) { deleteCacheEntry(currCache[i]); - currCache[i] = 0; + currCache[i] = nullptr; } } return true; @@ -2004,6 +2003,7 @@ static const struct CurrencyList { {"XBC", UCURR_UNCOMMON|UCURR_NON_DEPRECATED}, {"XBD", UCURR_UNCOMMON|UCURR_NON_DEPRECATED}, {"XCD", UCURR_COMMON|UCURR_NON_DEPRECATED}, + {"XCG", UCURR_COMMON|UCURR_NON_DEPRECATED}, {"XDR", UCURR_UNCOMMON|UCURR_NON_DEPRECATED}, {"XEU", UCURR_UNCOMMON|UCURR_DEPRECATED}, {"XFO", UCURR_UNCOMMON|UCURR_NON_DEPRECATED}, @@ -2203,7 +2203,7 @@ static void U_CALLCONV initIsoCodes(UErrorCode &status) { static void populateCurrSymbolsEquiv(icu::Hashtable *hash, UErrorCode &status) { if (U_FAILURE(status)) { return; } - for (auto& entry : unisets::kCurrencyEntries) { + for (const auto& entry : unisets::kCurrencyEntries) { UnicodeString exemplar(entry.exemplar); const UnicodeSet* set = unisets::get(entry.key); if (set == nullptr) { return; } @@ -2299,10 +2299,9 @@ ucurr_countCurrencies(const char* locale, { // local variables UErrorCode localStatus = U_ZERO_ERROR; - char id[ULOC_FULLNAME_CAPACITY]; // get country or country_variant in `id' - idForLocale(locale, id, sizeof(id), ec); + CharString id = idForLocale(locale, ec); if (U_FAILURE(*ec)) { @@ -2310,10 +2309,10 @@ ucurr_countCurrencies(const char* locale, } // Remove variants, which is only needed for registration. - char *idDelim = strchr(id, VAR_DELIM); + char *idDelim = strchr(id.data(), VAR_DELIM); if (idDelim) { - idDelim[0] = 0; + id.truncate(idDelim - id.data()); } // Look up the CurrencyMap element in the root bundle. @@ -2321,7 +2320,7 @@ ucurr_countCurrencies(const char* locale, UResourceBundle *cm = ures_getByKey(rb, CURRENCY_MAP, rb, &localStatus); // Using the id derived from the local, get the currency data - UResourceBundle *countryArray = ures_getByKey(rb, id, cm, &localStatus); + UResourceBundle *countryArray = ures_getByKey(rb, id.data(), cm, &localStatus); // process each currency to see which one is valid for the given date if (U_SUCCESS(localStatus)) @@ -2414,20 +2413,19 @@ ucurr_forLocaleAndDate(const char* locale, { // local variables UErrorCode localStatus = U_ZERO_ERROR; - char id[ULOC_FULLNAME_CAPACITY]; // get country or country_variant in `id' - idForLocale(locale, id, sizeof(id), ec); + CharString id = idForLocale(locale, ec); if (U_FAILURE(*ec)) { return 0; } // Remove variants, which is only needed for registration. - char *idDelim = strchr(id, VAR_DELIM); + char *idDelim = strchr(id.data(), VAR_DELIM); if (idDelim) { - idDelim[0] = 0; + id.truncate(idDelim - id.data()); } // Look up the CurrencyMap element in the root bundle. @@ -2435,7 +2433,7 @@ ucurr_forLocaleAndDate(const char* locale, UResourceBundle *cm = ures_getByKey(rb, CURRENCY_MAP, rb, &localStatus); // Using the id derived from the local, get the currency data - UResourceBundle *countryArray = ures_getByKey(rb, id, cm, &localStatus); + UResourceBundle *countryArray = ures_getByKey(rb, id.data(), cm, &localStatus); // process each currency to see which one is valid for the given date bool matchFound = false; @@ -2561,9 +2559,8 @@ static const UEnumeration defaultKeywordValues = { U_CAPI UEnumeration *U_EXPORT2 ucurr_getKeywordValuesForLocale(const char *key, const char *locale, UBool commonlyUsed, UErrorCode* status) { // Resolve region - char prefRegion[ULOC_COUNTRY_CAPACITY]; - ulocimp_getRegionForSupplementalData(locale, true, prefRegion, sizeof(prefRegion), status); - + CharString prefRegion = ulocimp_getRegionForSupplementalData(locale, true, *status); + // Read value from supplementalData UList *values = ulist_createEmptyList(status); UList *otherValues = ulist_createEmptyList(status); @@ -2595,7 +2592,7 @@ U_CAPI UEnumeration *U_EXPORT2 ucurr_getKeywordValuesForLocale(const char *key, break; } const char *region = ures_getKey(&bundlekey); - UBool isPrefRegion = uprv_strcmp(region, prefRegion) == 0 ? true : false; + UBool isPrefRegion = prefRegion == region; if (!isPrefRegion && commonlyUsed) { // With commonlyUsed=true, we do not put // currencies for other regions in the @@ -2706,7 +2703,7 @@ ucurr_getNumericCode(const char16_t* currency) { if (currency && u_strlen(currency) == ISO_CURRENCY_CODE_LENGTH) { UErrorCode status = U_ZERO_ERROR; - UResourceBundle *bundle = ures_openDirect(0, "currencyNumericCodes", &status); + UResourceBundle *bundle = ures_openDirect(nullptr, "currencyNumericCodes", &status); ures_getByKey(bundle, "codeMap", bundle, &status); if (U_SUCCESS(status)) { char alphaCode[ISO_CURRENCY_CODE_LENGTH+1]; diff --git a/contrib/libs/icu/common/udata.cpp b/contrib/libs/icu/common/udata.cpp index 76d970f3f2..4c2ba57303 100644 --- a/contrib/libs/icu/common/udata.cpp +++ b/contrib/libs/icu/common/udata.cpp @@ -850,12 +850,12 @@ static UBool extendICUData(UErrorCode *pErr) UDataMemory_init(©PData); if(pData != nullptr) { UDatamemory_assign(©PData, pData); - copyPData.map = 0; /* The mapping for this data is owned by the hash table */ - copyPData.mapAddr = 0; /* which will unmap it when ICU is shut down. */ - /* CommonICUData is also unmapped when ICU is shut down.*/ - /* To avoid unmapping the data twice, zero out the map */ - /* fields in the UDataMemory that we're assigning */ - /* to CommonICUData. */ + copyPData.map = nullptr; /* The mapping for this data is owned by the hash table */ + copyPData.mapAddr = nullptr; /* which will unmap it when ICU is shut down. */ + /* CommonICUData is also unmapped when ICU is shut down.*/ + /* To avoid unmapping the data twice, zero out the map */ + /* fields in the UDataMemory that we're assigning */ + /* to CommonICUData. */ didUpdate = /* no longer using this result */ setCommonICUData(©PData,/* The new common data. */ @@ -1196,7 +1196,7 @@ doOpenChoice(const char *path, const char *type, const char *name, *p = U_FILE_SEP_CHAR; } #if defined (UDATA_DEBUG) - fprintf(stderr, "Changed path from [%s] to [%s]\n", path, altSepPath.s); + fprintf(stderr, "Changed path from [%s] to [%s]\n", path, altSepPath.data()); #endif path = altSepPath.data(); } diff --git a/contrib/libs/icu/common/udataswp.cpp b/contrib/libs/icu/common/udataswp.cpp index bbce1a8ecd..0f194f47e8 100644 --- a/contrib/libs/icu/common/udataswp.cpp +++ b/contrib/libs/icu/common/udataswp.cpp @@ -441,7 +441,7 @@ udata_openSwapperForInputData(const void *data, int32_t length, pHeader->info.sizeofUChar!=2 ) { *pErrorCode=U_UNSUPPORTED_ERROR; - return 0; + return nullptr; } inIsBigEndian=(UBool)pHeader->info.isBigEndian; @@ -461,7 +461,7 @@ udata_openSwapperForInputData(const void *data, int32_t length, (length>=0 && length<headerSize) ) { *pErrorCode=U_UNSUPPORTED_ERROR; - return 0; + return nullptr; } return udata_openSwapper(inIsBigEndian, inCharset, outIsBigEndian, outCharset, pErrorCode); diff --git a/contrib/libs/icu/common/uiter.cpp b/contrib/libs/icu/common/uiter.cpp index be59eab2ee..6c96117e1a 100644 --- a/contrib/libs/icu/common/uiter.cpp +++ b/contrib/libs/icu/common/uiter.cpp @@ -66,7 +66,7 @@ noopSetState(UCharIterator * /*iter*/, uint32_t /*state*/, UErrorCode *pErrorCod } static const UCharIterator noopIterator={ - 0, 0, 0, 0, 0, 0, + nullptr, 0, 0, 0, 0, 0, noopGetIndex, noopMove, noopHasNext, @@ -197,7 +197,7 @@ stringIteratorSetState(UCharIterator *iter, uint32_t state, UErrorCode *pErrorCo } static const UCharIterator stringIterator={ - 0, 0, 0, 0, 0, 0, + nullptr, 0, 0, 0, 0, 0, stringIteratorGetIndex, stringIteratorMove, stringIteratorHasNext, @@ -212,8 +212,8 @@ static const UCharIterator stringIterator={ U_CAPI void U_EXPORT2 uiter_setString(UCharIterator *iter, const char16_t *s, int32_t length) { - if(iter!=0) { - if(s!=0 && length>=-1) { + if (iter != nullptr) { + if (s != nullptr && length >= -1) { *iter=stringIterator; iter->context=s; if(length>=0) { @@ -283,7 +283,7 @@ utf16BEIteratorPrevious(UCharIterator *iter) { } static const UCharIterator utf16BEIterator={ - 0, 0, 0, 0, 0, 0, + nullptr, 0, 0, 0, 0, 0, stringIteratorGetIndex, stringIteratorMove, stringIteratorHasNext, @@ -457,7 +457,7 @@ characterIteratorSetState(UCharIterator *iter, uint32_t state, UErrorCode *pErro } static const UCharIterator characterIteratorWrapper={ - 0, 0, 0, 0, 0, 0, + nullptr, 0, 0, 0, 0, 0, characterIteratorGetIndex, characterIteratorMove, characterIteratorHasNext, @@ -472,8 +472,8 @@ static const UCharIterator characterIteratorWrapper={ U_CAPI void U_EXPORT2 uiter_setCharacterIterator(UCharIterator *iter, CharacterIterator *charIter) { - if(iter!=0) { - if(charIter!=0) { + if (iter != nullptr) { + if (charIter != nullptr) { *iter=characterIteratorWrapper; iter->context=charIter; } else { @@ -521,7 +521,7 @@ replaceableIteratorPrevious(UCharIterator *iter) { } static const UCharIterator replaceableIterator={ - 0, 0, 0, 0, 0, 0, + nullptr, 0, 0, 0, 0, 0, stringIteratorGetIndex, stringIteratorMove, stringIteratorHasNext, @@ -536,8 +536,8 @@ static const UCharIterator replaceableIterator={ U_CAPI void U_EXPORT2 uiter_setReplaceable(UCharIterator *iter, const Replaceable *rep) { - if(iter!=0) { - if(rep!=0) { + if (iter != nullptr) { + if (rep != nullptr) { *iter=replaceableIterator; iter->context=rep; iter->limit=iter->length=rep->length(); @@ -987,7 +987,7 @@ utf8IteratorSetState(UCharIterator *iter, } static const UCharIterator utf8Iterator={ - 0, 0, 0, 0, 0, 0, + nullptr, 0, 0, 0, 0, 0, utf8IteratorGetIndex, utf8IteratorMove, utf8IteratorHasNext, @@ -1002,8 +1002,8 @@ static const UCharIterator utf8Iterator={ U_CAPI void U_EXPORT2 uiter_setUTF8(UCharIterator *iter, const char *s, int32_t length) { - if(iter!=0) { - if(s!=0 && length>=-1) { + if (iter != nullptr) { + if (s != nullptr && length >= -1) { *iter=utf8Iterator; iter->context=s; if(length>=0) { diff --git a/contrib/libs/icu/common/uloc.cpp b/contrib/libs/icu/common/uloc.cpp index 395df1466e..88fe7eaadc 100644 --- a/contrib/libs/icu/common/uloc.cpp +++ b/contrib/libs/icu/common/uloc.cpp @@ -30,6 +30,8 @@ l = lang, C = ctry, M = charmap, V = variant */ +#include <optional> + #include "unicode/bytestream.h" #include "unicode/errorcode.h" #include "unicode/stringpiece.h" @@ -58,6 +60,8 @@ U_NAMESPACE_USE U_CFUNC void locale_set_default(const char *id); U_CFUNC const char *locale_get_default(); +namespace { + /* ### Data tables **************************************************/ /** @@ -94,7 +98,7 @@ U_CFUNC const char *locale_get_default(); /* Generated using org.unicode.cldr.icu.GenerateISO639LanguageTables */ /* ISO639 table version is 20150505 */ /* Subsequent hand addition of selected languages */ -static const char * const LANGUAGES[] = { +constexpr const char* LANGUAGES[] = { "aa", "ab", "ace", "ach", "ada", "ady", "ae", "aeb", "af", "afh", "agq", "ain", "ak", "akk", "akz", "ale", "aln", "alt", "am", "an", "ang", "anp", "ar", "arc", @@ -103,12 +107,12 @@ static const char * const LANGUAGES[] = { "ba", "bal", "ban", "bar", "bas", "bax", "bbc", "bbj", "be", "bej", "bem", "bew", "bez", "bfd", "bfq", "bg", "bgc", "bgn", "bho", "bi", "bik", "bin", "bjn", "bkm", "bla", - "bm", "bn", "bo", "bpy", "bqi", "br", "bra", "brh", + "blo", "bm", "bn", "bo", "bpy", "bqi", "br", "bra", "brh", "brx", "bs", "bss", "bua", "bug", "bum", "byn", "byv", "ca", "cad", "car", "cay", "cch", "ccp", "ce", "ceb", "cgg", "ch", "chb", "chg", "chk", "chm", "chn", "cho", "chp", "chr", "chy", "ckb", "co", "cop", "cps", "cr", "crh", - "cs", "csb", "cu", "cv", "cy", + "cs", "csb", "csw", "cu", "cv", "cy", "da", "dak", "dar", "dav", "de", "del", "den", "dgr", "din", "dje", "doi", "dsb", "dtp", "dua", "dum", "dv", "dyo", "dyu", "dz", "dzg", @@ -135,7 +139,7 @@ static const char * const LANGUAGES[] = { "kkj", "kl", "kln", "km", "kmb", "kn", "ko", "koi", "kok", "kos", "kpe", "kr", "krc", "kri", "krj", "krl", "kru", "ks", "ksb", "ksf", "ksh", "ku", "kum", "kut", - "kv", "kw", "ky", + "kv", "kw", "kxv", "ky", "la", "lad", "lag", "lah", "lam", "lb", "lez", "lfn", "lg", "li", "lij", "liv", "lkt", "lmo", "ln", "lo", "lol", "loz", "lrc", "lt", "ltg", "lu", "lua", "lui", @@ -169,14 +173,14 @@ static const char * const LANGUAGES[] = { "sv", "sw", "swb", "syc", "syr", "szl", "ta", "tcy", "te", "tem", "teo", "ter", "tet", "tg", "th", "ti", "tig", "tiv", "tk", "tkl", "tkr", - "tlh", "tli", "tly", "tmh", "tn", "to", "tog", "tpi", + "tlh", "tli", "tly", "tmh", "tn", "to", "tog", "tok", "tpi", "tr", "tru", "trv", "ts", "tsd", "tsi", "tt", "ttt", "tum", "tvl", "tw", "twq", "ty", "tyv", "tzm", "udm", "ug", "uga", "uk", "umb", "und", "ur", "uz", - "vai", "ve", "vec", "vep", "vi", "vls", "vmf", "vo", - "vot", "vro", "vun", + "vai", "ve", "vec", "vep", "vi", "vls", "vmf", "vmw", + "vo", "vot", "vro", "vun", "wa", "wae", "wal", "war", "was", "wbp", "wo", "wuu", - "xal", "xh", "xmf", "xog", + "xal", "xh", "xmf", "xnr", "xog", "yao", "yap", "yav", "ybb", "yi", "yo", "yrl", "yue", "za", "zap", "zbl", "zea", "zen", "zgh", "zh", "zu", "zun", "zxx", "zza", @@ -185,10 +189,10 @@ nullptr, nullptr }; -static const char* const DEPRECATED_LANGUAGES[]={ +constexpr const char* DEPRECATED_LANGUAGES[]={ "in", "iw", "ji", "jw", "mo", nullptr, nullptr }; -static const char* const REPLACEMENT_LANGUAGES[]={ +constexpr const char* REPLACEMENT_LANGUAGES[]={ "id", "he", "yi", "jv", "ro", nullptr, nullptr }; @@ -211,7 +215,7 @@ static const char* const REPLACEMENT_LANGUAGES[]={ /* Generated using org.unicode.cldr.icu.GenerateISO639LanguageTables */ /* ISO639 table version is 20150505 */ /* Subsequent hand addition of selected languages */ -static const char * const LANGUAGES_3[] = { +constexpr const char* LANGUAGES_3[] = { "aar", "abk", "ace", "ach", "ada", "ady", "ave", "aeb", "afr", "afh", "agq", "ain", "aka", "akk", "akz", "ale", "aln", "alt", "amh", "arg", "ang", "anp", "ara", "arc", @@ -220,12 +224,12 @@ static const char * const LANGUAGES_3[] = { "bak", "bal", "ban", "bar", "bas", "bax", "bbc", "bbj", "bel", "bej", "bem", "bew", "bez", "bfd", "bfq", "bul", "bgc", "bgn", "bho", "bis", "bik", "bin", "bjn", "bkm", "bla", - "bam", "ben", "bod", "bpy", "bqi", "bre", "bra", "brh", + "blo", "bam", "ben", "bod", "bpy", "bqi", "bre", "bra", "brh", "brx", "bos", "bss", "bua", "bug", "bum", "byn", "byv", "cat", "cad", "car", "cay", "cch", "ccp", "che", "ceb", "cgg", "cha", "chb", "chg", "chk", "chm", "chn", "cho", "chp", "chr", "chy", "ckb", "cos", "cop", "cps", "cre", "crh", - "ces", "csb", "chu", "chv", "cym", + "ces", "csb", "csw", "chu", "chv", "cym", "dan", "dak", "dar", "dav", "deu", "del", "den", "dgr", "din", "dje", "doi", "dsb", "dtp", "dua", "dum", "div", "dyo", "dyu", "dzo", "dzg", @@ -252,7 +256,7 @@ static const char * const LANGUAGES_3[] = { "kkj", "kal", "kln", "khm", "kmb", "kan", "kor", "koi", "kok", "kos", "kpe", "kau", "krc", "kri", "krj", "krl", "kru", "kas", "ksb", "ksf", "ksh", "kur", "kum", "kut", - "kom", "cor", "kir", + "kom", "cor", "kxv", "kir", "lat", "lad", "lag", "lah", "lam", "ltz", "lez", "lfn", "lug", "lim", "lij", "liv", "lkt", "lmo", "lin", "lao", "lol", "loz", "lrc", "lit", "ltg", "lub", "lua", "lui", @@ -286,14 +290,14 @@ static const char * const LANGUAGES_3[] = { "swe", "swa", "swb", "syc", "syr", "szl", "tam", "tcy", "tel", "tem", "teo", "ter", "tet", "tgk", "tha", "tir", "tig", "tiv", "tuk", "tkl", "tkr", - "tlh", "tli", "tly", "tmh", "tsn", "ton", "tog", "tpi", + "tlh", "tli", "tly", "tmh", "tsn", "ton", "tog", "tok", "tpi", "tur", "tru", "trv", "tso", "tsd", "tsi", "tat", "ttt", "tum", "tvl", "twi", "twq", "tah", "tyv", "tzm", "udm", "uig", "uga", "ukr", "umb", "und", "urd", "uzb", - "vai", "ven", "vec", "vep", "vie", "vls", "vmf", "vol", - "vot", "vro", "vun", + "vai", "ven", "vec", "vep", "vie", "vls", "vmf", "vmw", + "vol", "vot", "vro", "vun", "wln", "wae", "wal", "war", "was", "wbp", "wol", "wuu", - "xal", "xho", "xmf", "xog", + "xal", "xho", "xmf", "xnr", "xog", "yao", "yap", "yav", "ybb", "yid", "yor", "yrl", "yue", "zha", "zap", "zbl", "zea", "zen", "zgh", "zho", "zul", "zun", "zxx", "zza", @@ -327,7 +331,7 @@ nullptr * RO(ROM) is now RO(ROU) according to * http://www.iso.org/iso/en/prods-services/iso3166ma/03updates-on-iso-3166/nlv3e-rou.html */ -static const char * const COUNTRIES[] = { +constexpr const char* COUNTRIES[] = { "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", @@ -363,10 +367,10 @@ nullptr, nullptr }; -static const char* const DEPRECATED_COUNTRIES[] = { +constexpr const char* DEPRECATED_COUNTRIES[] = { "AN", "BU", "CS", "DD", "DY", "FX", "HV", "NH", "RH", "SU", "TP", "UK", "VD", "YD", "YU", "ZR", nullptr, nullptr /* deprecated country list */ }; -static const char* const REPLACEMENT_COUNTRIES[] = { +constexpr const char* REPLACEMENT_COUNTRIES[] = { /* "AN", "BU", "CS", "DD", "DY", "FX", "HV", "NH", "RH", "SU", "TP", "UK", "VD", "YD", "YU", "ZR" */ "CW", "MM", "RS", "DE", "BJ", "FR", "BF", "VU", "ZW", "RU", "TL", "GB", "VN", "YE", "RS", "CD", nullptr, nullptr /* replacement country codes */ }; @@ -384,7 +388,7 @@ static const char* const REPLACEMENT_COUNTRIES[] = { * second list, and another nullptr entry. The two lists correspond to * the two lists in COUNTRIES. */ -static const char * const COUNTRIES_3[] = { +constexpr const char* COUNTRIES_3[] = { /* "AD", "AE", "AF", "AG", "AI", "AL", "AM", */ "AND", "ARE", "AFG", "ATG", "AIA", "ALB", "ARM", /* "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", */ @@ -460,7 +464,7 @@ typedef struct CanonicalizationMap { * A map to canonicalize locale IDs. This handles a variety of * different semantic kinds of transformations. */ -static const CanonicalizationMap CANONICALIZE_MAP[] = { +constexpr CanonicalizationMap CANONICALIZE_MAP[] = { { "art__LOJBAN", "jbo" }, /* registered name */ { "hy__AREVELA", "hy" }, /* Registered IANA variant */ { "hy__AREVMDA", "hyw" }, /* Registered IANA variant */ @@ -475,34 +479,13 @@ static const CanonicalizationMap CANONICALIZE_MAP[] = { }; /* ### BCP47 Conversion *******************************************/ -/* Test if the locale id has BCP47 u extension and does not have '@' */ -#define _hasBCP47Extension(id) (id && uprv_strstr(id, "@") == nullptr && getShortestSubtagLength(localeID) == 1) -/* Converts the BCP47 id to Unicode id. Does nothing to id if conversion fails */ -static const char* _ConvertBCP47( - const char* id, char* buffer, int32_t length, - UErrorCode* err, int32_t* pLocaleIdSize) { - const char* finalID; - int32_t localeIDSize = uloc_forLanguageTag(id, buffer, length, nullptr, err); - if (localeIDSize <= 0 || U_FAILURE(*err) || *err == U_STRING_NOT_TERMINATED_WARNING) { - finalID=id; - if (*err == U_STRING_NOT_TERMINATED_WARNING) { - *err = U_BUFFER_OVERFLOW_ERROR; - } - } else { - finalID=buffer; - } - if (pLocaleIdSize != nullptr) { - *pLocaleIdSize = localeIDSize; - } - return finalID; -} /* Gets the size of the shortest subtag in the given localeID. */ -static int32_t getShortestSubtagLength(const char *localeID) { +int32_t getShortestSubtagLength(const char *localeID) { int32_t localeIDLength = static_cast<int32_t>(uprv_strlen(localeID)); int32_t length = localeIDLength; int32_t tmpLength = 0; int32_t i; - UBool reset = true; + bool reset = true; for (i = 0; i < localeIDLength; i++) { if (localeID[i] != '_' && localeID[i] != '-') { @@ -521,12 +504,18 @@ static int32_t getShortestSubtagLength(const char *localeID) { return length; } +/* Test if the locale id has BCP47 u extension and does not have '@' */ +inline bool _hasBCP47Extension(const char *id) { + return id != nullptr && uprv_strstr(id, "@") == nullptr && getShortestSubtagLength(id) == 1; +} /* ### Keywords **************************************************/ -#define UPRV_ISDIGIT(c) (((c) >= '0') && ((c) <= '9')) -#define UPRV_ISALPHANUM(c) (uprv_isASCIILetter(c) || UPRV_ISDIGIT(c) ) +inline bool UPRV_ISDIGIT(char c) { return c >= '0' && c <= '9'; } +inline bool UPRV_ISALPHANUM(char c) { return uprv_isASCIILetter(c) || UPRV_ISDIGIT(c); } /* Punctuation/symbols allowed in legacy key values */ -#define UPRV_OK_VALUE_PUNCTUATION(c) ((c) == '_' || (c) == '-' || (c) == '+' || (c) == '/') +inline bool UPRV_OK_VALUE_PUNCTUATION(char c) { return c == '_' || c == '-' || c == '+' || c == '/'; } + +} // namespace #define ULOC_KEYWORD_BUFFER_LEN 25 #define ULOC_MAX_NO_KEYWORDS 25 @@ -555,36 +544,31 @@ locale_getKeywordsStart(const char *localeID) { return nullptr; } +namespace { + /** - * @param buf buffer of size [ULOC_KEYWORD_BUFFER_LEN] * @param keywordName incoming name to be canonicalized * @param status return status (keyword too long) - * @return length of the keyword name + * @return the keyword name */ -static int32_t locale_canonKeywordName(char *buf, const char *keywordName, UErrorCode *status) +CharString locale_canonKeywordName(const char* keywordName, UErrorCode& status) { - int32_t keywordNameLen = 0; + if (U_FAILURE(status)) { return {}; } + CharString result; for (; *keywordName != 0; keywordName++) { if (!UPRV_ISALPHANUM(*keywordName)) { - *status = U_ILLEGAL_ARGUMENT_ERROR; /* malformed keyword name */ - return 0; - } - if (keywordNameLen < ULOC_KEYWORD_BUFFER_LEN - 1) { - buf[keywordNameLen++] = uprv_tolower(*keywordName); - } else { - /* keyword name too long for internal buffer */ - *status = U_INTERNAL_PROGRAM_ERROR; - return 0; + status = U_ILLEGAL_ARGUMENT_ERROR; /* malformed keyword name */ + return {}; } + result.append(uprv_tolower(*keywordName), status); } - if (keywordNameLen == 0) { - *status = U_ILLEGAL_ARGUMENT_ERROR; /* empty keyword name */ - return 0; + if (result.isEmpty()) { + status = U_ILLEGAL_ARGUMENT_ERROR; /* empty keyword name */ + return {}; } - buf[keywordNameLen] = 0; /* terminate */ - return keywordNameLen; + return result; } typedef struct { @@ -594,20 +578,41 @@ typedef struct { int32_t valueLen; } KeywordStruct; -static int32_t U_CALLCONV +int32_t U_CALLCONV compareKeywordStructs(const void * /*context*/, const void *left, const void *right) { const char* leftString = ((const KeywordStruct *)left)->keyword; const char* rightString = ((const KeywordStruct *)right)->keyword; return uprv_strcmp(leftString, rightString); } -U_CFUNC void -ulocimp_getKeywords(const char *localeID, +} // namespace + +U_EXPORT CharString +ulocimp_getKeywords(const char* localeID, + char prev, + bool valuesToo, + UErrorCode& status) +{ + return ByteSinkUtil::viaByteSinkToCharString( + [&](ByteSink& sink, UErrorCode& status) { + ulocimp_getKeywords(localeID, + prev, + sink, + valuesToo, + status); + }, + status); +} + +U_EXPORT void +ulocimp_getKeywords(const char* localeID, char prev, ByteSink& sink, - UBool valuesToo, - UErrorCode *status) + bool valuesToo, + UErrorCode& status) { + if (U_FAILURE(status)) { return; } + KeywordStruct keywordList[ULOC_MAX_NO_KEYWORDS]; int32_t maxKeywords = ULOC_MAX_NO_KEYWORDS; @@ -620,7 +625,7 @@ ulocimp_getKeywords(const char *localeID, if(prev == '@') { /* start of keyword definition */ /* we will grab pairs, trim spaces, lowercase keywords, sort and return */ do { - UBool duplicate = false; + bool duplicate = false; /* skip leading spaces */ while(*pos == ' ') { pos++; @@ -629,7 +634,7 @@ ulocimp_getKeywords(const char *localeID, break; } if(numKeywords == maxKeywords) { - *status = U_INTERNAL_PROGRAM_ERROR; + status = U_INTERNAL_PROGRAM_ERROR; return; } equalSign = uprv_strchr(pos, '='); @@ -637,13 +642,13 @@ ulocimp_getKeywords(const char *localeID, /* lack of '=' [foo@currency] is illegal */ /* ';' before '=' [foo@currency;collation=pinyin] is illegal */ if(!equalSign || (semicolon && semicolon<equalSign)) { - *status = U_INVALID_FORMAT_ERROR; + status = U_INVALID_FORMAT_ERROR; return; } /* need to normalize both keyword and keyword name */ if(equalSign - pos >= ULOC_KEYWORD_BUFFER_LEN) { /* keyword name too long for internal buffer */ - *status = U_INTERNAL_PROGRAM_ERROR; + status = U_INTERNAL_PROGRAM_ERROR; return; } for(i = 0, n = 0; i < equalSign - pos; ++i) { @@ -654,7 +659,7 @@ ulocimp_getKeywords(const char *localeID, /* zero-length keyword is an error. */ if (n == 0) { - *status = U_INVALID_FORMAT_ERROR; + status = U_INVALID_FORMAT_ERROR; return; } @@ -669,7 +674,7 @@ ulocimp_getKeywords(const char *localeID, /* Premature end or zero-length value */ if (!*equalSign || equalSign == semicolon) { - *status = U_INVALID_FORMAT_ERROR; + status = U_INVALID_FORMAT_ERROR; return; } @@ -704,7 +709,7 @@ ulocimp_getKeywords(const char *localeID, /* now we have a list of keywords */ /* we need to sort it */ - uprv_sortArray(keywordList, numKeywords, sizeof(KeywordStruct), compareKeywordStructs, nullptr, false, status); + uprv_sortArray(keywordList, numKeywords, sizeof(KeywordStruct), compareKeywordStructs, nullptr, false, &status); /* Now construct the keyword part */ for(i = 0; i < numKeywords; i++) { @@ -728,136 +733,127 @@ uloc_getKeywordValue(const char* localeID, char* buffer, int32_t bufferCapacity, UErrorCode* status) { - if (U_FAILURE(*status)) { - return 0; - } - - CheckedArrayByteSink sink(buffer, bufferCapacity); - ulocimp_getKeywordValue(localeID, keywordName, sink, status); - - int32_t reslen = sink.NumberOfBytesAppended(); - - if (U_FAILURE(*status)) { - return reslen; - } - - if (sink.Overflowed()) { - *status = U_BUFFER_OVERFLOW_ERROR; - } else { - u_terminateChars(buffer, bufferCapacity, reslen, status); - } + return ByteSinkUtil::viaByteSinkToTerminatedChars( + buffer, bufferCapacity, + [&](ByteSink& sink, UErrorCode& status) { + ulocimp_getKeywordValue(localeID, keywordName, sink, status); + }, + *status); +} - return reslen; +U_EXPORT CharString +ulocimp_getKeywordValue(const char* localeID, + const char* keywordName, + UErrorCode& status) +{ + return ByteSinkUtil::viaByteSinkToCharString( + [&](ByteSink& sink, UErrorCode& status) { + ulocimp_getKeywordValue(localeID, keywordName, sink, status); + }, + status); } -U_CAPI void U_EXPORT2 +U_EXPORT void ulocimp_getKeywordValue(const char* localeID, const char* keywordName, icu::ByteSink& sink, - UErrorCode* status) + UErrorCode& status) { + if (U_FAILURE(status)) { return; } + + if (localeID == nullptr || keywordName == nullptr || keywordName[0] == 0) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + const char* startSearchHere = nullptr; const char* nextSeparator = nullptr; - char keywordNameBuffer[ULOC_KEYWORD_BUFFER_LEN]; - char localeKeywordNameBuffer[ULOC_KEYWORD_BUFFER_LEN]; - if(status && U_SUCCESS(*status) && localeID) { - char tempBuffer[ULOC_FULLNAME_CAPACITY]; - const char* tmpLocaleID; + CharString tempBuffer; + const char* tmpLocaleID; - if (keywordName == nullptr || keywordName[0] == 0) { - *status = U_ILLEGAL_ARGUMENT_ERROR; - return; - } + CharString canonKeywordName = locale_canonKeywordName(keywordName, status); + if (U_FAILURE(status)) { + return; + } + + if (_hasBCP47Extension(localeID)) { + tempBuffer = ulocimp_forLanguageTag(localeID, -1, nullptr, status); + tmpLocaleID = U_SUCCESS(status) && !tempBuffer.isEmpty() ? tempBuffer.data() : localeID; + } else { + tmpLocaleID=localeID; + } - locale_canonKeywordName(keywordNameBuffer, keywordName, status); - if(U_FAILURE(*status)) { + startSearchHere = locale_getKeywordsStart(tmpLocaleID); + if(startSearchHere == nullptr) { + /* no keywords, return at once */ return; - } - - if (_hasBCP47Extension(localeID)) { - tmpLocaleID = _ConvertBCP47(localeID, tempBuffer, - sizeof(tempBuffer), status, nullptr); - } else { - tmpLocaleID=localeID; - } - - startSearchHere = locale_getKeywordsStart(tmpLocaleID); - if(startSearchHere == nullptr) { - /* no keywords, return at once */ - return; - } - - /* find the first keyword */ - while(startSearchHere) { - const char* keyValueTail; - int32_t keyValueLen; - - startSearchHere++; /* skip @ or ; */ - nextSeparator = uprv_strchr(startSearchHere, '='); - if(!nextSeparator) { - *status = U_ILLEGAL_ARGUMENT_ERROR; /* key must have =value */ - return; - } - /* strip leading & trailing spaces (TC decided to tolerate these) */ - while(*startSearchHere == ' ') { - startSearchHere++; + } + + /* find the first keyword */ + while(startSearchHere) { + const char* keyValueTail; + + startSearchHere++; /* skip @ or ; */ + nextSeparator = uprv_strchr(startSearchHere, '='); + if(!nextSeparator) { + status = U_ILLEGAL_ARGUMENT_ERROR; /* key must have =value */ + return; + } + /* strip leading & trailing spaces (TC decided to tolerate these) */ + while(*startSearchHere == ' ') { + startSearchHere++; + } + keyValueTail = nextSeparator; + while (keyValueTail > startSearchHere && *(keyValueTail-1) == ' ') { + keyValueTail--; + } + /* now keyValueTail points to first char after the keyName */ + /* copy & normalize keyName from locale */ + if (startSearchHere == keyValueTail) { + status = U_ILLEGAL_ARGUMENT_ERROR; /* empty keyword name in passed-in locale */ + return; + } + CharString localeKeywordName; + while (startSearchHere < keyValueTail) { + if (!UPRV_ISALPHANUM(*startSearchHere)) { + status = U_ILLEGAL_ARGUMENT_ERROR; /* malformed keyword name */ + return; } - keyValueTail = nextSeparator; - while (keyValueTail > startSearchHere && *(keyValueTail-1) == ' ') { + localeKeywordName.append(uprv_tolower(*startSearchHere++), status); + } + if (U_FAILURE(status)) { + return; + } + + startSearchHere = uprv_strchr(nextSeparator, ';'); + + if (canonKeywordName == localeKeywordName) { + /* current entry matches the keyword. */ + nextSeparator++; /* skip '=' */ + /* First strip leading & trailing spaces (TC decided to tolerate these) */ + while(*nextSeparator == ' ') { + nextSeparator++; + } + keyValueTail = (startSearchHere)? startSearchHere: nextSeparator + uprv_strlen(nextSeparator); + while(keyValueTail > nextSeparator && *(keyValueTail-1) == ' ') { keyValueTail--; - } - /* now keyValueTail points to first char after the keyName */ - /* copy & normalize keyName from locale */ - if (startSearchHere == keyValueTail) { - *status = U_ILLEGAL_ARGUMENT_ERROR; /* empty keyword name in passed-in locale */ - return; - } - keyValueLen = 0; - while (startSearchHere < keyValueTail) { - if (!UPRV_ISALPHANUM(*startSearchHere)) { - *status = U_ILLEGAL_ARGUMENT_ERROR; /* malformed keyword name */ - return; } - if (keyValueLen < ULOC_KEYWORD_BUFFER_LEN - 1) { - localeKeywordNameBuffer[keyValueLen++] = uprv_tolower(*startSearchHere++); - } else { - /* keyword name too long for internal buffer */ - *status = U_INTERNAL_PROGRAM_ERROR; + /* Now copy the value, but check well-formedness */ + if (nextSeparator == keyValueTail) { + status = U_ILLEGAL_ARGUMENT_ERROR; /* empty key value name in passed-in locale */ return; } - } - localeKeywordNameBuffer[keyValueLen] = 0; /* terminate */ - - startSearchHere = uprv_strchr(nextSeparator, ';'); - - if(uprv_strcmp(keywordNameBuffer, localeKeywordNameBuffer) == 0) { - /* current entry matches the keyword. */ - nextSeparator++; /* skip '=' */ - /* First strip leading & trailing spaces (TC decided to tolerate these) */ - while(*nextSeparator == ' ') { - nextSeparator++; - } - keyValueTail = (startSearchHere)? startSearchHere: nextSeparator + uprv_strlen(nextSeparator); - while(keyValueTail > nextSeparator && *(keyValueTail-1) == ' ') { - keyValueTail--; - } - /* Now copy the value, but check well-formedness */ - if (nextSeparator == keyValueTail) { - *status = U_ILLEGAL_ARGUMENT_ERROR; /* empty key value name in passed-in locale */ + while (nextSeparator < keyValueTail) { + if (!UPRV_ISALPHANUM(*nextSeparator) && !UPRV_OK_VALUE_PUNCTUATION(*nextSeparator)) { + status = U_ILLEGAL_ARGUMENT_ERROR; /* malformed key value */ return; } - while (nextSeparator < keyValueTail) { - if (!UPRV_ISALPHANUM(*nextSeparator) && !UPRV_OK_VALUE_PUNCTUATION(*nextSeparator)) { - *status = U_ILLEGAL_ARGUMENT_ERROR; /* malformed key value */ - return; - } - /* Should we lowercase value to return here? Tests expect as-is. */ - sink.Append(nextSeparator++, 1); - } - return; - } - } + /* Should we lowercase value to return here? Tests expect as-is. */ + sink.Append(nextSeparator++, 1); + } + return; + } } } @@ -867,100 +863,136 @@ uloc_setKeywordValue(const char* keywordName, char* buffer, int32_t bufferCapacity, UErrorCode* status) { - /* TODO: sorting. removal. */ - int32_t keywordNameLen; - int32_t keywordValueLen; - int32_t bufLen; - int32_t needLen = 0; - char keywordNameBuffer[ULOC_KEYWORD_BUFFER_LEN]; - char keywordValueBuffer[ULOC_KEYWORDS_CAPACITY+1]; - char localeKeywordNameBuffer[ULOC_KEYWORD_BUFFER_LEN]; - int32_t rc; - char* nextSeparator = nullptr; - char* nextEqualsign = nullptr; - char* startSearchHere = nullptr; - char* keywordStart = nullptr; - CharString updatedKeysAndValues; - UBool handledInputKeyAndValue = false; - char keyValuePrefix = '@'; + if (U_FAILURE(*status)) { return 0; } - if(U_FAILURE(*status)) { - return -1; - } - if (*status == U_STRING_NOT_TERMINATED_WARNING) { - *status = U_ZERO_ERROR; - } - if (keywordName == nullptr || keywordName[0] == 0 || bufferCapacity <= 1) { + if (bufferCapacity <= 1) { *status = U_ILLEGAL_ARGUMENT_ERROR; return 0; } - bufLen = (int32_t)uprv_strlen(buffer); + + int32_t bufLen = (int32_t)uprv_strlen(buffer); if(bufferCapacity<bufLen) { /* The capacity is less than the length?! Is this NUL terminated? */ *status = U_ILLEGAL_ARGUMENT_ERROR; return 0; } - keywordNameLen = locale_canonKeywordName(keywordNameBuffer, keywordName, status); - if(U_FAILURE(*status)) { + + char* keywords = const_cast<char*>(locale_getKeywordsStart(buffer)); + int32_t baseLen = keywords == nullptr ? bufLen : keywords - buffer; + // Remove -1 from the capacity so that this function can guarantee NUL termination. + CheckedArrayByteSink sink(keywords == nullptr ? buffer + bufLen : keywords, + bufferCapacity - baseLen - 1); + int32_t reslen = ulocimp_setKeywordValue( + keywords, keywordName, keywordValue, sink, *status); + + if (U_FAILURE(*status)) { + return *status == U_BUFFER_OVERFLOW_ERROR ? reslen + baseLen : 0; + } + + // See the documentation for this function, it's guaranteed to never + // overflow the buffer but instead abort with BUFFER_OVERFLOW_ERROR. + // In this case, nothing has been written to the sink, so it cannot have Overflowed(). + U_ASSERT(!sink.Overflowed()); + U_ASSERT(reslen >= 0); + return u_terminateChars(buffer, bufferCapacity, reslen + baseLen, status); +} + +U_EXPORT void +ulocimp_setKeywordValue(const char* keywordName, + const char* keywordValue, + CharString& localeID, + UErrorCode& status) +{ + if (U_FAILURE(status)) { return; } + // This is safe because CharString::truncate() doesn't actually erase any + // data, but simply sets the position for where new data will be written. + const char* keywords = locale_getKeywordsStart(localeID.data()); + if (keywords != nullptr) localeID.truncate(keywords - localeID.data()); + CharStringByteSink sink(&localeID); + ulocimp_setKeywordValue(keywords, keywordName, keywordValue, sink, status); +} + +U_EXPORT int32_t +ulocimp_setKeywordValue(const char* keywords, + const char* keywordName, + const char* keywordValue, + ByteSink& sink, + UErrorCode& status) +{ + if (U_FAILURE(status)) { return 0; } + + /* TODO: sorting. removal. */ + int32_t needLen = 0; + int32_t rc; + const char* nextSeparator = nullptr; + const char* nextEqualsign = nullptr; + const char* keywordStart = nullptr; + CharString updatedKeysAndValues; + bool handledInputKeyAndValue = false; + char keyValuePrefix = '@'; + + if (status == U_STRING_NOT_TERMINATED_WARNING) { + status = U_ZERO_ERROR; + } + if (keywordName == nullptr || keywordName[0] == 0) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + CharString canonKeywordName = locale_canonKeywordName(keywordName, status); + if (U_FAILURE(status)) { return 0; } - keywordValueLen = 0; + CharString canonKeywordValue; if(keywordValue) { while (*keywordValue != 0) { if (!UPRV_ISALPHANUM(*keywordValue) && !UPRV_OK_VALUE_PUNCTUATION(*keywordValue)) { - *status = U_ILLEGAL_ARGUMENT_ERROR; /* malformed key value */ - return 0; - } - if (keywordValueLen < ULOC_KEYWORDS_CAPACITY) { - /* Should we force lowercase in value to set? */ - keywordValueBuffer[keywordValueLen++] = *keywordValue++; - } else { - /* keywordValue too long for internal buffer */ - *status = U_INTERNAL_PROGRAM_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; /* malformed key value */ return 0; } + /* Should we force lowercase in value to set? */ + canonKeywordValue.append(*keywordValue++, status); } } - keywordValueBuffer[keywordValueLen] = 0; /* terminate */ + if (U_FAILURE(status)) { + return 0; + } - startSearchHere = (char*)locale_getKeywordsStart(buffer); - if(startSearchHere == nullptr || (startSearchHere[1]==0)) { - if(keywordValueLen == 0) { /* no keywords = nothing to remove */ - U_ASSERT(*status != U_STRING_NOT_TERMINATED_WARNING); - return bufLen; + if (keywords == nullptr || keywords[1] == '\0') { + if (canonKeywordValue.isEmpty()) { /* no keywords = nothing to remove */ + U_ASSERT(status != U_STRING_NOT_TERMINATED_WARNING); + return 0; } - needLen = bufLen+1+keywordNameLen+1+keywordValueLen; - if(startSearchHere) { /* had a single @ */ - needLen--; /* already had the @ */ - /* startSearchHere points at the @ */ - } else { - startSearchHere=buffer+bufLen; - } - if(needLen >= bufferCapacity) { - *status = U_BUFFER_OVERFLOW_ERROR; + needLen = 1 + canonKeywordName.length() + 1 + canonKeywordValue.length(); + int32_t capacity = 0; + char* buffer = sink.GetAppendBuffer( + needLen, needLen, nullptr, needLen, &capacity); + if (capacity < needLen || buffer == nullptr) { + status = U_BUFFER_OVERFLOW_ERROR; return needLen; /* no change */ } - *startSearchHere++ = '@'; - uprv_strcpy(startSearchHere, keywordNameBuffer); - startSearchHere += keywordNameLen; - *startSearchHere++ = '='; - uprv_strcpy(startSearchHere, keywordValueBuffer); - U_ASSERT(*status != U_STRING_NOT_TERMINATED_WARNING); + char* it = buffer; + + *it++ = '@'; + uprv_memcpy(it, canonKeywordName.data(), canonKeywordName.length()); + it += canonKeywordName.length(); + *it++ = '='; + uprv_memcpy(it, canonKeywordValue.data(), canonKeywordValue.length()); + sink.Append(buffer, needLen); + U_ASSERT(status != U_STRING_NOT_TERMINATED_WARNING); return needLen; } /* end shortcut - no @ */ - keywordStart = startSearchHere; + keywordStart = keywords; /* search for keyword */ while(keywordStart) { const char* keyValueTail; - int32_t keyValueLen; keywordStart++; /* skip @ or ; */ nextEqualsign = uprv_strchr(keywordStart, '='); if (!nextEqualsign) { - *status = U_ILLEGAL_ARGUMENT_ERROR; /* key must have =value */ + status = U_ILLEGAL_ARGUMENT_ERROR; /* key must have =value */ return 0; } /* strip leading & trailing spaces (TC decided to tolerate these) */ @@ -974,24 +1006,20 @@ uloc_setKeywordValue(const char* keywordName, /* now keyValueTail points to first char after the keyName */ /* copy & normalize keyName from locale */ if (keywordStart == keyValueTail) { - *status = U_ILLEGAL_ARGUMENT_ERROR; /* empty keyword name in passed-in locale */ + status = U_ILLEGAL_ARGUMENT_ERROR; /* empty keyword name in passed-in locale */ return 0; } - keyValueLen = 0; + CharString localeKeywordName; while (keywordStart < keyValueTail) { if (!UPRV_ISALPHANUM(*keywordStart)) { - *status = U_ILLEGAL_ARGUMENT_ERROR; /* malformed keyword name */ - return 0; - } - if (keyValueLen < ULOC_KEYWORD_BUFFER_LEN - 1) { - localeKeywordNameBuffer[keyValueLen++] = uprv_tolower(*keywordStart++); - } else { - /* keyword name too long for internal buffer */ - *status = U_INTERNAL_PROGRAM_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; /* malformed keyword name */ return 0; } + localeKeywordName.append(uprv_tolower(*keywordStart++), status); + } + if (U_FAILURE(status)) { + return 0; } - localeKeywordNameBuffer[keyValueLen] = 0; /* terminate */ nextSeparator = uprv_strchr(nextEqualsign, ';'); @@ -1006,46 +1034,46 @@ uloc_setKeywordValue(const char* keywordName, keyValueTail--; } if (nextEqualsign == keyValueTail) { - *status = U_ILLEGAL_ARGUMENT_ERROR; /* empty key value in passed-in locale */ + status = U_ILLEGAL_ARGUMENT_ERROR; /* empty key value in passed-in locale */ return 0; } - rc = uprv_strcmp(keywordNameBuffer, localeKeywordNameBuffer); + rc = uprv_strcmp(canonKeywordName.data(), localeKeywordName.data()); if(rc == 0) { /* Current entry matches the input keyword. Update the entry */ - if(keywordValueLen > 0) { /* updating a value */ - updatedKeysAndValues.append(keyValuePrefix, *status); + if (!canonKeywordValue.isEmpty()) { /* updating a value */ + updatedKeysAndValues.append(keyValuePrefix, status); keyValuePrefix = ';'; /* for any subsequent key-value pair */ - updatedKeysAndValues.append(keywordNameBuffer, keywordNameLen, *status); - updatedKeysAndValues.append('=', *status); - updatedKeysAndValues.append(keywordValueBuffer, keywordValueLen, *status); + updatedKeysAndValues.append(canonKeywordName, status); + updatedKeysAndValues.append('=', status); + updatedKeysAndValues.append(canonKeywordValue, status); } /* else removing this entry, don't emit anything */ handledInputKeyAndValue = true; } else { /* input keyword sorts earlier than current entry, add before current entry */ - if (rc < 0 && keywordValueLen > 0 && !handledInputKeyAndValue) { + if (rc < 0 && !canonKeywordValue.isEmpty() && !handledInputKeyAndValue) { /* insert new entry at this location */ - updatedKeysAndValues.append(keyValuePrefix, *status); + updatedKeysAndValues.append(keyValuePrefix, status); keyValuePrefix = ';'; /* for any subsequent key-value pair */ - updatedKeysAndValues.append(keywordNameBuffer, keywordNameLen, *status); - updatedKeysAndValues.append('=', *status); - updatedKeysAndValues.append(keywordValueBuffer, keywordValueLen, *status); + updatedKeysAndValues.append(canonKeywordName, status); + updatedKeysAndValues.append('=', status); + updatedKeysAndValues.append(canonKeywordValue, status); handledInputKeyAndValue = true; } /* copy the current entry */ - updatedKeysAndValues.append(keyValuePrefix, *status); + updatedKeysAndValues.append(keyValuePrefix, status); keyValuePrefix = ';'; /* for any subsequent key-value pair */ - updatedKeysAndValues.append(localeKeywordNameBuffer, keyValueLen, *status); - updatedKeysAndValues.append('=', *status); - updatedKeysAndValues.append(nextEqualsign, static_cast<int32_t>(keyValueTail-nextEqualsign), *status); + updatedKeysAndValues.append(localeKeywordName, status); + updatedKeysAndValues.append('=', status); + updatedKeysAndValues.append(nextEqualsign, static_cast<int32_t>(keyValueTail-nextEqualsign), status); } - if (!nextSeparator && keywordValueLen > 0 && !handledInputKeyAndValue) { + if (!nextSeparator && !canonKeywordValue.isEmpty() && !handledInputKeyAndValue) { /* append new entry at the end, it sorts later than existing entries */ - updatedKeysAndValues.append(keyValuePrefix, *status); + updatedKeysAndValues.append(keyValuePrefix, status); /* skip keyValuePrefix update, no subsequent key-value pair */ - updatedKeysAndValues.append(keywordNameBuffer, keywordNameLen, *status); - updatedKeysAndValues.append('=', *status); - updatedKeysAndValues.append(keywordValueBuffer, keywordValueLen, *status); + updatedKeysAndValues.append(canonKeywordName, status); + updatedKeysAndValues.append('=', status); + updatedKeysAndValues.append(canonKeywordValue, status); handledInputKeyAndValue = true; } keywordStart = nextSeparator; @@ -1059,44 +1087,57 @@ uloc_setKeywordValue(const char* keywordName, * error return but the passed-in locale is unmodified and the original bufLen is * returned. */ - if (!handledInputKeyAndValue || U_FAILURE(*status)) { + if (!handledInputKeyAndValue || U_FAILURE(status)) { /* if input key/value specified removal of a keyword not present in locale, or * there was an error in CharString.append, leave original locale alone. */ - U_ASSERT(*status != U_STRING_NOT_TERMINATED_WARNING); - return bufLen; + U_ASSERT(status != U_STRING_NOT_TERMINATED_WARNING); + return (int32_t)uprv_strlen(keywords); } - // needLen = length of the part before '@' - needLen = (int32_t)(startSearchHere - buffer); - // Check to see can we fit the startSearchHere, if not, return + needLen = updatedKeysAndValues.length(); + // Check to see can we fit the updatedKeysAndValues, if not, return // U_BUFFER_OVERFLOW_ERROR without copy updatedKeysAndValues into it. // We do this because this API function does not behave like most others: // It promises never to set a U_STRING_NOT_TERMINATED_WARNING. // When the contents fits but without the terminating NUL, in this case we need to not change // the buffer contents and return with a buffer overflow error. - int32_t appendLength = updatedKeysAndValues.length(); - if (appendLength >= bufferCapacity - needLen) { - *status = U_BUFFER_OVERFLOW_ERROR; - return needLen + appendLength; - } - needLen += updatedKeysAndValues.extract( - startSearchHere, bufferCapacity - needLen, *status); - U_ASSERT(*status != U_STRING_NOT_TERMINATED_WARNING); + if (needLen > 0) { + int32_t capacity = 0; + char* buffer = sink.GetAppendBuffer( + needLen, needLen, nullptr, needLen, &capacity); + if (capacity < needLen || buffer == nullptr) { + status = U_BUFFER_OVERFLOW_ERROR; + return needLen; + } + uprv_memcpy(buffer, updatedKeysAndValues.data(), needLen); + sink.Append(buffer, needLen); + } + U_ASSERT(status != U_STRING_NOT_TERMINATED_WARNING); return needLen; } /* ### ID parsing implementation **************************************************/ -#define _isPrefixLetter(a) ((a=='x')||(a=='X')||(a=='i')||(a=='I')) +namespace { + +inline bool _isPrefixLetter(char a) { return a == 'x' || a == 'X' || a == 'i' || a == 'I'; } /*returns true if one of the special prefixes is here (s=string) 'x-' or 'i-' */ -#define _isIDPrefix(s) (_isPrefixLetter(s[0])&&_isIDSeparator(s[1])) +inline bool _isIDPrefix(const char *s) { return _isPrefixLetter(s[0]) && _isIDSeparator(s[1]); } /* Dot terminates it because of POSIX form where dot precedes the codepage * except for variant */ -#define _isTerminator(a) ((a==0)||(a=='.')||(a=='@')) +inline bool _isTerminator(char a) { return a == 0 || a == '.' || a == '@'; } + +inline bool _isBCP47Extension(const char* p) { + return p[0] == '-' && + (p[1] == 't' || p[1] == 'T' || + p[1] == 'u' || p[1] == 'U' || + p[1] == 'x' || p[1] == 'X') && + p[2] == '-'; +} /** * Lookup 'key' in the array 'list'. The array 'list' should contain @@ -1105,7 +1146,7 @@ uloc_setKeywordValue(const char* keywordName, * The 'list' param should be LANGUAGES, LANGUAGES_3, COUNTRIES, or * COUNTRIES_3. */ -static int16_t _findIndex(const char* const* list, const char* key) +std::optional<int16_t> _findIndex(const char* const* list, const char* key) { const char* const* anchor = list; int32_t pass = 0; @@ -1120,38 +1161,40 @@ static int16_t _findIndex(const char* const* list, const char* key) } ++list; /* skip final nullptr *CWB*/ } - return -1; + return std::nullopt; } +} // namespace + U_CFUNC const char* uloc_getCurrentCountryID(const char* oldID){ - int32_t offset = _findIndex(DEPRECATED_COUNTRIES, oldID); - if (offset >= 0) { - return REPLACEMENT_COUNTRIES[offset]; - } - return oldID; + std::optional<int16_t> offset = _findIndex(DEPRECATED_COUNTRIES, oldID); + return offset.has_value() ? REPLACEMENT_COUNTRIES[*offset] : oldID; } U_CFUNC const char* uloc_getCurrentLanguageID(const char* oldID){ - int32_t offset = _findIndex(DEPRECATED_LANGUAGES, oldID); - if (offset >= 0) { - return REPLACEMENT_LANGUAGES[offset]; - } - return oldID; + std::optional<int16_t> offset = _findIndex(DEPRECATED_LANGUAGES, oldID); + return offset.has_value() ? REPLACEMENT_LANGUAGES[*offset] : oldID; } + +namespace { + /* - * the internal functions _getLanguage(), _getCountry(), _getVariant() + * the internal functions _getLanguage(), _getScript(), _getRegion(), _getVariant() * avoid duplicating code to handle the earlier locale ID pieces * in the functions for the later ones by * setting the *pEnd pointer to where they stopped parsing * * TODO try to use this in Locale */ -CharString U_EXPORT2 -ulocimp_getLanguage(const char *localeID, - const char **pEnd, - UErrorCode &status) { - CharString result; + +void +_getLanguage(const char* localeID, + ByteSink* sink, + const char** pEnd, + UErrorCode& status) { + U_ASSERT(pEnd != nullptr); + *pEnd = localeID; if (uprv_stricmp(localeID, "root") == 0) { localeID += 4; @@ -1163,150 +1206,381 @@ ulocimp_getLanguage(const char *localeID, localeID += 3; } + constexpr int32_t MAXLEN = ULOC_LANG_CAPACITY - 1; // Minus NUL. + /* if it starts with i- or x- then copy that prefix */ - if(_isIDPrefix(localeID)) { - result.append((char)uprv_tolower(*localeID), status); - result.append('-', status); - localeID+=2; + int32_t len = _isIDPrefix(localeID) ? 2 : 0; + while (!_isTerminator(localeID[len]) && !_isIDSeparator(localeID[len])) { + if (len == MAXLEN) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + len++; } - /* copy the language as far as possible and count its length */ - while(!_isTerminator(*localeID) && !_isIDSeparator(*localeID)) { - result.append((char)uprv_tolower(*localeID), status); - localeID++; + *pEnd = localeID + len; + if (sink == nullptr || len == 0) { return; } + + int32_t minCapacity = uprv_max(len, 4); // Minimum 3 letters plus NUL. + char scratch[MAXLEN]; + int32_t capacity = 0; + char* buffer = sink->GetAppendBuffer( + minCapacity, minCapacity, scratch, UPRV_LENGTHOF(scratch), &capacity); + + for (int32_t i = 0; i < len; ++i) { + buffer[i] = uprv_tolower(localeID[i]); + } + if (_isIDSeparator(localeID[1])) { + buffer[1] = '-'; } - if(result.length()==3) { + if (len == 3) { /* convert 3 character code to 2 character code if possible *CWB*/ - int32_t offset = _findIndex(LANGUAGES_3, result.data()); - if(offset>=0) { - result.clear(); - result.append(LANGUAGES[offset], status); + U_ASSERT(capacity >= 4); + buffer[3] = '\0'; + std::optional<int16_t> offset = _findIndex(LANGUAGES_3, buffer); + if (offset.has_value()) { + const char* const alias = LANGUAGES[*offset]; + sink->Append(alias, (int32_t)uprv_strlen(alias)); + return; } } - if(pEnd!=nullptr) { - *pEnd=localeID; - } - - return result; + sink->Append(buffer, len); } -CharString U_EXPORT2 -ulocimp_getScript(const char *localeID, - const char **pEnd, - UErrorCode &status) { - CharString result; - int32_t idLen = 0; +void +_getScript(const char* localeID, + ByteSink* sink, + const char** pEnd) { + U_ASSERT(pEnd != nullptr); + *pEnd = localeID; - if (pEnd != nullptr) { - *pEnd = localeID; - } + constexpr int32_t LENGTH = 4; - /* copy the second item as far as possible and count its length */ - while(!_isTerminator(localeID[idLen]) && !_isIDSeparator(localeID[idLen]) - && uprv_isASCIILetter(localeID[idLen])) { - idLen++; + int32_t len = 0; + while (!_isTerminator(localeID[len]) && !_isIDSeparator(localeID[len]) && + uprv_isASCIILetter(localeID[len])) { + if (len == LENGTH) { return; } + len++; } + if (len != LENGTH) { return; } - /* If it's exactly 4 characters long, then it's a script and not a country. */ - if (idLen == 4) { - int32_t i; - if (pEnd != nullptr) { - *pEnd = localeID+idLen; - } - if (idLen >= 1) { - result.append((char)uprv_toupper(*(localeID++)), status); - } - for (i = 1; i < idLen; i++) { - result.append((char)uprv_tolower(*(localeID++)), status); - } + *pEnd = localeID + LENGTH; + if (sink == nullptr) { return; } + + char scratch[LENGTH]; + int32_t capacity = 0; + char* buffer = sink->GetAppendBuffer( + LENGTH, LENGTH, scratch, UPRV_LENGTHOF(scratch), &capacity); + + buffer[0] = uprv_toupper(localeID[0]); + for (int32_t i = 1; i < LENGTH; ++i) { + buffer[i] = uprv_tolower(localeID[i]); } - return result; + sink->Append(buffer, LENGTH); } -CharString U_EXPORT2 -ulocimp_getCountry(const char *localeID, - const char **pEnd, - UErrorCode &status) { - CharString result; - int32_t idLen=0; +void +_getRegion(const char* localeID, + ByteSink* sink, + const char** pEnd) { + U_ASSERT(pEnd != nullptr); + *pEnd = localeID; - /* copy the country as far as possible and count its length */ - while(!_isTerminator(localeID[idLen]) && !_isIDSeparator(localeID[idLen])) { - result.append((char)uprv_toupper(localeID[idLen]), status); - idLen++; + constexpr int32_t MINLEN = 2; + constexpr int32_t MAXLEN = ULOC_COUNTRY_CAPACITY - 1; // Minus NUL. + + int32_t len = 0; + while (!_isTerminator(localeID[len]) && !_isIDSeparator(localeID[len])) { + if (len == MAXLEN) { return; } + len++; } + if (len < MINLEN) { return; } - /* the country should be either length 2 or 3 */ - if (idLen == 2 || idLen == 3) { - /* convert 3 character code to 2 character code if possible *CWB*/ - if(idLen==3) { - int32_t offset = _findIndex(COUNTRIES_3, result.data()); - if(offset>=0) { - result.clear(); - result.append(COUNTRIES[offset], status); - } - } - localeID+=idLen; - } else { - result.clear(); + *pEnd = localeID + len; + if (sink == nullptr) { return; } + + char scratch[ULOC_COUNTRY_CAPACITY]; + int32_t capacity = 0; + char* buffer = sink->GetAppendBuffer( + ULOC_COUNTRY_CAPACITY, + ULOC_COUNTRY_CAPACITY, + scratch, + UPRV_LENGTHOF(scratch), + &capacity); + + for (int32_t i = 0; i < len; ++i) { + buffer[i] = uprv_toupper(localeID[i]); } - if(pEnd!=nullptr) { - *pEnd=localeID; + if (len == 3) { + /* convert 3 character code to 2 character code if possible *CWB*/ + U_ASSERT(capacity >= 4); + buffer[3] = '\0'; + std::optional<int16_t> offset = _findIndex(COUNTRIES_3, buffer); + if (offset.has_value()) { + const char* const alias = COUNTRIES[*offset]; + sink->Append(alias, (int32_t)uprv_strlen(alias)); + return; + } } - return result; + sink->Append(buffer, len); } /** * @param needSeparator if true, then add leading '_' if any variants * are added to 'variant' */ -static void -_getVariant(const char *localeID, +void +_getVariant(const char* localeID, char prev, - ByteSink& sink, - UBool needSeparator) { - UBool hasVariant = false; + ByteSink* sink, + const char** pEnd, + bool needSeparator, + UErrorCode& status) { + if (U_FAILURE(status)) return; + if (pEnd != nullptr) { *pEnd = localeID; } + + // Reasonable upper limit for variants + // There are no strict limitation of the syntax of variant in the legacy + // locale format. If the locale is constructed from unicode_locale_id + // as defined in UTS35, then we know each unicode_variant_subtag + // could have max length of 8 ((alphanum{5,8} | digit alphanum{3}) + // 179 would allow 20 unicode_variant_subtag with sep in the + // unicode_locale_id + // 8*20 + 1*(20-1) = 179 + constexpr int32_t MAX_VARIANTS_LENGTH = 179; /* get one or more variant tags and separate them with '_' */ - if(_isIDSeparator(prev)) { + int32_t index = 0; + if (_isIDSeparator(prev)) { /* get a variant string after a '-' or '_' */ - while(!_isTerminator(*localeID)) { + for (index=0; !_isTerminator(localeID[index]); index++) { + if (index >= MAX_VARIANTS_LENGTH) { // same as length > MAX_VARIANTS_LENGTH + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } if (needSeparator) { - sink.Append("_", 1); + if (sink != nullptr) { + sink->Append("_", 1); + } needSeparator = false; } - char c = (char)uprv_toupper(*localeID); - if (c == '-') c = '_'; - sink.Append(&c, 1); - hasVariant = true; - localeID++; + if (sink != nullptr) { + char c = (char)uprv_toupper(localeID[index]); + if (c == '-') c = '_'; + sink->Append(&c, 1); + } } + if (pEnd != nullptr) { *pEnd = localeID+index; } } /* if there is no variant tag after a '-' or '_' then look for '@' */ - if(!hasVariant) { - if(prev=='@') { + if (index == 0) { + if (prev=='@') { /* keep localeID */ } else if((localeID=locale_getKeywordsStart(localeID))!=nullptr) { ++localeID; /* point after the '@' */ } else { return; } - while(!_isTerminator(*localeID)) { + for(; !_isTerminator(localeID[index]); index++) { + if (index >= MAX_VARIANTS_LENGTH) { // same as length > MAX_VARIANTS_LENGTH + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } if (needSeparator) { - sink.Append("_", 1); + if (sink != nullptr) { + sink->Append("_", 1); + } needSeparator = false; } - char c = (char)uprv_toupper(*localeID); - if (c == '-' || c == ',') c = '_'; - sink.Append(&c, 1); + if (sink != nullptr) { + char c = (char)uprv_toupper(localeID[index]); + if (c == '-' || c == ',') c = '_'; + sink->Append(&c, 1); + } + } + if (pEnd != nullptr) { *pEnd = localeID + index; } + } +} + +} // namespace + +U_EXPORT CharString +ulocimp_getLanguage(const char* localeID, UErrorCode& status) { + return ByteSinkUtil::viaByteSinkToCharString( + [&](ByteSink& sink, UErrorCode& status) { + ulocimp_getSubtags( + localeID, + &sink, + nullptr, + nullptr, + nullptr, + nullptr, + status); + }, + status); +} + +U_EXPORT CharString +ulocimp_getScript(const char* localeID, UErrorCode& status) { + return ByteSinkUtil::viaByteSinkToCharString( + [&](ByteSink& sink, UErrorCode& status) { + ulocimp_getSubtags( + localeID, + nullptr, + &sink, + nullptr, + nullptr, + nullptr, + status); + }, + status); +} + +U_EXPORT CharString +ulocimp_getRegion(const char* localeID, UErrorCode& status) { + return ByteSinkUtil::viaByteSinkToCharString( + [&](ByteSink& sink, UErrorCode& status) { + ulocimp_getSubtags( + localeID, + nullptr, + nullptr, + &sink, + nullptr, + nullptr, + status); + }, + status); +} + +U_EXPORT CharString +ulocimp_getVariant(const char* localeID, UErrorCode& status) { + return ByteSinkUtil::viaByteSinkToCharString( + [&](ByteSink& sink, UErrorCode& status) { + ulocimp_getSubtags( + localeID, + nullptr, + nullptr, + nullptr, + &sink, + nullptr, + status); + }, + status); +} + +U_EXPORT void +ulocimp_getSubtags( + const char* localeID, + CharString* language, + CharString* script, + CharString* region, + CharString* variant, + const char** pEnd, + UErrorCode& status) { + if (U_FAILURE(status)) { return; } + + std::optional<CharStringByteSink> languageSink; + std::optional<CharStringByteSink> scriptSink; + std::optional<CharStringByteSink> regionSink; + std::optional<CharStringByteSink> variantSink; + + if (language != nullptr) { languageSink.emplace(language); } + if (script != nullptr) { scriptSink.emplace(script); } + if (region != nullptr) { regionSink.emplace(region); } + if (variant != nullptr) { variantSink.emplace(variant); } + + ulocimp_getSubtags( + localeID, + languageSink.has_value() ? &*languageSink : nullptr, + scriptSink.has_value() ? &*scriptSink : nullptr, + regionSink.has_value() ? &*regionSink : nullptr, + variantSink.has_value() ? &*variantSink : nullptr, + pEnd, + status); +} + +U_EXPORT void +ulocimp_getSubtags( + const char* localeID, + ByteSink* language, + ByteSink* script, + ByteSink* region, + ByteSink* variant, + const char** pEnd, + UErrorCode& status) { + if (U_FAILURE(status)) { return; } + + if (pEnd != nullptr) { + *pEnd = localeID; + } else if (language == nullptr && + script == nullptr && + region == nullptr && + variant == nullptr) { + return; + } + + bool hasRegion = false; + + if (localeID == nullptr) { + localeID = uloc_getDefault(); + } + + _getLanguage(localeID, language, &localeID, status); + if (U_FAILURE(status)) { return; } + U_ASSERT(localeID != nullptr); + + if (pEnd != nullptr) { + *pEnd = localeID; + } else if (script == nullptr && + region == nullptr && + variant == nullptr) { + return; + } + + if (_isIDSeparator(*localeID)) { + const char* begin = localeID + 1; + const char* end = nullptr; + _getScript(begin, script, &end); + U_ASSERT(end != nullptr); + if (end != begin) { + localeID = end; + if (pEnd != nullptr) { *pEnd = localeID; } + } + } + + if (region == nullptr && variant == nullptr && pEnd == nullptr) { return; } + + if (_isIDSeparator(*localeID)) { + const char* begin = localeID + 1; + const char* end = nullptr; + _getRegion(begin, region, &end); + U_ASSERT(end != nullptr); + if (end != begin) { + hasRegion = true; + localeID = end; + if (pEnd != nullptr) { *pEnd = localeID; } + } + } + + if (variant == nullptr && pEnd == nullptr) { return; } + + if (_isIDSeparator(*localeID) && !_isBCP47Extension(localeID)) { + /* If there was no country ID, skip a possible extra IDSeparator */ + if (!hasRegion && _isIDSeparator(localeID[1])) { localeID++; } + const char* begin = localeID + 1; + const char* end = nullptr; + _getVariant(begin, *localeID, variant, &end, false, status); + if (U_FAILURE(status)) { return; } + U_ASSERT(end != nullptr); + if (end != begin && pEnd != nullptr) { *pEnd = end; } } } @@ -1377,12 +1651,11 @@ static const UEnumeration gKeywordsEnum = { U_CAPI UEnumeration* U_EXPORT2 uloc_openKeywordList(const char *keywordList, int32_t keywordListSize, UErrorCode* status) { + if (U_FAILURE(*status)) { return nullptr; } + LocalMemory<UKeywordsContext> myContext; LocalMemory<UEnumeration> result; - if (U_FAILURE(*status)) { - return nullptr; - } myContext.adoptInstead(static_cast<UKeywordsContext *>(uprv_malloc(sizeof(UKeywordsContext)))); result.adoptInstead(static_cast<UEnumeration *>(uprv_malloc(sizeof(UEnumeration)))); if (myContext.isNull() || result.isNull()) { @@ -1406,16 +1679,16 @@ U_CAPI UEnumeration* U_EXPORT2 uloc_openKeywords(const char* localeID, UErrorCode* status) { - char tempBuffer[ULOC_FULLNAME_CAPACITY]; - const char* tmpLocaleID; - if(status==nullptr || U_FAILURE(*status)) { - return 0; + return nullptr; } + CharString tempBuffer; + const char* tmpLocaleID; + if (_hasBCP47Extension(localeID)) { - tmpLocaleID = _ConvertBCP47(localeID, tempBuffer, - sizeof(tempBuffer), status, nullptr); + tempBuffer = ulocimp_forLanguageTag(localeID, -1, nullptr, *status); + tmpLocaleID = U_SUCCESS(*status) && !tempBuffer.isEmpty() ? tempBuffer.data() : localeID; } else { if (localeID==nullptr) { localeID=uloc_getDefault(); @@ -1423,37 +1696,21 @@ uloc_openKeywords(const char* localeID, tmpLocaleID=localeID; } - /* Skip the language */ - ulocimp_getLanguage(tmpLocaleID, &tmpLocaleID, *status); + ulocimp_getSubtags( + tmpLocaleID, + nullptr, + nullptr, + nullptr, + nullptr, + &tmpLocaleID, + *status); if (U_FAILURE(*status)) { - return 0; - } - - if(_isIDSeparator(*tmpLocaleID)) { - const char *scriptID; - /* Skip the script if available */ - ulocimp_getScript(tmpLocaleID+1, &scriptID, *status); - if (U_FAILURE(*status)) { - return 0; - } - if(scriptID != tmpLocaleID+1) { - /* Found optional script */ - tmpLocaleID = scriptID; - } - /* Skip the Country */ - if (_isIDSeparator(*tmpLocaleID)) { - ulocimp_getCountry(tmpLocaleID+1, &tmpLocaleID, *status); - if (U_FAILURE(*status)) { - return 0; - } - } + return nullptr; } /* keywords are located after '@' */ if((tmpLocaleID = locale_getKeywordsStart(tmpLocaleID)) != nullptr) { - CharString keywords; - CharStringByteSink sink(&keywords); - ulocimp_getKeywords(tmpLocaleID+1, '@', sink, false, status); + CharString keywords = ulocimp_getKeywords(tmpLocaleID + 1, '@', false, *status); if (U_FAILURE(*status)) { return nullptr; } @@ -1467,10 +1724,12 @@ uloc_openKeywords(const char* localeID, #define _ULOC_STRIP_KEYWORDS 0x2 #define _ULOC_CANONICALIZE 0x1 -#define OPTION_SET(options, mask) ((options & mask) != 0) +namespace { + +inline bool OPTION_SET(uint32_t options, uint32_t mask) { return (options & mask) != 0; } -static const char i_default[] = {'i', '-', 'd', 'e', 'f', 'a', 'u', 'l', 't'}; -#define I_DEFAULT_LENGTH UPRV_LENGTHOF(i_default) +constexpr char i_default[] = {'i', '-', 'd', 'e', 'f', 'a', 'u', 'l', 't'}; +constexpr int32_t I_DEFAULT_LENGTH = UPRV_LENGTHOF(i_default); /** * Canonicalize the given localeID, to level 1 or to level 2, @@ -1479,17 +1738,17 @@ static const char i_default[] = {'i', '-', 'd', 'e', 'f', 'a', 'u', 'l', 't'}; * * This is the code underlying uloc_getName and uloc_canonicalize. */ -static void +void _canonicalize(const char* localeID, ByteSink& sink, uint32_t options, - UErrorCode* err) { - if (U_FAILURE(*err)) { + UErrorCode& err) { + if (U_FAILURE(err)) { return; } - int32_t j, fieldCount=0, scriptSize=0, variantSize=0; - PreflightingLocaleIDBuffer tempBuffer; // if localeID has a BCP47 extension, tmpLocaleID points to this + int32_t j, fieldCount=0; + CharString tempBuffer; // if localeID has a BCP47 extension, tmpLocaleID points to this CharString localeIDWithHyphens; // if localeID has a BPC47 extension and have _, tmpLocaleID points to this const char* origLocaleID; const char* tmpLocaleID; @@ -1501,8 +1760,8 @@ _canonicalize(const char* localeID, // convert all underbars to hyphens, unless the "BCP47 extension" comes at the beginning of the string if (uprv_strchr(localeID, '_') != nullptr && localeID[1] != '-' && localeID[1] != '_') { - localeIDWithHyphens.append(localeID, -1, *err); - if (U_SUCCESS(*err)) { + localeIDWithHyphens.append(localeID, -1, err); + if (U_SUCCESS(err)) { for (char* p = localeIDWithHyphens.data(); *p != '\0'; ++p) { if (*p == '_') { *p = '-'; @@ -1512,13 +1771,8 @@ _canonicalize(const char* localeID, } } - do { - // After this call tmpLocaleID may point to localeIDPtr which may - // point to either localeID or localeIDWithHyphens.data(). - tmpLocaleID = _ConvertBCP47(localeIDPtr, tempBuffer.getBuffer(), - tempBuffer.getCapacity(), err, - &(tempBuffer.requestedCapacity)); - } while (tempBuffer.needToTryAgain(err)); + tempBuffer = ulocimp_forLanguageTag(localeIDPtr, -1, nullptr, err); + tmpLocaleID = U_SUCCESS(err) && !tempBuffer.isEmpty() ? tempBuffer.data() : localeIDPtr; } else { if (localeID==nullptr) { localeID=uloc_getDefault(); @@ -1529,76 +1783,70 @@ _canonicalize(const char* localeID, origLocaleID=tmpLocaleID; /* get all pieces, one after another, and separate with '_' */ - CharString tag = ulocimp_getLanguage(tmpLocaleID, &tmpLocaleID, *err); + CharString tag; + CharString script; + CharString country; + CharString variant; + ulocimp_getSubtags( + tmpLocaleID, + &tag, + &script, + &country, + &variant, + &tmpLocaleID, + err); + if (U_FAILURE(err)) { + return; + } if (tag.length() == I_DEFAULT_LENGTH && uprv_strncmp(origLocaleID, i_default, I_DEFAULT_LENGTH) == 0) { tag.clear(); - tag.append(uloc_getDefault(), *err); - } else if(_isIDSeparator(*tmpLocaleID)) { - const char *scriptID; - - ++fieldCount; - tag.append('_', *err); - - CharString script = ulocimp_getScript(tmpLocaleID+1, &scriptID, *err); - tag.append(script, *err); - scriptSize = script.length(); - if(scriptSize > 0) { - /* Found optional script */ - tmpLocaleID = scriptID; + tag.append(uloc_getDefault(), err); + } else { + if (!script.isEmpty()) { ++fieldCount; - if (_isIDSeparator(*tmpLocaleID)) { - /* If there is something else, then we add the _ */ - tag.append('_', *err); - } + tag.append('_', err); + tag.append(script, err); } - - if (_isIDSeparator(*tmpLocaleID)) { - const char *cntryID; - - CharString country = ulocimp_getCountry(tmpLocaleID+1, &cntryID, *err); - tag.append(country, *err); - if (!country.isEmpty()) { - /* Found optional country */ - tmpLocaleID = cntryID; - } - if(_isIDSeparator(*tmpLocaleID)) { - /* If there is something else, then we add the _ if we found country before. */ - if (!_isIDSeparator(*(tmpLocaleID+1))) { - ++fieldCount; - tag.append('_', *err); - } - - variantSize = -tag.length(); - { - CharStringByteSink s(&tag); - _getVariant(tmpLocaleID+1, *tmpLocaleID, s, false); - } - variantSize += tag.length(); - if (variantSize > 0) { - tmpLocaleID += variantSize + 1; /* skip '_' and variant */ - } + if (!country.isEmpty()) { + ++fieldCount; + tag.append('_', err); + tag.append(country, err); + } + if (!variant.isEmpty()) { + ++fieldCount; + if (country.isEmpty()) { + tag.append('_', err); } + tag.append('_', err); + tag.append(variant, err); } } /* Copy POSIX-style charset specifier, if any [mr.utf8] */ if (!OPTION_SET(options, _ULOC_CANONICALIZE) && *tmpLocaleID == '.') { - UBool done = false; - do { - char c = *tmpLocaleID; - switch (c) { - case 0: - case '@': - done = true; - break; - default: - tag.append(c, *err); - ++tmpLocaleID; - break; - } - } while (!done); + tag.append('.', err); + ++tmpLocaleID; + const char *atPos = nullptr; + size_t length; + if((atPos = uprv_strchr(tmpLocaleID, '@')) != nullptr) { + length = atPos - tmpLocaleID; + } else { + length = uprv_strlen(tmpLocaleID); + } + // The longest charset name we found in IANA charset registry + // https://www.iana.org/assignments/character-sets/ is + // "Extended_UNIX_Code_Packed_Format_for_Japanese" in length 45. + // we therefore restrict the length here to be 64 which is a power of 2 + // number that is longer than 45. + constexpr size_t kMaxCharsetLength = 64; + if (length > kMaxCharsetLength) { + err = U_ILLEGAL_ARGUMENT_ERROR; /* malformed keyword name */ + return; + } + tag.append(tmpLocaleID, static_cast<int32_t>(length), err); + tmpLocaleID += length; } /* Scan ahead to next '@' and determine if it is followed by '=' and/or ';' @@ -1616,7 +1864,7 @@ _canonicalize(const char* localeID, if (c == 0) { break; } - tag.append(c, *err); + tag.append(c, err); ++tmpLocaleID; } } @@ -1625,22 +1873,16 @@ _canonicalize(const char* localeID, /* Handle @FOO variant if @ is present and not followed by = */ if (tmpLocaleID!=nullptr && keywordAssign==nullptr) { /* Add missing '_' if needed */ - if (fieldCount < 2 || (fieldCount < 3 && scriptSize > 0)) { + if (fieldCount < 2 || (fieldCount < 3 && !script.isEmpty())) { do { - tag.append('_', *err); + tag.append('_', err); ++fieldCount; } while(fieldCount<2); } - int32_t posixVariantSize = -tag.length(); - { - CharStringByteSink s(&tag); - _getVariant(tmpLocaleID+1, '@', s, (UBool)(variantSize > 0)); - } - posixVariantSize += tag.length(); - if (posixVariantSize > 0) { - variantSize += posixVariantSize; - } + CharStringByteSink s(&tag); + _getVariant(tmpLocaleID+1, '@', &s, nullptr, !variant.isEmpty(), err); + if (U_FAILURE(err)) { return; } } /* Look up the ID in the canonicalization map */ @@ -1651,7 +1893,7 @@ _canonicalize(const char* localeID, break; /* Don't remap "" if keywords present */ } tag.clear(); - tag.append(CANONICALIZE_MAP[j].canonicalID, *err); + tag.append(CANONICALIZE_MAP[j].canonicalID, err); break; } } @@ -1669,6 +1911,8 @@ _canonicalize(const char* localeID, } } +} // namespace + /* ### ID parsing API **************************************************/ U_CAPI int32_t U_EXPORT2 @@ -1677,12 +1921,35 @@ uloc_getParent(const char* localeID, int32_t parentCapacity, UErrorCode* err) { + return ByteSinkUtil::viaByteSinkToTerminatedChars( + parent, parentCapacity, + [&](ByteSink& sink, UErrorCode& status) { + ulocimp_getParent(localeID, sink, status); + }, + *err); +} + +U_EXPORT CharString +ulocimp_getParent(const char* localeID, + UErrorCode& err) +{ + return ByteSinkUtil::viaByteSinkToCharString( + [&](ByteSink& sink, UErrorCode& status) { + ulocimp_getParent(localeID, sink, status); + }, + err); +} + +U_EXPORT void +ulocimp_getParent(const char* localeID, + icu::ByteSink& sink, + UErrorCode& err) +{ + if (U_FAILURE(err)) { return; } + const char *lastUnderscore; int32_t i; - if (U_FAILURE(*err)) - return 0; - if (localeID == nullptr) localeID = uloc_getDefault(); @@ -1697,13 +1964,9 @@ uloc_getParent(const char* localeID, if (uprv_strnicmp(localeID, "und_", 4) == 0) { localeID += 3; i -= 3; - uprv_memmove(parent, localeID, uprv_min(i, parentCapacity)); - } else if (parent != localeID) { - uprv_memcpy(parent, localeID, uprv_min(i, parentCapacity)); } + sink.Append(localeID, i); } - - return u_terminateChars(parent, parentCapacity, i, err); } U_CAPI int32_t U_EXPORT2 @@ -1713,16 +1976,19 @@ uloc_getLanguage(const char* localeID, UErrorCode* err) { /* uloc_getLanguage will return a 2 character iso-639 code if one exists. *CWB*/ - - if (err==nullptr || U_FAILURE(*err)) { - return 0; - } - - if(localeID==nullptr) { - localeID=uloc_getDefault(); - } - - return ulocimp_getLanguage(localeID, nullptr, *err).extract(language, languageCapacity, *err); + return ByteSinkUtil::viaByteSinkToTerminatedChars( + language, languageCapacity, + [&](ByteSink& sink, UErrorCode& status) { + ulocimp_getSubtags( + localeID, + &sink, + nullptr, + nullptr, + nullptr, + nullptr, + status); + }, + *err); } U_CAPI int32_t U_EXPORT2 @@ -1731,24 +1997,19 @@ uloc_getScript(const char* localeID, int32_t scriptCapacity, UErrorCode* err) { - if(err==nullptr || U_FAILURE(*err)) { - return 0; - } - - if(localeID==nullptr) { - localeID=uloc_getDefault(); - } - - /* skip the language */ - ulocimp_getLanguage(localeID, &localeID, *err); - if (U_FAILURE(*err)) { - return 0; - } - - if(_isIDSeparator(*localeID)) { - return ulocimp_getScript(localeID+1, nullptr, *err).extract(script, scriptCapacity, *err); - } - return u_terminateChars(script, scriptCapacity, 0, err); + return ByteSinkUtil::viaByteSinkToTerminatedChars( + script, scriptCapacity, + [&](ByteSink& sink, UErrorCode& status) { + ulocimp_getSubtags( + localeID, + nullptr, + &sink, + nullptr, + nullptr, + nullptr, + status); + }, + *err); } U_CAPI int32_t U_EXPORT2 @@ -1757,36 +2018,19 @@ uloc_getCountry(const char* localeID, int32_t countryCapacity, UErrorCode* err) { - if(err==nullptr || U_FAILURE(*err)) { - return 0; - } - - if(localeID==nullptr) { - localeID=uloc_getDefault(); - } - - /* Skip the language */ - ulocimp_getLanguage(localeID, &localeID, *err); - if (U_FAILURE(*err)) { - return 0; - } - - if(_isIDSeparator(*localeID)) { - const char *scriptID; - /* Skip the script if available */ - ulocimp_getScript(localeID+1, &scriptID, *err); - if (U_FAILURE(*err)) { - return 0; - } - if(scriptID != localeID+1) { - /* Found optional script */ - localeID = scriptID; - } - if(_isIDSeparator(*localeID)) { - return ulocimp_getCountry(localeID+1, nullptr, *err).extract(country, countryCapacity, *err); - } - } - return u_terminateChars(country, countryCapacity, 0, err); + return ByteSinkUtil::viaByteSinkToTerminatedChars( + country, countryCapacity, + [&](ByteSink& sink, UErrorCode& status) { + ulocimp_getSubtags( + localeID, + nullptr, + nullptr, + &sink, + nullptr, + nullptr, + status); + }, + *err); } U_CAPI int32_t U_EXPORT2 @@ -1795,75 +2039,19 @@ uloc_getVariant(const char* localeID, int32_t variantCapacity, UErrorCode* err) { - char tempBuffer[ULOC_FULLNAME_CAPACITY]; - const char* tmpLocaleID; - int32_t i=0; - - if(err==nullptr || U_FAILURE(*err)) { - return 0; - } - - if (_hasBCP47Extension(localeID)) { - tmpLocaleID =_ConvertBCP47(localeID, tempBuffer, sizeof(tempBuffer), err, nullptr); - } else { - if (localeID==nullptr) { - localeID=uloc_getDefault(); - } - tmpLocaleID=localeID; - } - - /* Skip the language */ - ulocimp_getLanguage(tmpLocaleID, &tmpLocaleID, *err); - if (U_FAILURE(*err)) { - return 0; - } - - if(_isIDSeparator(*tmpLocaleID)) { - const char *scriptID; - /* Skip the script if available */ - ulocimp_getScript(tmpLocaleID+1, &scriptID, *err); - if (U_FAILURE(*err)) { - return 0; - } - if(scriptID != tmpLocaleID+1) { - /* Found optional script */ - tmpLocaleID = scriptID; - } - /* Skip the Country */ - if (_isIDSeparator(*tmpLocaleID)) { - const char *cntryID; - ulocimp_getCountry(tmpLocaleID+1, &cntryID, *err); - if (U_FAILURE(*err)) { - return 0; - } - if (cntryID != tmpLocaleID+1) { - /* Found optional country */ - tmpLocaleID = cntryID; - } - if(_isIDSeparator(*tmpLocaleID)) { - /* If there was no country ID, skip a possible extra IDSeparator */ - if (tmpLocaleID != cntryID && _isIDSeparator(tmpLocaleID[1])) { - tmpLocaleID++; - } - - CheckedArrayByteSink sink(variant, variantCapacity); - _getVariant(tmpLocaleID+1, *tmpLocaleID, sink, false); - - i = sink.NumberOfBytesAppended(); - - if (U_FAILURE(*err)) { - return i; - } - - if (sink.Overflowed()) { - *err = U_BUFFER_OVERFLOW_ERROR; - return i; - } - } - } - } - - return u_terminateChars(variant, variantCapacity, i, err); + return ByteSinkUtil::viaByteSinkToTerminatedChars( + variant, variantCapacity, + [&](ByteSink& sink, UErrorCode& status) { + ulocimp_getSubtags( + localeID, + nullptr, + nullptr, + nullptr, + &sink, + nullptr, + status); + }, + *err); } U_CAPI int32_t U_EXPORT2 @@ -1872,32 +2060,29 @@ uloc_getName(const char* localeID, int32_t nameCapacity, UErrorCode* err) { - if (U_FAILURE(*err)) { - return 0; - } - - CheckedArrayByteSink sink(name, nameCapacity); - ulocimp_getName(localeID, sink, err); - - int32_t reslen = sink.NumberOfBytesAppended(); - - if (U_FAILURE(*err)) { - return reslen; - } - - if (sink.Overflowed()) { - *err = U_BUFFER_OVERFLOW_ERROR; - } else { - u_terminateChars(name, nameCapacity, reslen, err); - } + return ByteSinkUtil::viaByteSinkToTerminatedChars( + name, nameCapacity, + [&](ByteSink& sink, UErrorCode& status) { + ulocimp_getName(localeID, sink, status); + }, + *err); +} - return reslen; +U_EXPORT CharString +ulocimp_getName(const char* localeID, + UErrorCode& err) +{ + return ByteSinkUtil::viaByteSinkToCharString( + [&](ByteSink& sink, UErrorCode& status) { + ulocimp_getName(localeID, sink, status); + }, + err); } -U_CAPI void U_EXPORT2 +U_EXPORT void ulocimp_getName(const char* localeID, ByteSink& sink, - UErrorCode* err) + UErrorCode& err) { _canonicalize(localeID, sink, 0, err); } @@ -1908,32 +2093,29 @@ uloc_getBaseName(const char* localeID, int32_t nameCapacity, UErrorCode* err) { - if (U_FAILURE(*err)) { - return 0; - } - - CheckedArrayByteSink sink(name, nameCapacity); - ulocimp_getBaseName(localeID, sink, err); - - int32_t reslen = sink.NumberOfBytesAppended(); - - if (U_FAILURE(*err)) { - return reslen; - } - - if (sink.Overflowed()) { - *err = U_BUFFER_OVERFLOW_ERROR; - } else { - u_terminateChars(name, nameCapacity, reslen, err); - } + return ByteSinkUtil::viaByteSinkToTerminatedChars( + name, nameCapacity, + [&](ByteSink& sink, UErrorCode& status) { + ulocimp_getBaseName(localeID, sink, status); + }, + *err); +} - return reslen; +U_EXPORT CharString +ulocimp_getBaseName(const char* localeID, + UErrorCode& err) +{ + return ByteSinkUtil::viaByteSinkToCharString( + [&](ByteSink& sink, UErrorCode& status) { + ulocimp_getBaseName(localeID, sink, status); + }, + err); } -U_CAPI void U_EXPORT2 +U_EXPORT void ulocimp_getBaseName(const char* localeID, ByteSink& sink, - UErrorCode* err) + UErrorCode& err) { _canonicalize(localeID, sink, _ULOC_STRIP_KEYWORDS, err); } @@ -1944,32 +2126,29 @@ uloc_canonicalize(const char* localeID, int32_t nameCapacity, UErrorCode* err) { - if (U_FAILURE(*err)) { - return 0; - } - - CheckedArrayByteSink sink(name, nameCapacity); - ulocimp_canonicalize(localeID, sink, err); - - int32_t reslen = sink.NumberOfBytesAppended(); - - if (U_FAILURE(*err)) { - return reslen; - } - - if (sink.Overflowed()) { - *err = U_BUFFER_OVERFLOW_ERROR; - } else { - u_terminateChars(name, nameCapacity, reslen, err); - } + return ByteSinkUtil::viaByteSinkToTerminatedChars( + name, nameCapacity, + [&](ByteSink& sink, UErrorCode& status) { + ulocimp_canonicalize(localeID, sink, status); + }, + *err); +} - return reslen; +U_EXPORT CharString +ulocimp_canonicalize(const char* localeID, + UErrorCode& err) +{ + return ByteSinkUtil::viaByteSinkToCharString( + [&](ByteSink& sink, UErrorCode& status) { + ulocimp_canonicalize(localeID, sink, status); + }, + err); } -U_CAPI void U_EXPORT2 +U_EXPORT void ulocimp_canonicalize(const char* localeID, ByteSink& sink, - UErrorCode* err) + UErrorCode& err) { _canonicalize(localeID, sink, _ULOC_CANONICALIZE, err); } @@ -1977,49 +2156,39 @@ ulocimp_canonicalize(const char* localeID, U_CAPI const char* U_EXPORT2 uloc_getISO3Language(const char* localeID) { - int16_t offset; - char lang[ULOC_LANG_CAPACITY]; UErrorCode err = U_ZERO_ERROR; if (localeID == nullptr) { localeID = uloc_getDefault(); } - uloc_getLanguage(localeID, lang, ULOC_LANG_CAPACITY, &err); + CharString lang = ulocimp_getLanguage(localeID, err); if (U_FAILURE(err)) return ""; - offset = _findIndex(LANGUAGES, lang); - if (offset < 0) - return ""; - return LANGUAGES_3[offset]; + std::optional<int16_t> offset = _findIndex(LANGUAGES, lang.data()); + return offset.has_value() ? LANGUAGES_3[*offset] : ""; } U_CAPI const char* U_EXPORT2 uloc_getISO3Country(const char* localeID) { - int16_t offset; - char cntry[ULOC_LANG_CAPACITY]; UErrorCode err = U_ZERO_ERROR; if (localeID == nullptr) { localeID = uloc_getDefault(); } - uloc_getCountry(localeID, cntry, ULOC_LANG_CAPACITY, &err); + CharString cntry = ulocimp_getRegion(localeID, err); if (U_FAILURE(err)) return ""; - offset = _findIndex(COUNTRIES, cntry); - if (offset < 0) - return ""; - - return COUNTRIES_3[offset]; + std::optional<int16_t> offset = _findIndex(COUNTRIES, cntry.data()); + return offset.has_value() ? COUNTRIES_3[*offset] : ""; } U_CAPI uint32_t U_EXPORT2 uloc_getLCID(const char* localeID) { UErrorCode status = U_ZERO_ERROR; - char langID[ULOC_FULLNAME_CAPACITY]; uint32_t lcid = 0; /* Check for incomplete id. */ @@ -2038,37 +2207,20 @@ uloc_getLCID(const char* localeID) return lcid; } - uloc_getLanguage(localeID, langID, sizeof(langID), &status); - if (U_FAILURE(status) || status == U_STRING_NOT_TERMINATED_WARNING) { + CharString langID = ulocimp_getLanguage(localeID, status); + if (U_FAILURE(status)) { return 0; } if (uprv_strchr(localeID, '@')) { // uprv_convertToLCID does not support keywords other than collation. // Remove all keywords except collation. - int32_t len; - char tmpLocaleID[ULOC_FULLNAME_CAPACITY]; - - CharString collVal; - { - CharStringByteSink sink(&collVal); - ulocimp_getKeywordValue(localeID, "collation", sink, &status); - } - + CharString collVal = ulocimp_getKeywordValue(localeID, "collation", status); if (U_SUCCESS(status) && !collVal.isEmpty()) { - len = uloc_getBaseName(localeID, tmpLocaleID, - UPRV_LENGTHOF(tmpLocaleID) - 1, &status); - - if (U_SUCCESS(status) && len > 0) { - tmpLocaleID[len] = 0; - - len = uloc_setKeywordValue("collation", collVal.data(), tmpLocaleID, - UPRV_LENGTHOF(tmpLocaleID) - len - 1, &status); - - if (U_SUCCESS(status) && len > 0) { - tmpLocaleID[len] = 0; - return uprv_convertToLCID(langID, tmpLocaleID, &status); - } + CharString tmpLocaleID = ulocimp_getBaseName(localeID, status); + ulocimp_setKeywordValue("collation", collVal.data(), tmpLocaleID, status); + if (U_SUCCESS(status)) { + return uprv_convertToLCID(langID.data(), tmpLocaleID.data(), &status); } } @@ -2076,7 +2228,7 @@ uloc_getLCID(const char* localeID) status = U_ZERO_ERROR; } - return uprv_convertToLCID(langID, localeID, &status); + return uprv_convertToLCID(langID.data(), localeID, &status); } U_CAPI int32_t U_EXPORT2 @@ -2152,7 +2304,9 @@ uloc_toUnicodeLocaleType(const char* keyword, const char* value) return bcpType; } -static UBool +namespace { + +bool isWellFormedLegacyKey(const char* legacyKey) { const char* p = legacyKey; @@ -2165,7 +2319,7 @@ isWellFormedLegacyKey(const char* legacyKey) return true; } -static UBool +bool isWellFormedLegacyType(const char* legacyType) { const char* p = legacyType; @@ -2186,6 +2340,8 @@ isWellFormedLegacyType(const char* legacyType) return (alphaNumLen != 0); } +} // namespace + U_CAPI const char* U_EXPORT2 uloc_toLegacyKey(const char* keyword) { diff --git a/contrib/libs/icu/common/uloc_keytype.cpp b/contrib/libs/icu/common/uloc_keytype.cpp index a84b860907..38694d4a18 100644 --- a/contrib/libs/icu/common/uloc_keytype.cpp +++ b/contrib/libs/icu/common/uloc_keytype.cpp @@ -74,8 +74,9 @@ uloc_key_type_cleanup() { U_CDECL_END +namespace { -static void U_CALLCONV +void U_CALLCONV initFromResourceBundle(UErrorCode& sts) { U_NAMESPACE_USE ucln_common_registerCleanup(UCLN_COMMON_LOCALE_KEY_TYPE, uloc_key_type_cleanup); @@ -141,7 +142,7 @@ initFromResourceBundle(UErrorCode& sts) { bcpKeyId = bcpKeyIdBuf->data(); } - UBool isTZ = uprv_strcmp(legacyKeyId, "timezone") == 0; + bool isTZ = uprv_strcmp(legacyKeyId, "timezone") == 0; UHashtable* typeDataMap = uhash_open(uhash_hashIChars, uhash_compareIChars, nullptr, &sts); if (U_FAILURE(sts)) { @@ -351,7 +352,7 @@ initFromResourceBundle(UErrorCode& sts) { } } -static UBool +bool init() { UErrorCode sts = U_ZERO_ERROR; umtx_initOnce(gLocExtKeyMapInitOnce, &initFromResourceBundle, sts); @@ -361,7 +362,7 @@ init() { return true; } -static UBool +bool isSpecialTypeCodepoints(const char* val) { int32_t subtagLen = 0; const char* p = val; @@ -383,7 +384,7 @@ isSpecialTypeCodepoints(const char* val) { return (subtagLen >= 4 && subtagLen <= 6); } -static UBool +bool isSpecialTypeReorderCode(const char* val) { int32_t subtagLen = 0; const char* p = val; @@ -403,7 +404,7 @@ isSpecialTypeReorderCode(const char* val) { return (subtagLen >=3 && subtagLen <=8); } -static UBool +bool isSpecialTypeRgKeyValue(const char* val) { int32_t subtagLen = 0; const char* p = val; @@ -419,7 +420,9 @@ isSpecialTypeRgKeyValue(const char* val) { return (subtagLen == 6); } -U_CFUNC const char* +} // namespace + +U_EXPORT const char* ulocimp_toBcpKey(const char* key) { if (!init()) { return nullptr; @@ -432,7 +435,7 @@ ulocimp_toBcpKey(const char* key) { return nullptr; } -U_CFUNC const char* +U_EXPORT const char* ulocimp_toLegacyKey(const char* key) { if (!init()) { return nullptr; @@ -445,8 +448,8 @@ ulocimp_toLegacyKey(const char* key) { return nullptr; } -U_CFUNC const char* -ulocimp_toBcpType(const char* key, const char* type, UBool* isKnownKey, UBool* isSpecialType) { +U_EXPORT const char* +ulocimp_toBcpType(const char* key, const char* type, bool* isKnownKey, bool* isSpecialType) { if (isKnownKey != nullptr) { *isKnownKey = false; } @@ -468,7 +471,7 @@ ulocimp_toBcpType(const char* key, const char* type, UBool* isKnownKey, UBool* i return t->bcpId; } if (keyData->specialTypes != SPECIALTYPE_NONE) { - UBool matched = false; + bool matched = false; if (keyData->specialTypes & SPECIALTYPE_CODEPOINTS) { matched = isSpecialTypeCodepoints(type); } @@ -490,8 +493,8 @@ ulocimp_toBcpType(const char* key, const char* type, UBool* isKnownKey, UBool* i } -U_CFUNC const char* -ulocimp_toLegacyType(const char* key, const char* type, UBool* isKnownKey, UBool* isSpecialType) { +U_EXPORT const char* +ulocimp_toLegacyType(const char* key, const char* type, bool* isKnownKey, bool* isSpecialType) { if (isKnownKey != nullptr) { *isKnownKey = false; } @@ -513,7 +516,7 @@ ulocimp_toLegacyType(const char* key, const char* type, UBool* isKnownKey, UBool return t->legacyId; } if (keyData->specialTypes != SPECIALTYPE_NONE) { - UBool matched = false; + bool matched = false; if (keyData->specialTypes & SPECIALTYPE_CODEPOINTS) { matched = isSpecialTypeCodepoints(type); } @@ -533,4 +536,3 @@ ulocimp_toLegacyType(const char* key, const char* type, UBool* isKnownKey, UBool } return nullptr; } - diff --git a/contrib/libs/icu/common/uloc_tag.cpp b/contrib/libs/icu/common/uloc_tag.cpp index 43d597549f..f5ab0c36a6 100644 --- a/contrib/libs/icu/common/uloc_tag.cpp +++ b/contrib/libs/icu/common/uloc_tag.cpp @@ -7,6 +7,8 @@ ********************************************************************** */ +#include <utility> + #include "unicode/bytestream.h" #include "unicode/utypes.h" #include "unicode/ures.h" @@ -14,7 +16,6 @@ #include "unicode/putil.h" #include "unicode/uenum.h" #include "unicode/uloc.h" -#include "ustr_imp.h" #include "bytesinkutil.h" #include "charstr.h" #include "cmemory.h" @@ -24,9 +25,10 @@ #include "ulocimp.h" #include "uassert.h" +namespace { /* struct holding a single variant */ -typedef struct VariantListEntry { +typedef struct VariantListEntry : public icu::UMemory { const char *variant; struct VariantListEntry *next; } VariantListEntry; @@ -67,18 +69,18 @@ typedef struct ULanguageTag { #define LOCALE_KEYWORD_SEP ';' #define LOCALE_KEY_TYPE_SEP '=' -#define ISALPHA(c) uprv_isASCIILetter(c) -#define ISNUMERIC(c) ((c)>='0' && (c)<='9') +constexpr auto ISALPHA = uprv_isASCIILetter; +inline bool ISNUMERIC(char c) { return c >= '0' && c <= '9'; } -static const char EMPTY[] = ""; -static const char LANG_UND[] = "und"; -static const char PRIVATEUSE_KEY[] = "x"; -static const char _POSIX[] = "_POSIX"; -static const char POSIX_KEY[] = "va"; -static const char POSIX_VALUE[] = "posix"; -static const char LOCALE_ATTRIBUTE_KEY[] = "attribute"; -static const char PRIVUSE_VARIANT_PREFIX[] = "lvariant"; -static const char LOCALE_TYPE_YES[] = "yes"; +constexpr char EMPTY[] = ""; +constexpr char LANG_UND[] = "und"; +constexpr char PRIVATEUSE_KEY[] = "x"; +constexpr char _POSIX[] = "_POSIX"; +constexpr char POSIX_KEY[] = "va"; +constexpr char POSIX_VALUE[] = "posix"; +constexpr char LOCALE_ATTRIBUTE_KEY[] = "attribute"; +constexpr char PRIVUSE_VARIANT_PREFIX[] = "lvariant"; +constexpr char LOCALE_TYPE_YES[] = "yes"; #define LANG_UND_LEN 3 @@ -102,7 +104,7 @@ static const char LOCALE_TYPE_YES[] = "yes"; values. They may have to be removed for the strict BCP 47 compliance. */ -static const char* const LEGACY[] = { +constexpr const char* LEGACY[] = { /* legacy preferred */ "art-lojban", "jbo", "en-gb-oed", "en-gb-oxendict", @@ -151,7 +153,7 @@ static const char* const LEGACY[] = { a variant tag 'hepburn-heploc' has the preferred subtag, 'alaic97'. */ -static const char* const REDUNDANT[] = { +constexpr const char* REDUNDANT[] = { // redundant preferred "sgn-br", "bzs", "sgn-co", "csn", @@ -193,7 +195,7 @@ static const char* const REDUNDANT[] = { Make sure that 2-letter language subtags come before 3-letter subtags. */ -static const char DEPRECATEDLANGS[][4] = { +constexpr char DEPRECATEDLANGS[][4] = { /* deprecated new */ "in", "id", "iw", "he", @@ -283,7 +285,7 @@ static const char DEPRECATEDLANGS[][4] = { grep -B1 'Preferred' | \ awk -n '/Subtag/ {printf(" \"%s\", ", $2);} /Preferred/ {printf("\"%s\",\n", $2);}' */ -static const char DEPRECATEDREGIONS[][3] = { +constexpr char DEPRECATEDREGIONS[][3] = { /* deprecated new */ "BU", "MM", "DD", "DE", @@ -301,55 +303,57 @@ static const char DEPRECATEDREGIONS[][3] = { * ------------------------------------------------- */ -static ULanguageTag* -ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* status); +ULanguageTag* +ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode& status); -static void +void ultag_close(ULanguageTag* langtag); -static const char* +const char* ultag_getLanguage(const ULanguageTag* langtag); #if 0 -static const char* +const char* ultag_getJDKLanguage(const ULanguageTag* langtag); #endif -static const char* +const char* ultag_getExtlang(const ULanguageTag* langtag, int32_t idx); -static int32_t +int32_t ultag_getExtlangSize(const ULanguageTag* langtag); -static const char* +const char* ultag_getScript(const ULanguageTag* langtag); -static const char* +const char* ultag_getRegion(const ULanguageTag* langtag); -static const char* +const char* ultag_getVariant(const ULanguageTag* langtag, int32_t idx); -static int32_t +int32_t ultag_getVariantsSize(const ULanguageTag* langtag); -static const char* +const char* ultag_getExtensionKey(const ULanguageTag* langtag, int32_t idx); -static const char* +const char* ultag_getExtensionValue(const ULanguageTag* langtag, int32_t idx); -static int32_t +int32_t ultag_getExtensionsSize(const ULanguageTag* langtag); -static const char* +const char* ultag_getPrivateUse(const ULanguageTag* langtag); #if 0 -static const char* +const char* ultag_getLegacy(const ULanguageTag* langtag); #endif +} // namespace + U_NAMESPACE_BEGIN /** @@ -373,7 +377,9 @@ U_NAMESPACE_END * ------------------------------------------------- */ -static UBool +namespace { + +bool _isAlphaString(const char* s, int32_t len) { int32_t i; for (i = 0; i < len; i++) { @@ -384,7 +390,7 @@ _isAlphaString(const char* s, int32_t len) { return true; } -static UBool +bool _isNumericString(const char* s, int32_t len) { int32_t i; for (i = 0; i < len; i++) { @@ -395,7 +401,7 @@ _isNumericString(const char* s, int32_t len) { return true; } -static UBool +bool _isAlphaNumericString(const char* s, int32_t len) { int32_t i; for (i = 0; i < len; i++) { @@ -406,7 +412,7 @@ _isAlphaNumericString(const char* s, int32_t len) { return true; } -static UBool +bool _isAlphaNumericStringLimitedLength(const char* s, int32_t len, int32_t min, int32_t max) { if (len < 0) { len = (int32_t)uprv_strlen(s); @@ -417,7 +423,9 @@ _isAlphaNumericStringLimitedLength(const char* s, int32_t len, int32_t min, int3 return false; } -U_CFUNC UBool +} // namespace + +bool ultag_isLanguageSubtag(const char* s, int32_t len) { /* * unicode_language_subtag = alpha{2,3} | alpha{5,8}; @@ -433,7 +441,9 @@ ultag_isLanguageSubtag(const char* s, int32_t len) { return false; } -static UBool +namespace { + +bool _isExtlangSubtag(const char* s, int32_t len) { /* * extlang = 3ALPHA ; selected ISO 639 codes @@ -448,7 +458,9 @@ _isExtlangSubtag(const char* s, int32_t len) { return false; } -U_CFUNC UBool +} // namespace + +bool ultag_isScriptSubtag(const char* s, int32_t len) { /* * script = 4ALPHA ; ISO 15924 code @@ -462,7 +474,7 @@ ultag_isScriptSubtag(const char* s, int32_t len) { return false; } -U_CFUNC UBool +bool ultag_isRegionSubtag(const char* s, int32_t len) { /* * region = 2ALPHA ; ISO 3166-1 code @@ -480,7 +492,9 @@ ultag_isRegionSubtag(const char* s, int32_t len) { return false; } -static UBool +namespace { + +bool _isVariantSubtag(const char* s, int32_t len) { /* * variant = 5*8alphanum ; registered variants @@ -498,8 +512,8 @@ _isVariantSubtag(const char* s, int32_t len) { return false; } -static UBool -_isSepListOf(UBool (*test)(const char*, int32_t), const char* s, int32_t len) { +bool +_isSepListOf(bool (*test)(const char*, int32_t), const char* s, int32_t len) { const char *p = s; const char *pSubtag = nullptr; @@ -527,13 +541,17 @@ _isSepListOf(UBool (*test)(const char*, int32_t), const char* s, int32_t len) { return test(pSubtag, (int32_t)(p - pSubtag)); } -U_CFUNC UBool +} // namespace + +bool ultag_isVariantSubtags(const char* s, int32_t len) { return _isSepListOf(&_isVariantSubtag, s, len); } +namespace { + // This is for the ICU-specific "lvariant" handling. -static UBool +bool _isPrivateuseVariantSubtag(const char* s, int32_t len) { /* * variant = 1*8alphanum ; registered variants @@ -542,7 +560,7 @@ _isPrivateuseVariantSubtag(const char* s, int32_t len) { return _isAlphaNumericStringLimitedLength(s, len , 1, 8); } -static UBool +bool _isExtensionSingleton(const char* s, int32_t len) { /* * extension = singleton 1*("-" (2*8alphanum)) @@ -562,7 +580,7 @@ _isExtensionSingleton(const char* s, int32_t len) { return false; } -static UBool +bool _isExtensionSubtag(const char* s, int32_t len) { /* * extension = singleton 1*("-" (2*8alphanum)) @@ -570,12 +588,16 @@ _isExtensionSubtag(const char* s, int32_t len) { return _isAlphaNumericStringLimitedLength(s, len, 2, 8); } -U_CFUNC UBool +} // namespace + +bool ultag_isExtensionSubtags(const char* s, int32_t len) { return _isSepListOf(&_isExtensionSubtag, s, len); } -static UBool +namespace { + +bool _isPrivateuseValueSubtag(const char* s, int32_t len) { /* * privateuse = "x" 1*("-" (1*8alphanum)) @@ -583,12 +605,14 @@ _isPrivateuseValueSubtag(const char* s, int32_t len) { return _isAlphaNumericStringLimitedLength(s, len, 1, 8); } -U_CFUNC UBool +} // namespace + +bool ultag_isPrivateuseValueSubtags(const char* s, int32_t len) { return _isSepListOf(&_isPrivateuseValueSubtag, s, len); } -U_CFUNC UBool +bool ultag_isUnicodeLocaleAttribute(const char* s, int32_t len) { /* * attribute = alphanum{3,8} ; @@ -596,12 +620,12 @@ ultag_isUnicodeLocaleAttribute(const char* s, int32_t len) { return _isAlphaNumericStringLimitedLength(s, len , 3, 8); } -U_CFUNC UBool +bool ultag_isUnicodeLocaleAttributes(const char* s, int32_t len) { return _isSepListOf(&ultag_isUnicodeLocaleAttribute, s, len); } -U_CFUNC UBool +bool ultag_isUnicodeLocaleKey(const char* s, int32_t len) { /* * key = alphanum alpha ; @@ -615,7 +639,7 @@ ultag_isUnicodeLocaleKey(const char* s, int32_t len) { return false; } -U_CFUNC UBool +bool _isUnicodeLocaleTypeSubtag(const char*s, int32_t len) { /* * alphanum{3,8} @@ -623,7 +647,7 @@ _isUnicodeLocaleTypeSubtag(const char*s, int32_t len) { return _isAlphaNumericStringLimitedLength(s, len , 3, 8); } -U_CFUNC UBool +bool ultag_isUnicodeLocaleType(const char*s, int32_t len) { /* * type = alphanum{3,8} (sep alphanum{3,8})* ; @@ -631,7 +655,9 @@ ultag_isUnicodeLocaleType(const char*s, int32_t len) { return _isSepListOf(&_isUnicodeLocaleTypeSubtag, s, len); } -static UBool +namespace { + +bool _isTKey(const char* s, int32_t len) { /* @@ -646,7 +672,9 @@ _isTKey(const char* s, int32_t len) return false; } -U_CAPI const char * U_EXPORT2 +} // namespace + +const char* ultag_getTKeyStart(const char *localeID) { const char *result = localeID; const char *sep; @@ -662,7 +690,9 @@ ultag_getTKeyStart(const char *localeID) { return nullptr; } -static UBool +namespace { + +bool _isTValue(const char* s, int32_t len) { /* @@ -671,7 +701,7 @@ _isTValue(const char* s, int32_t len) return _isAlphaNumericStringLimitedLength(s, len , 3, 8); } -static UBool +bool _isTransformedExtensionSubtag(int32_t& state, const char* s, int32_t len) { const int32_t kStart = 0; // Start, wait for unicode_language_subtag, tkey or end @@ -744,7 +774,7 @@ _isTransformedExtensionSubtag(int32_t& state, const char* s, int32_t len) return false; } -static UBool +bool _isUnicodeExtensionSubtag(int32_t& state, const char* s, int32_t len) { const int32_t kStart = 0; // Start, wait for a key or attribute or end @@ -783,8 +813,8 @@ _isUnicodeExtensionSubtag(int32_t& state, const char* s, int32_t len) return false; } -static UBool -_isStatefulSepListOf(UBool (*test)(int32_t&, const char*, int32_t), const char* s, int32_t len) +bool +_isStatefulSepListOf(bool (*test)(int32_t&, const char*, int32_t), const char* s, int32_t len) { int32_t state = 0; const char* p; @@ -813,17 +843,20 @@ _isStatefulSepListOf(UBool (*test)(int32_t&, const char*, int32_t), const char* return false; } -U_CFUNC UBool +} // namespace + +bool ultag_isTransformedExtensionSubtags(const char* s, int32_t len) { return _isStatefulSepListOf(&_isTransformedExtensionSubtag, s, len); } -U_CFUNC UBool +bool ultag_isUnicodeExtensionSubtags(const char* s, int32_t len) { return _isStatefulSepListOf(&_isUnicodeExtensionSubtag, s, len); } +namespace { /* * ------------------------------------------------- @@ -833,13 +866,11 @@ ultag_isUnicodeExtensionSubtags(const char* s, int32_t len) { * ------------------------------------------------- */ -static UBool -_addVariantToList(VariantListEntry **first, VariantListEntry *var) { - UBool bAdded = true; - +bool +_addVariantToList(VariantListEntry **first, icu::LocalPointer<VariantListEntry> var) { if (*first == nullptr) { var->next = nullptr; - *first = var; + *first = var.orphan(); } else { VariantListEntry *prev, *cur; int32_t cmp; @@ -849,8 +880,8 @@ _addVariantToList(VariantListEntry **first, VariantListEntry *var) { cur = *first; while (true) { if (cur == nullptr) { - prev->next = var; var->next = nullptr; + prev->next = var.orphan(); break; } @@ -858,20 +889,19 @@ _addVariantToList(VariantListEntry **first, VariantListEntry *var) { cmp = uprv_compareInvCharsAsAscii(var->variant, cur->variant); if (cmp == 0) { /* duplicated variant */ - bAdded = false; - break; + return false; } prev = cur; cur = cur->next; } } - return bAdded; + return true; } -static UBool +bool _addAttributeToList(AttributeListEntry **first, AttributeListEntry *attr) { - UBool bAdded = true; + bool bAdded = true; if (*first == nullptr) { attr->next = nullptr; @@ -912,10 +942,9 @@ _addAttributeToList(AttributeListEntry **first, AttributeListEntry *attr) { return bAdded; } - -static UBool -_addExtensionToList(ExtensionListEntry **first, ExtensionListEntry *ext, UBool localeToBCP) { - UBool bAdded = true; +bool +_addExtensionToList(ExtensionListEntry **first, ExtensionListEntry *ext, bool localeToBCP) { + bool bAdded = true; if (*first == nullptr) { ext->next = nullptr; @@ -990,7 +1019,7 @@ _addExtensionToList(ExtensionListEntry **first, ExtensionListEntry *ext, UBool l return bAdded; } -static void +void _initializeULanguageTag(ULanguageTag* langtag) { int32_t i; @@ -1011,127 +1040,120 @@ _initializeULanguageTag(ULanguageTag* langtag) { langtag->privateuse = EMPTY; } -static void -_appendLanguageToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool strict, UErrorCode* status) { - char buf[ULOC_LANG_CAPACITY]; +void +_appendLanguageToLanguageTag(const char* localeID, icu::ByteSink& sink, bool strict, UErrorCode& status) { UErrorCode tmpStatus = U_ZERO_ERROR; - int32_t len, i; - if (U_FAILURE(*status)) { + if (U_FAILURE(status)) { return; } - len = uloc_getLanguage(localeID, buf, sizeof(buf), &tmpStatus); - if (U_FAILURE(tmpStatus) || tmpStatus == U_STRING_NOT_TERMINATED_WARNING) { + icu::CharString buf = ulocimp_getLanguage(localeID, tmpStatus); + if (U_FAILURE(tmpStatus)) { if (strict) { - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; return; } - len = 0; } /* Note: returned language code is in lower case letters */ - if (len == 0) { + if (buf.isEmpty()) { sink.Append(LANG_UND, LANG_UND_LEN); - } else if (!ultag_isLanguageSubtag(buf, len)) { + } else if (!ultag_isLanguageSubtag(buf.data(), buf.length())) { /* invalid language code */ if (strict) { - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; return; } sink.Append(LANG_UND, LANG_UND_LEN); } else { /* resolve deprecated */ - for (i = 0; i < UPRV_LENGTHOF(DEPRECATEDLANGS); i += 2) { + for (int32_t i = 0; i < UPRV_LENGTHOF(DEPRECATEDLANGS); i += 2) { // 2-letter deprecated subtags are listede before 3-letter // ones in DEPRECATEDLANGS[]. Get out of loop on coming // across the 1st 3-letter subtag, if the input is a 2-letter code. // to avoid continuing to try when there's no match. - if (uprv_strlen(buf) < uprv_strlen(DEPRECATEDLANGS[i])) break; - if (uprv_compareInvCharsAsAscii(buf, DEPRECATEDLANGS[i]) == 0) { - uprv_strcpy(buf, DEPRECATEDLANGS[i + 1]); - len = (int32_t)uprv_strlen(buf); - break; + if (buf.length() < (int32_t)uprv_strlen(DEPRECATEDLANGS[i])) break; + if (uprv_compareInvCharsAsAscii(buf.data(), DEPRECATEDLANGS[i]) == 0) { + const char* const resolved = DEPRECATEDLANGS[i + 1]; + sink.Append(resolved, (int32_t)uprv_strlen(resolved)); + return; } } - sink.Append(buf, len); + sink.Append(buf.data(), buf.length()); } } -static void -_appendScriptToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool strict, UErrorCode* status) { - char buf[ULOC_SCRIPT_CAPACITY]; +void +_appendScriptToLanguageTag(const char* localeID, icu::ByteSink& sink, bool strict, UErrorCode& status) { UErrorCode tmpStatus = U_ZERO_ERROR; - int32_t len; - if (U_FAILURE(*status)) { + if (U_FAILURE(status)) { return; } - len = uloc_getScript(localeID, buf, sizeof(buf), &tmpStatus); - if (U_FAILURE(tmpStatus) || tmpStatus == U_STRING_NOT_TERMINATED_WARNING) { + icu::CharString buf = ulocimp_getScript(localeID, tmpStatus); + if (U_FAILURE(tmpStatus)) { if (strict) { - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; } return; } - if (len > 0) { - if (!ultag_isScriptSubtag(buf, len)) { + if (!buf.isEmpty()) { + if (!ultag_isScriptSubtag(buf.data(), buf.length())) { /* invalid script code */ if (strict) { - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; } return; } else { sink.Append("-", 1); - sink.Append(buf, len); + sink.Append(buf.data(), buf.length()); } } } -static void -_appendRegionToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool strict, UErrorCode* status) { - char buf[ULOC_COUNTRY_CAPACITY]; +void +_appendRegionToLanguageTag(const char* localeID, icu::ByteSink& sink, bool strict, UErrorCode& status) { UErrorCode tmpStatus = U_ZERO_ERROR; - int32_t len; - if (U_FAILURE(*status)) { + if (U_FAILURE(status)) { return; } - len = uloc_getCountry(localeID, buf, sizeof(buf), &tmpStatus); - if (U_FAILURE(tmpStatus) || tmpStatus == U_STRING_NOT_TERMINATED_WARNING) { + icu::CharString buf = ulocimp_getRegion(localeID, tmpStatus); + if (U_FAILURE(tmpStatus)) { if (strict) { - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; } return; } - if (len > 0) { - if (!ultag_isRegionSubtag(buf, len)) { + if (!buf.isEmpty()) { + if (!ultag_isRegionSubtag(buf.data(), buf.length())) { /* invalid region code */ if (strict) { - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; } return; } else { sink.Append("-", 1); /* resolve deprecated */ - for (int i = 0; i < UPRV_LENGTHOF(DEPRECATEDREGIONS); i += 2) { - if (uprv_compareInvCharsAsAscii(buf, DEPRECATEDREGIONS[i]) == 0) { - uprv_strcpy(buf, DEPRECATEDREGIONS[i + 1]); - len = (int32_t)uprv_strlen(buf); - break; + for (int32_t i = 0; i < UPRV_LENGTHOF(DEPRECATEDREGIONS); i += 2) { + if (uprv_compareInvCharsAsAscii(buf.data(), DEPRECATEDREGIONS[i]) == 0) { + const char* const resolved = DEPRECATEDREGIONS[i + 1]; + sink.Append(resolved, (int32_t)uprv_strlen(resolved)); + return; } } - sink.Append(buf, len); + sink.Append(buf.data(), buf.length()); } } } -static void _sortVariants(VariantListEntry* first) { +void _sortVariants(VariantListEntry* first) { for (VariantListEntry* var1 = first; var1 != nullptr; var1 = var1->next) { for (VariantListEntry* var2 = var1->next; var2 != nullptr; var2 = var2->next) { // Swap var1->variant and var2->variant. @@ -1144,32 +1166,26 @@ static void _sortVariants(VariantListEntry* first) { } } -static void -_appendVariantsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool strict, UBool *hadPosix, UErrorCode* status) { - char buf[ULOC_FULLNAME_CAPACITY]; - UErrorCode tmpStatus = U_ZERO_ERROR; - int32_t len, i; - - if (U_FAILURE(*status)) { - return; - } +void +_appendVariantsToLanguageTag(const char* localeID, icu::ByteSink& sink, bool strict, bool& hadPosix, UErrorCode& status) { + if (U_FAILURE(status)) { return; } - len = uloc_getVariant(localeID, buf, sizeof(buf), &tmpStatus); + UErrorCode tmpStatus = U_ZERO_ERROR; + icu::CharString buf = ulocimp_getVariant(localeID, tmpStatus); if (U_FAILURE(tmpStatus) || tmpStatus == U_STRING_NOT_TERMINATED_WARNING) { if (strict) { - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; } return; } - if (len > 0) { + if (!buf.isEmpty()) { char *p, *pVar; - UBool bNext = true; - VariantListEntry *var; + bool bNext = true; VariantListEntry *varFirst = nullptr; pVar = nullptr; - p = buf; + p = buf.data(); while (bNext) { if (*p == SEP || *p == LOCALE_SEP || *p == 0) { if (*p == 0) { @@ -1179,42 +1195,40 @@ _appendVariantsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st } if (pVar == nullptr) { if (strict) { - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; break; } /* ignore empty variant */ } else { /* ICU uses upper case letters for variants, but the canonical format is lowercase in BCP47 */ - for (i = 0; *(pVar + i) != 0; i++) { + for (int32_t i = 0; *(pVar + i) != 0; i++) { *(pVar + i) = uprv_tolower(*(pVar + i)); } /* validate */ if (_isVariantSubtag(pVar, -1)) { - if (uprv_strcmp(pVar,POSIX_VALUE) || len != (int32_t)uprv_strlen(POSIX_VALUE)) { + if (uprv_strcmp(pVar,POSIX_VALUE) || buf.length() != (int32_t)uprv_strlen(POSIX_VALUE)) { /* emit the variant to the list */ - var = (VariantListEntry*)uprv_malloc(sizeof(VariantListEntry)); - if (var == nullptr) { - *status = U_MEMORY_ALLOCATION_ERROR; + icu::LocalPointer<VariantListEntry> var(new VariantListEntry, status); + if (U_FAILURE(status)) { break; } var->variant = pVar; - if (!_addVariantToList(&varFirst, var)) { + if (!_addVariantToList(&varFirst, std::move(var))) { /* duplicated variant */ - uprv_free(var); if (strict) { - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; break; } } } else { /* Special handling for POSIX variant, need to remember that we had it and then */ /* treat it like an extension later. */ - *hadPosix = true; + hadPosix = true; } } else if (strict) { - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; break; } else if (_isPrivateuseValueSubtag(pVar, -1)) { /* Handle private use subtags separately */ @@ -1229,7 +1243,7 @@ _appendVariantsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st p++; } - if (U_SUCCESS(*status)) { + if (U_SUCCESS(status)) { if (varFirst != nullptr) { int32_t varLen; @@ -1237,7 +1251,7 @@ _appendVariantsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st _sortVariants(varFirst); /* write out validated/normalized variants to the target */ - var = varFirst; + VariantListEntry* var = varFirst; while (var != nullptr) { sink.Append("-", 1); varLen = (int32_t)uprv_strlen(var->variant); @@ -1248,30 +1262,28 @@ _appendVariantsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st } /* clean up */ - var = varFirst; - while (var != nullptr) { + for (VariantListEntry* var = varFirst; var != nullptr; ) { VariantListEntry *tmpVar = var->next; - uprv_free(var); + delete var; var = tmpVar; } - if (U_FAILURE(*status)) { + if (U_FAILURE(status)) { return; } } } -static void -_appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool strict, UBool hadPosix, UErrorCode* status) { - char attrBuf[ULOC_KEYWORD_AND_VALUES_CAPACITY] = { 0 }; - int32_t attrBufLength = 0; +void +_appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, bool strict, bool hadPosix, UErrorCode& status) { + if (U_FAILURE(status)) { return; } icu::MemoryPool<AttributeListEntry> attrPool; icu::MemoryPool<ExtensionListEntry> extPool; icu::MemoryPool<icu::CharString> strPool; - icu::LocalUEnumerationPointer keywordEnum(uloc_openKeywords(localeID, status)); - if (U_FAILURE(*status) && !hadPosix) { + icu::LocalUEnumerationPointer keywordEnum(uloc_openKeywords(localeID, &status)); + if (U_FAILURE(status) && !hadPosix) { return; } if (keywordEnum.isValid() || hadPosix) { @@ -1286,28 +1298,24 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st const char *bcpKey=nullptr, *bcpValue=nullptr; UErrorCode tmpStatus = U_ZERO_ERROR; int32_t keylen; - UBool isBcpUExt; + bool isBcpUExt; while (true) { - key = uenum_next(keywordEnum.getAlias(), nullptr, status); + key = uenum_next(keywordEnum.getAlias(), nullptr, &status); if (key == nullptr) { break; } - icu::CharString buf; - { - icu::CharStringByteSink sink(&buf); - ulocimp_getKeywordValue(localeID, key, sink, &tmpStatus); - } + icu::CharString buf = ulocimp_getKeywordValue(localeID, key, tmpStatus); len = buf.length(); if (U_FAILURE(tmpStatus)) { if (tmpStatus == U_MEMORY_ALLOCATION_ERROR) { - *status = U_MEMORY_ALLOCATION_ERROR; + status = U_MEMORY_ALLOCATION_ERROR; break; } if (strict) { - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; break; } /* ignore this keyword */ @@ -1323,42 +1331,40 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st if (len > 0) { int32_t i = 0; while (true) { - attrBufLength = 0; + icu::CharString attrBuf; for (; i < len; i++) { if (buf[i] != '-') { - attrBuf[attrBufLength++] = buf[i]; + attrBuf.append(buf[i], status); } else { i++; break; } } - if (attrBufLength > 0) { - attrBuf[attrBufLength] = 0; - - } else if (i >= len){ + if (U_FAILURE(status)) { + return; + } + if (attrBuf.isEmpty() && i >= len) { break; } /* create AttributeListEntry */ attr = attrPool.create(); if (attr == nullptr) { - *status = U_MEMORY_ALLOCATION_ERROR; - break; - } - icu::CharString* attrValue = - strPool.create(attrBuf, attrBufLength, *status); - if (attrValue == nullptr) { - *status = U_MEMORY_ALLOCATION_ERROR; + status = U_MEMORY_ALLOCATION_ERROR; break; } - if (U_FAILURE(*status)) { + if (icu::CharString* str = + strPool.create(std::move(attrBuf), status)) { + if (U_FAILURE(status)) { break; } + attr->attribute = str->data(); + } else { + status = U_MEMORY_ALLOCATION_ERROR; break; } - attr->attribute = attrValue->data(); if (!_addAttributeToList(&firstAttr, attr)) { if (strict) { - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; break; } } @@ -1371,7 +1377,7 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st bcpKey = uloc_toUnicodeLocaleKey(key); if (bcpKey == nullptr) { if (strict) { - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; break; } continue; @@ -1381,7 +1387,7 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st bcpValue = uloc_toUnicodeLocaleType(key, buf.data()); if (bcpValue == nullptr) { if (strict) { - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; break; } continue; @@ -1396,11 +1402,11 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st icu::CharString* extBuf = extBufPool.create(buf, tmpStatus); if (extBuf == nullptr) { - *status = U_MEMORY_ALLOCATION_ERROR; + status = U_MEMORY_ALLOCATION_ERROR; break; } if (U_FAILURE(tmpStatus)) { - *status = tmpStatus; + status = tmpStatus; break; } @@ -1411,7 +1417,7 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st if (*key == PRIVATEUSE) { if (!ultag_isPrivateuseValueSubtags(buf.data(), len)) { if (strict) { - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; break; } continue; @@ -1419,7 +1425,7 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st } else { if (!_isExtensionSingleton(key, keylen) || !ultag_isExtensionSubtags(buf.data(), len)) { if (strict) { - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; break; } continue; @@ -1429,11 +1435,11 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st icu::CharString* extBuf = extBufPool.create(buf.data(), len, tmpStatus); if (extBuf == nullptr) { - *status = U_MEMORY_ALLOCATION_ERROR; + status = U_MEMORY_ALLOCATION_ERROR; break; } if (U_FAILURE(tmpStatus)) { - *status = tmpStatus; + status = tmpStatus; break; } bcpValue = extBuf->data(); @@ -1442,7 +1448,7 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st /* create ExtensionListEntry */ ext = extPool.create(); if (ext == nullptr) { - *status = U_MEMORY_ALLOCATION_ERROR; + status = U_MEMORY_ALLOCATION_ERROR; break; } ext->key = bcpKey; @@ -1450,7 +1456,7 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st if (!_addExtensionToList(&firstExt, ext, true)) { if (strict) { - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; break; } } @@ -1461,7 +1467,7 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st /* create ExtensionListEntry for POSIX */ ext = extPool.create(); if (ext == nullptr) { - *status = U_MEMORY_ALLOCATION_ERROR; + status = U_MEMORY_ALLOCATION_ERROR; return; } ext->key = POSIX_KEY; @@ -1472,8 +1478,8 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st } } - if (U_SUCCESS(*status) && (firstExt != nullptr || firstAttr != nullptr)) { - UBool startLDMLExtension = false; + if (U_SUCCESS(status) && (firstExt != nullptr || firstAttr != nullptr)) { + bool startLDMLExtension = false; for (ext = firstExt; ext; ext = ext->next) { if (!startLDMLExtension && uprv_strlen(ext->key) > 1) { /* first LDML u singlton extension */ @@ -1508,11 +1514,13 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st * e.g. "u-ca-gregory-co-trad" -> {calendar = gregorian} {collation = traditional} * Note: char* buf is used for storing keywords */ -static void -_appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendTo, icu::MemoryPool<ExtensionListEntry>& extPool, icu::MemoryPool<icu::CharString>& kwdBuf, UBool *posixVariant, UErrorCode *status) { +void +_appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendTo, icu::MemoryPool<ExtensionListEntry>& extPool, icu::MemoryPool<icu::CharString>& kwdBuf, bool& posixVariant, UErrorCode& status) { + if (U_FAILURE(status)) { return; } + const char *pTag; /* beginning of current subtag */ const char *pKwds; /* beginning of key-type pairs */ - UBool variantExists = *posixVariant; + bool variantExists = posixVariant; ExtensionListEntry *kwdFirst = nullptr; /* first LDML keyword */ ExtensionListEntry *kwd, *nextKwd; @@ -1520,7 +1528,7 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT int32_t len; /* Reset the posixVariant value */ - *posixVariant = false; + posixVariant = false; pTag = ldmlext; pKwds = nullptr; @@ -1529,9 +1537,7 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT AttributeListEntry *attrFirst = nullptr; /* first attribute */ AttributeListEntry *attr, *nextAttr; - char attrBuf[ULOC_KEYWORD_AND_VALUES_CAPACITY]; - int32_t attrBufIdx = 0; - + icu::MemoryPool<icu::CharString> strPool; icu::MemoryPool<AttributeListEntry> attrPool; /* Iterate through u extension attributes */ @@ -1547,17 +1553,15 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT /* add this attribute to the list */ attr = attrPool.create(); if (attr == nullptr) { - *status = U_MEMORY_ALLOCATION_ERROR; + status = U_MEMORY_ALLOCATION_ERROR; return; } - if (len < (int32_t)sizeof(attrBuf) - attrBufIdx) { - uprv_memcpy(&attrBuf[attrBufIdx], pTag, len); - attrBuf[attrBufIdx + len] = 0; - attr->attribute = &attrBuf[attrBufIdx]; - attrBufIdx += (len + 1); + if (icu::CharString* str = strPool.create(pTag, len, status)) { + if (U_FAILURE(status)) { return; } + attr->attribute = str->data(); } else { - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_MEMORY_ALLOCATION_ERROR; return; } @@ -1577,13 +1581,13 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT kwd = extPool.create(); if (kwd == nullptr) { - *status = U_MEMORY_ALLOCATION_ERROR; + status = U_MEMORY_ALLOCATION_ERROR; return; } icu::CharString* value = kwdBuf.create(); if (value == nullptr) { - *status = U_MEMORY_ALLOCATION_ERROR; + status = U_MEMORY_ALLOCATION_ERROR; return; } @@ -1592,12 +1596,12 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT while (attr != nullptr) { nextAttr = attr->next; if (attr != attrFirst) { - value->append('-', *status); + value->append('-', status); } - value->append(attr->attribute, *status); + value->append(attr->attribute, status); attr = nextAttr; } - if (U_FAILURE(*status)) { + if (U_FAILURE(status)) { return; } @@ -1605,7 +1609,7 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT kwd->value = value->data(); if (!_addExtensionToList(&kwdFirst, kwd, false)) { - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; return; } } @@ -1616,14 +1620,14 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT const char *pBcpType = nullptr; /* beginning of u extension type subtag(s) */ int32_t bcpKeyLen = 0; int32_t bcpTypeLen = 0; - UBool isDone = false; + bool isDone = false; pTag = pKwds; /* BCP47 representation of LDML key/type pairs */ while (!isDone) { const char *pNextBcpKey = nullptr; int32_t nextBcpKeyLen = 0; - UBool emitKeyword = false; + bool emitKeyword = false; if (*pTag) { /* locate next separator char */ @@ -1671,7 +1675,7 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT if (bcpKeyLen >= (int32_t)sizeof(bcpKeyBuf)) { /* the BCP key is invalid */ - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; return; } U_ASSERT(bcpKeyLen <= 2); @@ -1682,7 +1686,7 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT /* u extension key to LDML key */ pKey = uloc_toLegacyKey(bcpKeyBuf); if (pKey == nullptr) { - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; return; } if (pKey == bcpKeyBuf) { @@ -1691,50 +1695,44 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT We normalize the result key to lower case. */ T_CString_toLowerCase(bcpKeyBuf); - icu::CharString* key = kwdBuf.create(bcpKeyBuf, bcpKeyLen, *status); + icu::CharString* key = kwdBuf.create(bcpKeyBuf, bcpKeyLen, status); if (key == nullptr) { - *status = U_MEMORY_ALLOCATION_ERROR; + status = U_MEMORY_ALLOCATION_ERROR; return; } - if (U_FAILURE(*status)) { + if (U_FAILURE(status)) { return; } pKey = key->data(); } if (pBcpType) { - char bcpTypeBuf[128]; /* practically long enough even considering multiple subtag type */ - if (bcpTypeLen >= (int32_t)sizeof(bcpTypeBuf)) { - /* the BCP type is too long */ - *status = U_ILLEGAL_ARGUMENT_ERROR; + icu::CharString bcpTypeBuf(pBcpType, bcpTypeLen, status); + if (U_FAILURE(status)) { return; } - uprv_strncpy(bcpTypeBuf, pBcpType, bcpTypeLen); - bcpTypeBuf[bcpTypeLen] = 0; - /* BCP type to locale type */ - pType = uloc_toLegacyType(pKey, bcpTypeBuf); + pType = uloc_toLegacyType(pKey, bcpTypeBuf.data()); if (pType == nullptr) { - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; return; } - if (pType == bcpTypeBuf) { + if (pType == bcpTypeBuf.data()) { /* The type returned by toLegacyType points to the input buffer. We normalize the result type to lower case. */ /* normalize to lower case */ - T_CString_toLowerCase(bcpTypeBuf); - icu::CharString* type = kwdBuf.create(bcpTypeBuf, bcpTypeLen, *status); - if (type == nullptr) { - *status = U_MEMORY_ALLOCATION_ERROR; - return; - } - if (U_FAILURE(*status)) { + T_CString_toLowerCase(bcpTypeBuf.data()); + if (icu::CharString* type = + kwdBuf.create(std::move(bcpTypeBuf), status)) { + if (U_FAILURE(status)) { return; } + pType = type->data(); + } else { + status = U_MEMORY_ALLOCATION_ERROR; return; } - pType = type->data(); } } else { /* typeless - default type value is "yes" */ @@ -1744,12 +1742,12 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT /* Special handling for u-va-posix, since we want to treat this as a variant, not as a keyword */ if (!variantExists && !uprv_strcmp(pKey, POSIX_KEY) && !uprv_strcmp(pType, POSIX_VALUE) ) { - *posixVariant = true; + posixVariant = true; } else { /* create an ExtensionListEntry for this keyword */ kwd = extPool.create(); if (kwd == nullptr) { - *status = U_MEMORY_ALLOCATION_ERROR; + status = U_MEMORY_ALLOCATION_ERROR; return; } @@ -1778,9 +1776,10 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT } } +void +_appendKeywords(ULanguageTag* langtag, icu::ByteSink& sink, UErrorCode& status) { + if (U_FAILURE(status)) { return; } -static void -_appendKeywords(ULanguageTag* langtag, icu::ByteSink& sink, UErrorCode* status) { int32_t i, n; int32_t len; ExtensionListEntry *kwdFirst = nullptr; @@ -1788,11 +1787,7 @@ _appendKeywords(ULanguageTag* langtag, icu::ByteSink& sink, UErrorCode* status) const char *key, *type; icu::MemoryPool<ExtensionListEntry> extPool; icu::MemoryPool<icu::CharString> kwdBuf; - UBool posixVariant = false; - - if (U_FAILURE(*status)) { - return; - } + bool posixVariant = false; n = ultag_getExtensionsSize(langtag); @@ -1806,37 +1801,37 @@ _appendKeywords(ULanguageTag* langtag, icu::ByteSink& sink, UErrorCode* status) posixVariant = true; } - _appendLDMLExtensionAsKeywords(type, &kwdFirst, extPool, kwdBuf, &posixVariant, status); - if (U_FAILURE(*status)) { + _appendLDMLExtensionAsKeywords(type, &kwdFirst, extPool, kwdBuf, posixVariant, status); + if (U_FAILURE(status)) { break; } } else { kwd = extPool.create(); if (kwd == nullptr) { - *status = U_MEMORY_ALLOCATION_ERROR; + status = U_MEMORY_ALLOCATION_ERROR; break; } kwd->key = key; kwd->value = type; if (!_addExtensionToList(&kwdFirst, kwd, false)) { - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; break; } } } - if (U_SUCCESS(*status)) { + if (U_SUCCESS(status)) { type = ultag_getPrivateUse(langtag); if ((int32_t)uprv_strlen(type) > 0) { /* add private use as a keyword */ kwd = extPool.create(); if (kwd == nullptr) { - *status = U_MEMORY_ALLOCATION_ERROR; + status = U_MEMORY_ALLOCATION_ERROR; } else { kwd->key = PRIVATEUSE_KEY; kwd->value = type; if (!_addExtensionToList(&kwdFirst, kwd, false)) { - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; } } } @@ -1844,14 +1839,14 @@ _appendKeywords(ULanguageTag* langtag, icu::ByteSink& sink, UErrorCode* status) /* If a POSIX variant was in the extensions, write it out before writing the keywords. */ - if (U_SUCCESS(*status) && posixVariant) { + if (U_SUCCESS(status) && posixVariant) { len = (int32_t) uprv_strlen(_POSIX); sink.Append(_POSIX, len); } - if (U_SUCCESS(*status) && kwdFirst != nullptr) { + if (U_SUCCESS(status) && kwdFirst != nullptr) { /* write out the sorted keywords */ - UBool firstValue = true; + bool firstValue = true; kwd = kwdFirst; do { if (firstValue) { @@ -1875,36 +1870,27 @@ _appendKeywords(ULanguageTag* langtag, icu::ByteSink& sink, UErrorCode* status) } } -static void -_appendPrivateuseToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool strict, UBool hadPosix, UErrorCode* status) { - (void)hadPosix; - char buf[ULOC_FULLNAME_CAPACITY]; - char tmpAppend[ULOC_FULLNAME_CAPACITY]; - UErrorCode tmpStatus = U_ZERO_ERROR; - int32_t len, i; - int32_t reslen = 0; - int32_t capacity = sizeof tmpAppend; - - if (U_FAILURE(*status)) { - return; - } +void +_appendPrivateuseToLanguageTag(const char* localeID, icu::ByteSink& sink, bool strict, bool /*hadPosix*/, UErrorCode& status) { + if (U_FAILURE(status)) { return; } - len = uloc_getVariant(localeID, buf, sizeof(buf), &tmpStatus); - if (U_FAILURE(tmpStatus) || tmpStatus == U_STRING_NOT_TERMINATED_WARNING) { + UErrorCode tmpStatus = U_ZERO_ERROR; + icu::CharString buf = ulocimp_getVariant(localeID, tmpStatus); + if (U_FAILURE(tmpStatus)) { if (strict) { - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; } return; } - if (len > 0) { + if (!buf.isEmpty()) { char *p, *pPriv; - UBool bNext = true; - UBool firstValue = true; - UBool writeValue; + bool bNext = true; + bool firstValue = true; + bool writeValue; pPriv = nullptr; - p = buf; + p = buf.data(); while (bNext) { writeValue = false; if (*p == SEP || *p == LOCALE_SEP || *p == 0) { @@ -1915,7 +1901,7 @@ _appendPrivateuseToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool } if (pPriv != nullptr) { /* Private use in the canonical format is lowercase in BCP47 */ - for (i = 0; *(pPriv + i) != 0; i++) { + for (int32_t i = 0; *(pPriv + i) != 0; i++) { *(pPriv + i) = uprv_tolower(*(pPriv + i)); } @@ -1929,44 +1915,25 @@ _appendPrivateuseToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool writeValue = true; } } else if (strict) { - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; break; } else { break; } if (writeValue) { - if (reslen < capacity) { - tmpAppend[reslen++] = SEP; - } + sink.Append("-", 1); if (firstValue) { - if (reslen < capacity) { - tmpAppend[reslen++] = *PRIVATEUSE_KEY; - } - - if (reslen < capacity) { - tmpAppend[reslen++] = SEP; - } - - len = (int32_t)uprv_strlen(PRIVUSE_VARIANT_PREFIX); - if (reslen < capacity) { - uprv_memcpy(tmpAppend + reslen, PRIVUSE_VARIANT_PREFIX, uprv_min(len, capacity - reslen)); - } - reslen += len; - - if (reslen < capacity) { - tmpAppend[reslen++] = SEP; - } - + sink.Append(PRIVATEUSE_KEY, UPRV_LENGTHOF(PRIVATEUSE_KEY) - 1); + sink.Append("-", 1); + sink.Append(PRIVUSE_VARIANT_PREFIX, UPRV_LENGTHOF(PRIVUSE_VARIANT_PREFIX) - 1); + sink.Append("-", 1); firstValue = false; } - len = (int32_t)uprv_strlen(pPriv); - if (reslen < capacity) { - uprv_memcpy(tmpAppend + reslen, pPriv, uprv_min(len, capacity - reslen)); - } - reslen += len; + int32_t len = (int32_t)uprv_strlen(pPriv); + sink.Append(pPriv, len); } } /* reset private use starting position */ @@ -1976,15 +1943,6 @@ _appendPrivateuseToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool } p++; } - - if (U_FAILURE(*status)) { - return; - } - } - - if (U_SUCCESS(*status)) { - len = reslen; - sink.Append(tmpAppend, len); } } @@ -2016,27 +1974,25 @@ _appendPrivateuseToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool #pragma optimize( "", off ) #endif -static ULanguageTag* -ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* status) { +ULanguageTag* +ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode& status) { + if (U_FAILURE(status)) { return nullptr; } + char *tagBuf; int16_t next; char *pSubtag, *pNext, *pLastGoodPosition; int32_t subtagLen; int32_t extlangIdx; - ExtensionListEntry *pExtension; + icu::LocalPointer<ExtensionListEntry> pExtension; char *pExtValueSubtag, *pExtValueSubtagEnd; int32_t i; - UBool privateuseVar = false; + bool privateuseVar = false; int32_t legacyLen = 0; if (parsedLen != nullptr) { *parsedLen = 0; } - if (U_FAILURE(*status)) { - return nullptr; - } - if (tagLen < 0) { tagLen = (int32_t)uprv_strlen(tag); } @@ -2044,7 +2000,7 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta /* copy the entire string */ tagBuf = (char*)uprv_malloc(tagLen + 1); if (tagBuf == nullptr) { - *status = U_MEMORY_ALLOCATION_ERROR; + status = U_MEMORY_ALLOCATION_ERROR; return nullptr; } @@ -2058,7 +2014,7 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta (ULanguageTag*)uprv_malloc(sizeof(ULanguageTag))); if (t.isNull()) { uprv_free(tagBuf); - *status = U_MEMORY_ALLOCATION_ERROR; + status = U_MEMORY_ALLOCATION_ERROR; return nullptr; } _initializeULanguageTag(t.getAlias()); @@ -2092,12 +2048,13 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta int32_t oldTagLength = tagLen; if (tagLen < newTagLength) { uprv_free(tagBuf); - tagBuf = (char*)uprv_malloc(newTagLength + 1); + // Change t->buf after the free and before return to avoid the second double free in + // the destructor of t when t is out of scope. + t->buf = tagBuf = (char*)uprv_malloc(newTagLength + 1); if (tagBuf == nullptr) { - *status = U_MEMORY_ALLOCATION_ERROR; + status = U_MEMORY_ALLOCATION_ERROR; return nullptr; } - t->buf = tagBuf; tagLen = newTagLength; } parsedLenDelta = checkLegacyLen - replacementLen; @@ -2154,7 +2111,6 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta next = LANG | PRIV; pNext = pLastGoodPosition = tagBuf; extlangIdx = 0; - pExtension = nullptr; pExtValueSubtag = nullptr; pExtValueSubtagEnd = nullptr; @@ -2240,20 +2196,14 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta if (next & VART) { if (_isVariantSubtag(pSubtag, subtagLen) || (privateuseVar && _isPrivateuseVariantSubtag(pSubtag, subtagLen))) { - VariantListEntry *var; - UBool isAdded; - - var = (VariantListEntry*)uprv_malloc(sizeof(VariantListEntry)); - if (var == nullptr) { - *status = U_MEMORY_ALLOCATION_ERROR; + icu::LocalPointer<VariantListEntry> var(new VariantListEntry, status); + if (U_FAILURE(status)) { return nullptr; } *pSep = 0; var->variant = T_CString_toUpperCase(pSubtag); - isAdded = _addVariantToList(&(t->variants), var); - if (!isAdded) { + if (!_addVariantToList(&(t->variants), std::move(var))) { /* duplicated variant entry */ - uprv_free(var); break; } pLastGoodPosition = pSep; @@ -2263,11 +2213,10 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta } if (next & EXTS) { if (_isExtensionSingleton(pSubtag, subtagLen)) { - if (pExtension != nullptr) { + if (pExtension.isValid()) { if (pExtValueSubtag == nullptr || pExtValueSubtagEnd == nullptr) { /* the previous extension is incomplete */ - uprv_free(pExtension); - pExtension = nullptr; + delete pExtension.orphan(); break; } @@ -2276,20 +2225,19 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta pExtension->value = T_CString_toLowerCase(pExtValueSubtag); /* insert the extension to the list */ - if (_addExtensionToList(&(t->extensions), pExtension, false)) { + if (_addExtensionToList(&(t->extensions), pExtension.getAlias(), false)) { + pExtension.orphan(); pLastGoodPosition = pExtValueSubtagEnd; } else { /* stop parsing here */ - uprv_free(pExtension); - pExtension = nullptr; + delete pExtension.orphan(); break; } } /* create a new extension */ - pExtension = (ExtensionListEntry*)uprv_malloc(sizeof(ExtensionListEntry)); - if (pExtension == nullptr) { - *status = U_MEMORY_ALLOCATION_ERROR; + pExtension.adoptInsteadAndCheckErrorCode(new ExtensionListEntry, status); + if (U_FAILURE(status)) { return nullptr; } *pSep = 0; @@ -2326,12 +2274,11 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta if (uprv_tolower(*pSubtag) == PRIVATEUSE && subtagLen == 1) { char *pPrivuseVal; - if (pExtension != nullptr) { + if (pExtension.isValid()) { /* Process the last extension */ if (pExtValueSubtag == nullptr || pExtValueSubtagEnd == nullptr) { /* the previous extension is incomplete */ - uprv_free(pExtension); - pExtension = nullptr; + delete pExtension.orphan(); break; } else { /* terminate the previous extension value */ @@ -2339,13 +2286,12 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta pExtension->value = T_CString_toLowerCase(pExtValueSubtag); /* insert the extension to the list */ - if (_addExtensionToList(&(t->extensions), pExtension, false)) { + if (_addExtensionToList(&(t->extensions), pExtension.getAlias(), false)) { + pExtension.orphan(); pLastGoodPosition = pExtValueSubtagEnd; - pExtension = nullptr; } else { /* stop parsing here */ - uprv_free(pExtension); - pExtension = nullptr; + delete pExtension.orphan(); break; } } @@ -2407,20 +2353,21 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta break; } - if (pExtension != nullptr) { + if (pExtension.isValid()) { /* Process the last extension */ if (pExtValueSubtag == nullptr || pExtValueSubtagEnd == nullptr) { /* the previous extension is incomplete */ - uprv_free(pExtension); + delete pExtension.orphan(); } else { /* terminate the previous extension value */ *pExtValueSubtagEnd = 0; pExtension->value = T_CString_toLowerCase(pExtValueSubtag); /* insert the extension to the list */ - if (_addExtensionToList(&(t->extensions), pExtension, false)) { + if (_addExtensionToList(&(t->extensions), pExtension.getAlias(), false)) { + pExtension.orphan(); pLastGoodPosition = pExtValueSubtagEnd; } else { - uprv_free(pExtension); + delete pExtension.orphan(); } } } @@ -2437,7 +2384,7 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta #pragma optimize( "", on ) #endif -static void +void ultag_close(ULanguageTag* langtag) { if (langtag == nullptr) { @@ -2450,7 +2397,7 @@ ultag_close(ULanguageTag* langtag) { VariantListEntry *curVar = langtag->variants; while (curVar) { VariantListEntry *nextVar = curVar->next; - uprv_free(curVar); + delete curVar; curVar = nextVar; } } @@ -2459,7 +2406,7 @@ ultag_close(ULanguageTag* langtag) { ExtensionListEntry *curExt = langtag->extensions; while (curExt) { ExtensionListEntry *nextExt = curExt->next; - uprv_free(curExt); + delete curExt; curExt = nextExt; } } @@ -2467,13 +2414,13 @@ ultag_close(ULanguageTag* langtag) { uprv_free(langtag); } -static const char* +const char* ultag_getLanguage(const ULanguageTag* langtag) { return langtag->language; } #if 0 -static const char* +const char* ultag_getJDKLanguage(const ULanguageTag* langtag) { int32_t i; for (i = 0; DEPRECATEDLANGS[i] != nullptr; i += 2) { @@ -2485,7 +2432,7 @@ ultag_getJDKLanguage(const ULanguageTag* langtag) { } #endif -static const char* +const char* ultag_getExtlang(const ULanguageTag* langtag, int32_t idx) { if (idx >= 0 && idx < MAXEXTLANG) { return langtag->extlang[idx]; @@ -2493,7 +2440,7 @@ ultag_getExtlang(const ULanguageTag* langtag, int32_t idx) { return nullptr; } -static int32_t +int32_t ultag_getExtlangSize(const ULanguageTag* langtag) { int32_t size = 0; int32_t i; @@ -2505,17 +2452,17 @@ ultag_getExtlangSize(const ULanguageTag* langtag) { return size; } -static const char* +const char* ultag_getScript(const ULanguageTag* langtag) { return langtag->script; } -static const char* +const char* ultag_getRegion(const ULanguageTag* langtag) { return langtag->region; } -static const char* +const char* ultag_getVariant(const ULanguageTag* langtag, int32_t idx) { const char *var = nullptr; VariantListEntry *cur = langtag->variants; @@ -2531,7 +2478,7 @@ ultag_getVariant(const ULanguageTag* langtag, int32_t idx) { return var; } -static int32_t +int32_t ultag_getVariantsSize(const ULanguageTag* langtag) { int32_t size = 0; VariantListEntry *cur = langtag->variants; @@ -2545,7 +2492,7 @@ ultag_getVariantsSize(const ULanguageTag* langtag) { return size; } -static const char* +const char* ultag_getExtensionKey(const ULanguageTag* langtag, int32_t idx) { const char *key = nullptr; ExtensionListEntry *cur = langtag->extensions; @@ -2561,7 +2508,7 @@ ultag_getExtensionKey(const ULanguageTag* langtag, int32_t idx) { return key; } -static const char* +const char* ultag_getExtensionValue(const ULanguageTag* langtag, int32_t idx) { const char *val = nullptr; ExtensionListEntry *cur = langtag->extensions; @@ -2577,7 +2524,7 @@ ultag_getExtensionValue(const ULanguageTag* langtag, int32_t idx) { return val; } -static int32_t +int32_t ultag_getExtensionsSize(const ULanguageTag* langtag) { int32_t size = 0; ExtensionListEntry *cur = langtag->extensions; @@ -2591,18 +2538,19 @@ ultag_getExtensionsSize(const ULanguageTag* langtag) { return size; } -static const char* +const char* ultag_getPrivateUse(const ULanguageTag* langtag) { return langtag->privateuse; } #if 0 -static const char* +const char* ultag_getLegacy(const ULanguageTag* langtag) { return langtag->legacy; } #endif +} // namespace /* * ------------------------------------------------- @@ -2617,89 +2565,48 @@ uloc_toLanguageTag(const char* localeID, int32_t langtagCapacity, UBool strict, UErrorCode* status) { - if (U_FAILURE(*status)) { - return 0; - } - - icu::CheckedArrayByteSink sink(langtag, langtagCapacity); - ulocimp_toLanguageTag(localeID, sink, strict, status); - - int32_t reslen = sink.NumberOfBytesAppended(); - - if (U_FAILURE(*status)) { - return reslen; - } - - if (sink.Overflowed()) { - *status = U_BUFFER_OVERFLOW_ERROR; - } else { - u_terminateChars(langtag, langtagCapacity, reslen, status); - } - - return reslen; + return icu::ByteSinkUtil::viaByteSinkToTerminatedChars( + langtag, langtagCapacity, + [&](icu::ByteSink& sink, UErrorCode& status) { + ulocimp_toLanguageTag(localeID, sink, strict, status); + }, + *status); } +U_EXPORT icu::CharString +ulocimp_toLanguageTag(const char* localeID, + bool strict, + UErrorCode& status) { + return icu::ByteSinkUtil::viaByteSinkToCharString( + [&](icu::ByteSink& sink, UErrorCode& status) { + ulocimp_toLanguageTag(localeID, sink, strict, status); + }, + status); +} -U_CAPI void U_EXPORT2 +U_EXPORT void ulocimp_toLanguageTag(const char* localeID, icu::ByteSink& sink, - UBool strict, - UErrorCode* status) { - icu::CharString canonical; - int32_t reslen; + bool strict, + UErrorCode& status) { + if (U_FAILURE(status)) { return; } + UErrorCode tmpStatus = U_ZERO_ERROR; - UBool hadPosix = false; + bool hadPosix = false; const char* pKeywordStart; /* Note: uloc_canonicalize returns "en_US_POSIX" for input locale ID "". See #6835 */ - int32_t resultCapacity = static_cast<int32_t>(uprv_strlen(localeID)); - if (resultCapacity > 0) { - char* buffer; - - for (;;) { - buffer = canonical.getAppendBuffer( - /*minCapacity=*/resultCapacity, - /*desiredCapacityHint=*/resultCapacity, - resultCapacity, - tmpStatus); - - if (U_FAILURE(tmpStatus)) { - *status = tmpStatus; - return; - } - - reslen = - uloc_canonicalize(localeID, buffer, resultCapacity, &tmpStatus); - - if (tmpStatus != U_BUFFER_OVERFLOW_ERROR) { - break; - } - - resultCapacity = reslen; - tmpStatus = U_ZERO_ERROR; - } - - if (U_FAILURE(tmpStatus)) { - *status = U_ILLEGAL_ARGUMENT_ERROR; - return; - } - - canonical.append(buffer, reslen, tmpStatus); - if (tmpStatus == U_STRING_NOT_TERMINATED_WARNING) { - tmpStatus = U_ZERO_ERROR; // Terminators provided by CharString. - } - - if (U_FAILURE(tmpStatus)) { - *status = tmpStatus; - return; - } + icu::CharString canonical = ulocimp_canonicalize(localeID, tmpStatus); + if (U_FAILURE(tmpStatus)) { + status = tmpStatus; + return; } /* For handling special case - private use only tag */ pKeywordStart = locale_getKeywordsStart(canonical.data()); if (pKeywordStart == canonical.data()) { int kwdCnt = 0; - UBool done = false; + bool done = false; icu::LocalUEnumerationPointer kwdEnum(uloc_openKeywords(canonical.data(), &tmpStatus)); if (U_SUCCESS(tmpStatus)) { @@ -2710,11 +2617,7 @@ ulocimp_toLanguageTag(const char* localeID, key = uenum_next(kwdEnum.getAlias(), &len, &tmpStatus); if (len == 1 && *key == PRIVATEUSE) { - icu::CharString buf; - { - icu::CharStringByteSink sink(&buf); - ulocimp_getKeywordValue(localeID, key, sink, &tmpStatus); - } + icu::CharString buf = ulocimp_getKeywordValue(localeID, key, tmpStatus); if (U_SUCCESS(tmpStatus)) { if (ultag_isPrivateuseValueSubtags(buf.data(), buf.length())) { /* return private use only tag */ @@ -2722,12 +2625,12 @@ ulocimp_toLanguageTag(const char* localeID, sink.Append(buf.data(), buf.length()); done = true; } else if (strict) { - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; done = true; } /* if not strict mode, then "und" will be returned */ } else { - *status = U_ILLEGAL_ARGUMENT_ERROR; + status = U_ILLEGAL_ARGUMENT_ERROR; done = true; } } @@ -2741,7 +2644,7 @@ ulocimp_toLanguageTag(const char* localeID, _appendLanguageToLanguageTag(canonical.data(), sink, strict, status); _appendScriptToLanguageTag(canonical.data(), sink, strict, status); _appendRegionToLanguageTag(canonical.data(), sink, strict, status); - _appendVariantsToLanguageTag(canonical.data(), sink, strict, &hadPosix, status); + _appendVariantsToLanguageTag(canonical.data(), sink, strict, hadPosix, status); _appendKeywordsToLanguageTag(canonical.data(), sink, strict, hadPosix, status); _appendPrivateuseToLanguageTag(canonical.data(), sink, strict, hadPosix, status); } @@ -2753,43 +2656,42 @@ uloc_forLanguageTag(const char* langtag, int32_t localeIDCapacity, int32_t* parsedLength, UErrorCode* status) { - if (U_FAILURE(*status)) { - return 0; - } - - icu::CheckedArrayByteSink sink(localeID, localeIDCapacity); - ulocimp_forLanguageTag(langtag, -1, sink, parsedLength, status); - - int32_t reslen = sink.NumberOfBytesAppended(); - - if (U_FAILURE(*status)) { - return reslen; - } - - if (sink.Overflowed()) { - *status = U_BUFFER_OVERFLOW_ERROR; - } else { - u_terminateChars(localeID, localeIDCapacity, reslen, status); - } - - return reslen; + return icu::ByteSinkUtil::viaByteSinkToTerminatedChars( + localeID, localeIDCapacity, + [&](icu::ByteSink& sink, UErrorCode& status) { + ulocimp_forLanguageTag(langtag, -1, sink, parsedLength, status); + }, + *status); } +U_EXPORT icu::CharString +ulocimp_forLanguageTag(const char* langtag, + int32_t tagLen, + int32_t* parsedLength, + UErrorCode& status) { + return icu::ByteSinkUtil::viaByteSinkToCharString( + [&](icu::ByteSink& sink, UErrorCode& status) { + ulocimp_forLanguageTag(langtag, tagLen, sink, parsedLength, status); + }, + status); +} -U_CAPI void U_EXPORT2 +U_EXPORT void ulocimp_forLanguageTag(const char* langtag, int32_t tagLen, icu::ByteSink& sink, int32_t* parsedLength, - UErrorCode* status) { - UBool isEmpty = true; + UErrorCode& status) { + if (U_FAILURE(status)) { return; } + + bool isEmpty = true; const char *subtag, *p; int32_t len; int32_t i, n; - UBool noRegion = true; + bool noRegion = true; icu::LocalULanguageTagPointer lt(ultag_parse(langtag, tagLen, parsedLength, status)); - if (U_FAILURE(*status)) { + if (U_FAILURE(status)) { return; } diff --git a/contrib/libs/icu/common/ulocale.cpp b/contrib/libs/icu/common/ulocale.cpp new file mode 100644 index 0000000000..aaa17954a3 --- /dev/null +++ b/contrib/libs/icu/common/ulocale.cpp @@ -0,0 +1,96 @@ +// © 2023 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +// +#include "unicode/bytestream.h" +#include "unicode/errorcode.h" +#include "unicode/stringpiece.h" +#include "unicode/utypes.h" +#include "unicode/ustring.h" +#include "unicode/ulocale.h" +#include "unicode/locid.h" + +#include "bytesinkutil.h" +#include "charstr.h" +#include "cmemory.h" + +U_NAMESPACE_USE +#define EXTERNAL(i) (reinterpret_cast<ULocale*>(i)) +#define CONST_INTERNAL(e) (reinterpret_cast<const icu::Locale*>(e)) +#define INTERNAL(e) (reinterpret_cast<icu::Locale*>(e)) + +ULocale* +ulocale_openForLocaleID(const char* localeID, int32_t length, UErrorCode* err) { + if (U_FAILURE(*err)) { return nullptr; } + CharString str(length < 0 ? StringPiece(localeID) : StringPiece(localeID, length), *err); + if (U_FAILURE(*err)) { return nullptr; } + return EXTERNAL(icu::Locale::createFromName(str.data()).clone()); +} + +ULocale* +ulocale_openForLanguageTag(const char* tag, int32_t length, UErrorCode* err) { + if (U_FAILURE(*err)) { return nullptr; } + Locale l = icu::Locale::forLanguageTag(length < 0 ? StringPiece(tag) : StringPiece(tag, length), *err); + if (U_FAILURE(*err)) { return nullptr; } + return EXTERNAL(l.clone()); +} + +void +ulocale_close(ULocale* locale) { + delete INTERNAL(locale); +} + +#define IMPL_ULOCALE_STRING_GETTER(N1, N2) \ +const char* ulocale_get ## N1(const ULocale* locale) { \ + if (locale == nullptr) return nullptr; \ + return CONST_INTERNAL(locale)->get ## N2(); \ +} + +#define IMPL_ULOCALE_STRING_IDENTICAL_GETTER(N) IMPL_ULOCALE_STRING_GETTER(N, N) + +#define IMPL_ULOCALE_GET_KEYWORD_VALUE(N) \ +int32_t ulocale_get ##N ( \ + const ULocale* locale, const char* keyword, int32_t keywordLength, \ + char* valueBuffer, int32_t bufferCapacity, UErrorCode *err) { \ + if (U_FAILURE(*err)) return 0; \ + if (locale == nullptr) { \ + *err = U_ILLEGAL_ARGUMENT_ERROR; \ + return 0; \ + } \ + return ByteSinkUtil::viaByteSinkToTerminatedChars( \ + valueBuffer, bufferCapacity, \ + [&](ByteSink& sink, UErrorCode& status) { \ + CONST_INTERNAL(locale)->get ## N( \ + keywordLength < 0 ? StringPiece(keyword) : StringPiece(keyword, keywordLength), \ + sink, status); \ + }, \ + *err); \ +} + +#define IMPL_ULOCALE_GET_KEYWORDS(N) \ +UEnumeration* ulocale_get ## N(const ULocale* locale, UErrorCode *err) { \ + if (U_FAILURE(*err)) return nullptr; \ + if (locale == nullptr) { \ + *err = U_ILLEGAL_ARGUMENT_ERROR; \ + return nullptr; \ + } \ + return uenum_openFromStringEnumeration( \ + CONST_INTERNAL(locale)->create ## N(*err), err); \ +} + +IMPL_ULOCALE_STRING_IDENTICAL_GETTER(Language) +IMPL_ULOCALE_STRING_IDENTICAL_GETTER(Script) +IMPL_ULOCALE_STRING_GETTER(Region, Country) +IMPL_ULOCALE_STRING_IDENTICAL_GETTER(Variant) +IMPL_ULOCALE_STRING_GETTER(LocaleID, Name) +IMPL_ULOCALE_STRING_IDENTICAL_GETTER(BaseName) +IMPL_ULOCALE_GET_KEYWORD_VALUE(KeywordValue) +IMPL_ULOCALE_GET_KEYWORD_VALUE(UnicodeKeywordValue) +IMPL_ULOCALE_GET_KEYWORDS(Keywords) +IMPL_ULOCALE_GET_KEYWORDS(UnicodeKeywords) + +bool ulocale_isBogus(const ULocale* locale) { + if (locale == nullptr) return false; + return CONST_INTERNAL(locale)->isBogus(); +} + +/*eof*/ diff --git a/contrib/libs/icu/common/ulocbuilder.cpp b/contrib/libs/icu/common/ulocbuilder.cpp new file mode 100644 index 0000000000..3b46647362 --- /dev/null +++ b/contrib/libs/icu/common/ulocbuilder.cpp @@ -0,0 +1,151 @@ +// © 2023 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include <utility> + +#include "unicode/bytestream.h" +#include "unicode/localebuilder.h" +#include "unicode/locid.h" +#include "unicode/stringpiece.h" +#include "unicode/umachine.h" +#include "unicode/ulocbuilder.h" +#include "bytesinkutil.h" +#include "cstring.h" +#include "ustr_imp.h" + +using icu::StringPiece; + +#define EXTERNAL(i) (reinterpret_cast<ULocaleBuilder*>(i)) +#define INTERNAL(e) (reinterpret_cast<icu::LocaleBuilder*>(e)) +#define CONST_INTERNAL(e) (reinterpret_cast<const icu::LocaleBuilder*>(e)) + +ULocaleBuilder* ulocbld_open() { + return EXTERNAL(new icu::LocaleBuilder()); +} + +void ulocbld_close(ULocaleBuilder* builder) { + if (builder == nullptr) return; + delete INTERNAL(builder); +} + +void ulocbld_setLocale(ULocaleBuilder* builder, const char* locale, int32_t length) { + if (builder == nullptr) return; + icu::Locale l; + if (length < 0 || locale[length] == '\0') { + l = icu::Locale(locale); + } else { + if (length >= ULOC_FULLNAME_CAPACITY) { + l.setToBogus(); + } else { + // locale is not null termined but Locale API require one. + // Create a null termined version in buf. + char buf[ULOC_FULLNAME_CAPACITY]; + uprv_memcpy(buf, locale, length); + buf[length] = '\0'; + l = icu::Locale(buf); + } + } + INTERNAL(builder)->setLocale(l); +} + +void +ulocbld_adoptULocale(ULocaleBuilder* builder, ULocale* locale) { + if (builder == nullptr) return; + INTERNAL(builder)->setLocale(*(reinterpret_cast<const icu::Locale*>(locale))); + ulocale_close(locale); +} + +#define STRING_PIECE(s, l) ((l)<0 ? StringPiece(s) : StringPiece((s), (l))) + +#define IMPL_ULOCBLD_SETTER(N) \ +void ulocbld_##N(ULocaleBuilder* bld, const char* s, int32_t l) { \ + if (bld == nullptr) return; \ + INTERNAL(bld)->N(STRING_PIECE(s,l)); \ +} + +IMPL_ULOCBLD_SETTER(setLanguageTag) +IMPL_ULOCBLD_SETTER(setLanguage) +IMPL_ULOCBLD_SETTER(setScript) +IMPL_ULOCBLD_SETTER(setRegion) +IMPL_ULOCBLD_SETTER(setVariant) +IMPL_ULOCBLD_SETTER(addUnicodeLocaleAttribute) +IMPL_ULOCBLD_SETTER(removeUnicodeLocaleAttribute) + +void ulocbld_setExtension(ULocaleBuilder* builder, char key, const char* value, int32_t length) { + if (builder == nullptr) return; + INTERNAL(builder)->setExtension(key, STRING_PIECE(value, length)); +} + +void ulocbld_setUnicodeLocaleKeyword( + ULocaleBuilder* builder, const char* key, int32_t keyLength, + const char* type, int32_t typeLength) { + if (builder == nullptr) return; + INTERNAL(builder)->setUnicodeLocaleKeyword( + STRING_PIECE(key, keyLength), STRING_PIECE(type, typeLength)); +} + +void ulocbld_clear(ULocaleBuilder* builder) { + if (builder == nullptr) return; + INTERNAL(builder)->clear(); +} + +void ulocbld_clearExtensions(ULocaleBuilder* builder) { + if (builder == nullptr) return; + INTERNAL(builder)->clearExtensions(); +} + + +ULocale* ulocbld_buildULocale(ULocaleBuilder* builder, UErrorCode* err) { + if (builder == nullptr) { + *err = U_ILLEGAL_ARGUMENT_ERROR; + return nullptr; + } + icu::Locale l = INTERNAL(builder)->build(*err); + if (U_FAILURE(*err)) return nullptr; + icu::Locale* r = l.clone(); + if (r == nullptr) { + *err = U_MEMORY_ALLOCATION_ERROR; + return nullptr; + } + return reinterpret_cast<ULocale*>(r); +} + +int32_t ulocbld_buildLocaleID(ULocaleBuilder* builder, + char* buffer, int32_t bufferCapacity, UErrorCode* err) { + if (U_FAILURE(*err)) { return 0; } + if (builder == nullptr) { + *err = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + icu::Locale l = INTERNAL(builder)->build(*err); + if (U_FAILURE(*err)) { return 0; } + int32_t length = (int32_t)(uprv_strlen(l.getName())); + if (0 < length && length <= bufferCapacity) { + uprv_memcpy(buffer, l.getName(), length); + } + return u_terminateChars(buffer, bufferCapacity, length, err); +} + +int32_t ulocbld_buildLanguageTag(ULocaleBuilder* builder, + char* buffer, int32_t bufferCapacity, UErrorCode* err) { + if (U_FAILURE(*err)) { return 0; } + if (builder == nullptr) { + *err = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + icu::Locale l = INTERNAL(builder)->build(*err); + return icu::ByteSinkUtil::viaByteSinkToTerminatedChars( + buffer, bufferCapacity, + [&](icu::ByteSink& sink, UErrorCode& status) { + l.toLanguageTag(sink, status); + }, + *err); +} + +UBool ulocbld_copyErrorTo(const ULocaleBuilder* builder, UErrorCode *outErrorCode) { + if (builder == nullptr) { + *outErrorCode = U_ILLEGAL_ARGUMENT_ERROR; + return true; + } + return CONST_INTERNAL(builder)->copyErrorTo(*outErrorCode); +} diff --git a/contrib/libs/icu/common/ulocimp.h b/contrib/libs/icu/common/ulocimp.h index 48341054e3..7fb6406288 100644 --- a/contrib/libs/icu/common/ulocimp.h +++ b/contrib/libs/icu/common/ulocimp.h @@ -10,6 +10,8 @@ #ifndef ULOCIMP_H #define ULOCIMP_H +#include <cstddef> + #include "unicode/bytestream.h" #include "unicode/uloc.h" @@ -40,8 +42,10 @@ uloc_getTableStringWithFallback( int32_t *pLength, UErrorCode *pErrorCode); +namespace { /*returns true if a is an ID separator false otherwise*/ -#define _isIDSeparator(a) (a == '_' || a == '-') +inline bool _isIDSeparator(char a) { return a == '_' || a == '-'; } +} // namespace U_CFUNC const char* uloc_getCurrentCountryID(const char* oldID); @@ -49,48 +53,134 @@ uloc_getCurrentCountryID(const char* oldID); U_CFUNC const char* uloc_getCurrentLanguageID(const char* oldID); -U_CFUNC void -ulocimp_getKeywords(const char *localeID, - char prev, - icu::ByteSink& sink, - UBool valuesToo, - UErrorCode *status); - -icu::CharString U_EXPORT2 -ulocimp_getLanguage(const char *localeID, - const char **pEnd, - UErrorCode &status); - -icu::CharString U_EXPORT2 -ulocimp_getScript(const char *localeID, - const char **pEnd, - UErrorCode &status); - -icu::CharString U_EXPORT2 -ulocimp_getCountry(const char *localeID, - const char **pEnd, - UErrorCode &status); - -U_CAPI void U_EXPORT2 +U_EXPORT icu::CharString +ulocimp_getKeywords(const char* localeID, + char prev, + bool valuesToo, + UErrorCode& status); + +U_EXPORT void +ulocimp_getKeywords(const char* localeID, + char prev, + icu::ByteSink& sink, + bool valuesToo, + UErrorCode& status); + +U_EXPORT icu::CharString +ulocimp_getName(const char* localeID, + UErrorCode& err); + +U_EXPORT void ulocimp_getName(const char* localeID, icu::ByteSink& sink, - UErrorCode* err); + UErrorCode& err); + +U_EXPORT icu::CharString +ulocimp_getBaseName(const char* localeID, + UErrorCode& err); -U_CAPI void U_EXPORT2 +U_EXPORT void ulocimp_getBaseName(const char* localeID, icu::ByteSink& sink, - UErrorCode* err); + UErrorCode& err); + +U_EXPORT icu::CharString +ulocimp_canonicalize(const char* localeID, + UErrorCode& err); -U_CAPI void U_EXPORT2 +U_EXPORT void ulocimp_canonicalize(const char* localeID, icu::ByteSink& sink, - UErrorCode* err); + UErrorCode& err); -U_CAPI void U_EXPORT2 +U_EXPORT icu::CharString +ulocimp_getKeywordValue(const char* localeID, + const char* keywordName, + UErrorCode& status); + +U_EXPORT void ulocimp_getKeywordValue(const char* localeID, const char* keywordName, icu::ByteSink& sink, - UErrorCode* status); + UErrorCode& status); + +U_EXPORT icu::CharString +ulocimp_getLanguage(const char* localeID, UErrorCode& status); + +U_EXPORT icu::CharString +ulocimp_getScript(const char* localeID, UErrorCode& status); + +U_EXPORT icu::CharString +ulocimp_getRegion(const char* localeID, UErrorCode& status); + +U_EXPORT icu::CharString +ulocimp_getVariant(const char* localeID, UErrorCode& status); + +U_EXPORT void +ulocimp_setKeywordValue(const char* keywordName, + const char* keywordValue, + icu::CharString& localeID, + UErrorCode& status); + +U_EXPORT int32_t +ulocimp_setKeywordValue(const char* keywords, + const char* keywordName, + const char* keywordValue, + icu::ByteSink& sink, + UErrorCode& status); + +U_EXPORT void +ulocimp_getSubtags( + const char* localeID, + icu::CharString* language, + icu::CharString* script, + icu::CharString* region, + icu::CharString* variant, + const char** pEnd, + UErrorCode& status); + +U_EXPORT void +ulocimp_getSubtags( + const char* localeID, + icu::ByteSink* language, + icu::ByteSink* script, + icu::ByteSink* region, + icu::ByteSink* variant, + const char** pEnd, + UErrorCode& status); + +inline void +ulocimp_getSubtags( + const char* localeID, + std::nullptr_t, + std::nullptr_t, + std::nullptr_t, + std::nullptr_t, + const char** pEnd, + UErrorCode& status) { + ulocimp_getSubtags( + localeID, + static_cast<icu::ByteSink*>(nullptr), + static_cast<icu::ByteSink*>(nullptr), + static_cast<icu::ByteSink*>(nullptr), + static_cast<icu::ByteSink*>(nullptr), + pEnd, + status); +} + +U_EXPORT icu::CharString +ulocimp_getParent(const char* localeID, + UErrorCode& err); + +U_EXPORT void +ulocimp_getParent(const char* localeID, + icu::ByteSink& sink, + UErrorCode& err); + +U_EXPORT icu::CharString +ulocimp_toLanguageTag(const char* localeID, + bool strict, + UErrorCode& status); /** * Writes a well-formed language tag for this locale ID. @@ -111,11 +201,17 @@ ulocimp_getKeywordValue(const char* localeID, * * @internal ICU 64 */ -U_CAPI void U_EXPORT2 +U_EXPORT void ulocimp_toLanguageTag(const char* localeID, icu::ByteSink& sink, - UBool strict, - UErrorCode* err); + bool strict, + UErrorCode& err); + +U_EXPORT icu::CharString +ulocimp_forLanguageTag(const char* langtag, + int32_t tagLen, + int32_t* parsedLength, + UErrorCode& status); /** * Returns a locale ID for the specified BCP47 language tag string. @@ -143,12 +239,12 @@ ulocimp_toLanguageTag(const char* localeID, * failed. * @internal ICU 63 */ -U_CAPI void U_EXPORT2 +U_EXPORT void ulocimp_forLanguageTag(const char* langtag, int32_t tagLen, icu::ByteSink& sink, int32_t* parsedLength, - UErrorCode* err); + UErrorCode& err); /** * Get the region to use for supplemental data lookup. Uses @@ -156,28 +252,27 @@ ulocimp_forLanguageTag(const char* langtag, * (2) any unicode_region_tag in the locale ID; if none then * (3) if inferRegion is true, the region suggested by * getLikelySubtags on the localeID. - * If no region is found, returns length 0. - * + * If no region is found, returns an empty string. + * * @param localeID * The complete locale ID (with keywords) from which * to get the region to use for supplemental data. * @param inferRegion * If true, will try to infer region from localeID if * no other region is found. - * @param region - * Buffer in which to put the region ID found; should - * have a capacity at least ULOC_COUNTRY_CAPACITY. - * @param regionCapacity - * The actual capacity of the region buffer. * @param status * Pointer to in/out UErrorCode value for latest status. * @return - * The length of any region code found, or 0 if none. + * The region code found, empty if none found. * @internal ICU 57 */ -U_CAPI int32_t U_EXPORT2 -ulocimp_getRegionForSupplementalData(const char *localeID, UBool inferRegion, - char *region, int32_t regionCapacity, UErrorCode* status); +U_EXPORT icu::CharString +ulocimp_getRegionForSupplementalData(const char *localeID, bool inferRegion, + UErrorCode& status); + +U_EXPORT icu::CharString +ulocimp_addLikelySubtags(const char* localeID, + UErrorCode& status); /** * Add the likely subtags for a provided locale ID, per the algorithm described @@ -208,10 +303,15 @@ ulocimp_getRegionForSupplementalData(const char *localeID, UBool inferRegion, * or the localeId is not well-formed, the error code is U_ILLEGAL_ARGUMENT_ERROR. * @internal ICU 64 */ -U_CAPI void U_EXPORT2 +U_EXPORT void ulocimp_addLikelySubtags(const char* localeID, icu::ByteSink& sink, - UErrorCode* err); + UErrorCode& err); + +U_EXPORT icu::CharString +ulocimp_minimizeSubtags(const char* localeID, + bool favorScript, + UErrorCode& status); /** * Minimize the subtags for a provided locale ID, per the algorithm described @@ -237,142 +337,78 @@ ulocimp_addLikelySubtags(const char* localeID, * * @param localeID The locale to minimize * @param sink The output sink receiving the maximized locale + * @param favorScript favor to keep script if true, region if false. * @param err Error information if minimizing the locale failed. If the length * of the localeID and the null-terminator is greater than the maximum allowed size, * or the localeId is not well-formed, the error code is U_ILLEGAL_ARGUMENT_ERROR. * @internal ICU 64 */ -U_CAPI void U_EXPORT2 +U_EXPORT void ulocimp_minimizeSubtags(const char* localeID, icu::ByteSink& sink, - UErrorCode* err); + bool favorScript, + UErrorCode& err); U_CAPI const char * U_EXPORT2 locale_getKeywordsStart(const char *localeID); -U_CFUNC UBool +bool ultag_isExtensionSubtags(const char* s, int32_t len); -U_CFUNC UBool +bool ultag_isLanguageSubtag(const char* s, int32_t len); -U_CFUNC UBool +bool ultag_isPrivateuseValueSubtags(const char* s, int32_t len); -U_CFUNC UBool +bool ultag_isRegionSubtag(const char* s, int32_t len); -U_CFUNC UBool +bool ultag_isScriptSubtag(const char* s, int32_t len); -U_CFUNC UBool +bool ultag_isTransformedExtensionSubtags(const char* s, int32_t len); -U_CFUNC UBool +bool ultag_isUnicodeExtensionSubtags(const char* s, int32_t len); -U_CFUNC UBool +bool ultag_isUnicodeLocaleAttribute(const char* s, int32_t len); -U_CFUNC UBool +bool ultag_isUnicodeLocaleAttributes(const char* s, int32_t len); -U_CFUNC UBool +bool ultag_isUnicodeLocaleKey(const char* s, int32_t len); -U_CFUNC UBool +bool ultag_isUnicodeLocaleType(const char* s, int32_t len); -U_CFUNC UBool +bool ultag_isVariantSubtags(const char* s, int32_t len); -U_CAPI const char * U_EXPORT2 -ultag_getTKeyStart(const char *localeID); +const char* +ultag_getTKeyStart(const char* localeID); -U_CFUNC const char* +U_EXPORT const char* ulocimp_toBcpKey(const char* key); -U_CFUNC const char* +U_EXPORT const char* ulocimp_toLegacyKey(const char* key); -U_CFUNC const char* -ulocimp_toBcpType(const char* key, const char* type, UBool* isKnownKey, UBool* isSpecialType); +U_EXPORT const char* +ulocimp_toBcpType(const char* key, const char* type, bool* isKnownKey, bool* isSpecialType); -U_CFUNC const char* -ulocimp_toLegacyType(const char* key, const char* type, UBool* isKnownKey, UBool* isSpecialType); +U_EXPORT const char* +ulocimp_toLegacyType(const char* key, const char* type, bool* isKnownKey, bool* isSpecialType); /* Function for testing purpose */ -U_CAPI const char* const* ulocimp_getKnownCanonicalizedLocaleForTest(int32_t* length); +U_EXPORT const char* const* +ulocimp_getKnownCanonicalizedLocaleForTest(int32_t& length); // Return true if the value is already canonicalized. -U_CAPI bool ulocimp_isCanonicalizedLocaleForTest(const char* localeName); - -/** - * A utility class for handling locale IDs that may be longer than ULOC_FULLNAME_CAPACITY. - * This encompasses all of the logic to allocate a temporary locale ID buffer on the stack, - * and then, if it's not big enough, reallocate it on the heap and try again. - * - * You use it like this: - * UErrorCode err = U_ZERO_ERROR; - * - * PreflightingLocaleIDBuffer tempBuffer; - * do { - * tempBuffer.requestedCapacity = uloc_doSomething(localeID, tempBuffer.getBuffer(), tempBuffer.getCapacity(), &err); - * } while (tempBuffer.needToTryAgain(&err)); - * if (U_SUCCESS(err)) { - * uloc_doSomethingWithTheResult(tempBuffer.getBuffer()); - * } - */ -class PreflightingLocaleIDBuffer { -private: - char stackBuffer[ULOC_FULLNAME_CAPACITY]; - char* heapBuffer = nullptr; - int32_t capacity = ULOC_FULLNAME_CAPACITY; - -public: - int32_t requestedCapacity = ULOC_FULLNAME_CAPACITY; - - // No heap allocation. Use only on the stack. - static void* U_EXPORT2 operator new(size_t) noexcept = delete; - static void* U_EXPORT2 operator new[](size_t) noexcept = delete; -#if U_HAVE_PLACEMENT_NEW - static void* U_EXPORT2 operator new(size_t, void*) noexcept = delete; -#endif - - PreflightingLocaleIDBuffer() {} - - ~PreflightingLocaleIDBuffer() { uprv_free(heapBuffer); } - - char* getBuffer() { - if (heapBuffer == nullptr) { - return stackBuffer; - } else { - return heapBuffer; - } - } - - int32_t getCapacity() { - return capacity; - } - - bool needToTryAgain(UErrorCode* err) { - if (heapBuffer != nullptr) { - return false; - } - - if (*err == U_BUFFER_OVERFLOW_ERROR || *err == U_STRING_NOT_TERMINATED_WARNING) { - int32_t newCapacity = requestedCapacity + 2; // one for the terminating null, one just for paranoia - heapBuffer = static_cast<char*>(uprv_malloc(newCapacity)); - if (heapBuffer == nullptr) { - *err = U_MEMORY_ALLOCATION_ERROR; - } else { - *err = U_ZERO_ERROR; - capacity = newCapacity; - } - return U_SUCCESS(*err); - } - return false; - } -}; +U_EXPORT bool +ulocimp_isCanonicalizedLocaleForTest(const char* localeName); #endif diff --git a/contrib/libs/icu/common/umapfile.cpp b/contrib/libs/icu/common/umapfile.cpp index faa6d80786..8dddf0e78d 100644 --- a/contrib/libs/icu/common/umapfile.cpp +++ b/contrib/libs/icu/common/umapfile.cpp @@ -236,9 +236,9 @@ typedef HANDLE MemoryMap; /* get a view of the mapping */ #if U_PLATFORM != U_PF_HPUX - data=mmap(0, length, PROT_READ, MAP_SHARED, fd, 0); + data=mmap(nullptr, length, PROT_READ, MAP_SHARED, fd, 0); #else - data=mmap(0, length, PROT_READ, MAP_PRIVATE, fd, 0); + data=mmap(nullptr, length, PROT_READ, MAP_PRIVATE, fd, 0); #endif close(fd); /* no longer needed */ if(data==MAP_FAILED) { @@ -262,7 +262,7 @@ typedef HANDLE MemoryMap; if(munmap(pData->mapAddr, dataLen)==-1) { } pData->pHeader=nullptr; - pData->map=0; + pData->map=nullptr; pData->mapAddr=nullptr; } } diff --git a/contrib/libs/icu/common/umutex.cpp b/contrib/libs/icu/common/umutex.cpp index ccbee9960a..0c053968dc 100644 --- a/contrib/libs/icu/common/umutex.cpp +++ b/contrib/libs/icu/common/umutex.cpp @@ -189,7 +189,6 @@ u_setMutexFunctions(const void * /*context */, UMtxInitFn *, UMtxFn *, if (U_SUCCESS(*status)) { *status = U_UNSUPPORTED_ERROR; } - return; } @@ -200,5 +199,4 @@ u_setAtomicIncDecFunctions(const void * /*context */, UMtxAtomicFn *, UMtxAtomic if (U_SUCCESS(*status)) { *status = U_UNSUPPORTED_ERROR; } - return; } diff --git a/contrib/libs/icu/common/unifunct.cpp b/contrib/libs/icu/common/unifunct.cpp index f3995b298d..5e939cb67e 100644 --- a/contrib/libs/icu/common/unifunct.cpp +++ b/contrib/libs/icu/common/unifunct.cpp @@ -16,11 +16,11 @@ UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION(UnicodeFunctor) UnicodeFunctor::~UnicodeFunctor() {} UnicodeMatcher* UnicodeFunctor::toMatcher() const { - return 0; + return nullptr; } UnicodeReplacer* UnicodeFunctor::toReplacer() const { - return 0; + return nullptr; } U_NAMESPACE_END diff --git a/contrib/libs/icu/common/uniquecharstr.h b/contrib/libs/icu/common/uniquecharstr.h index 10cc924f7f..e5d3b73418 100644 --- a/contrib/libs/icu/common/uniquecharstr.h +++ b/contrib/libs/icu/common/uniquecharstr.h @@ -10,6 +10,7 @@ #include "charstr.h" #include "uassert.h" #include "uhash.h" +#include "cmemory.h" U_NAMESPACE_BEGIN @@ -47,22 +48,20 @@ public: } /** - * Adds a string and returns a unique number for it. - * The string's buffer contents must not change, nor move around in memory, + * Adds a NUL-terminated string and returns a unique number for it. + * The string must not change, nor move around in memory, * while this UniqueCharStrings is in use. - * The string contents must be NUL-terminated exactly at s.length(). * - * Best used with read-only-alias UnicodeString objects that point to - * stable storage, such as strings returned by resource bundle functions. + * Best used with string data in a stable storage, such as strings returned + * by resource bundle functions. */ - int32_t add(const UnicodeString &s, UErrorCode &errorCode) { - if (U_FAILURE(errorCode)) { return 0; } + int32_t add(const char16_t*p, UErrorCode &errorCode) { + if (U_FAILURE(errorCode)) { return -1; } if (isFrozen) { errorCode = U_NO_WRITE_PERMISSION; - return 0; + return -1; } // The string points into the resource bundle. - const char16_t *p = s.getBuffer(); int32_t oldIndex = uhash_geti(&map, p); if (oldIndex != 0) { // found duplicate return oldIndex; @@ -71,11 +70,33 @@ public: // The strings object is also terminated with one implicit NUL. strings->append(0, errorCode); int32_t newIndex = strings->length(); - strings->appendInvariantChars(s, errorCode); + strings->appendInvariantChars(p, u_strlen(p), errorCode); uhash_puti(&map, const_cast<char16_t *>(p), newIndex, &errorCode); return newIndex; } + /** + * Adds a unicode string by value and returns a unique number for it. + */ + int32_t addByValue(UnicodeString s, UErrorCode &errorCode) { + if (U_FAILURE(errorCode)) { return -1; } + if (isFrozen) { + errorCode = U_NO_WRITE_PERMISSION; + return -1; + } + int32_t oldIndex = uhash_geti(&map, s.getTerminatedBuffer()); + if (oldIndex != 0) { // found duplicate + return oldIndex; + } + // We need to store the string content of the UnicodeString. + UnicodeString *key = keyStore.create(s); + if (key == nullptr) { + errorCode = U_MEMORY_ALLOCATION_ERROR; + return -1; + } + return add(key->getTerminatedBuffer(), errorCode); + } + void freeze() { isFrozen = true; } /** @@ -90,6 +111,7 @@ public: private: UHashtable map; CharString *strings; + MemoryPool<UnicodeString> keyStore; bool isFrozen = false; }; diff --git a/contrib/libs/icu/common/uniset_props.cpp b/contrib/libs/icu/common/uniset_props.cpp index b3dbdf93c8..e6f880c9f2 100644 --- a/contrib/libs/icu/common/uniset_props.cpp +++ b/contrib/libs/icu/common/uniset_props.cpp @@ -106,7 +106,7 @@ uniset_getUnicode32Instance(UErrorCode &errorCode) { // caseCompare(), but they also make UnicodeSet work for simple patterns when // no Unicode properties data is available - when caseCompare() fails -static inline UBool +inline UBool isPerlOpen(const UnicodeString &pattern, int32_t pos) { char16_t c; return pattern.charAt(pos)==u'\\' && ((c=pattern.charAt(pos+1))==u'p' || c==u'P'); @@ -117,12 +117,12 @@ isPerlClose(const UnicodeString &pattern, int32_t pos) { return pattern.charAt(pos)==u'}'; }*/ -static inline UBool +inline UBool isNameOpen(const UnicodeString &pattern, int32_t pos) { return pattern.charAt(pos)==u'\\' && pattern.charAt(pos+1)==u'N'; } -static inline UBool +inline UBool isPOSIXOpen(const UnicodeString &pattern, int32_t pos) { return pattern.charAt(pos)==u'[' && pattern.charAt(pos+1)==u':'; } @@ -226,14 +226,14 @@ namespace { class UnicodeSetPointer { UnicodeSet* p; public: - inline UnicodeSetPointer() : p(0) {} + inline UnicodeSetPointer() : p(nullptr) {} inline ~UnicodeSetPointer() { delete p; } inline UnicodeSet* pointer() { return p; } inline UBool allocate() { - if (p == 0) { + if (p == nullptr) { p = new UnicodeSet(); } - return p != 0; + return p != nullptr; } }; @@ -300,7 +300,7 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars, UChar32 c = 0; UBool literal = false; - UnicodeSet* nested = 0; // alias - do not delete + UnicodeSet* nested = nullptr; // alias - do not delete // -------- Check for property pattern @@ -352,9 +352,9 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars, continue; } } - } else if (symbols != 0) { + } else if (symbols != nullptr) { const UnicodeFunctor *m = symbols->lookupMatcher(c); - if (m != 0) { + if (m != nullptr) { const UnicodeSet *ms = dynamic_cast<const UnicodeSet *>(m); if (ms == nullptr) { ec = U_MALFORMED_SET; @@ -390,7 +390,7 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars, patLocal.append(op); } - if (nested == 0) { + if (nested == nullptr) { // lazy allocation if (!scratch.allocate()) { ec = U_MEMORY_ALLOCATION_ERROR; @@ -549,7 +549,7 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars, c = chars.next(opts, literal, ec); if (U_FAILURE(ec)) return; UBool anchor = (c == u']' && !literal); - if (symbols == 0 && !anchor) { + if (symbols == nullptr && !anchor) { c = SymbolTable::SYMBOL_REF; chars.setPos(backup); break; // literal '$' @@ -657,16 +657,16 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars, namespace { -static UBool numericValueFilter(UChar32 ch, void* context) { +UBool numericValueFilter(UChar32 ch, void* context) { return u_getNumericValue(ch) == *(double*)context; } -static UBool generalCategoryMaskFilter(UChar32 ch, void* context) { +UBool generalCategoryMaskFilter(UChar32 ch, void* context) { int32_t value = *(int32_t*)context; return (U_GET_GC_MASK((UChar32) ch) & value) != 0; } -static UBool versionFilter(UChar32 ch, void* context) { +UBool versionFilter(UChar32 ch, void* context) { static const UVersionInfo none = { 0, 0, 0, 0 }; UVersionInfo v; u_charAge(ch, v); @@ -679,15 +679,19 @@ typedef struct { int32_t value; } IntPropertyContext; -static UBool intPropertyFilter(UChar32 ch, void* context) { +UBool intPropertyFilter(UChar32 ch, void* context) { IntPropertyContext* c = (IntPropertyContext*)context; return u_getIntPropertyValue((UChar32) ch, c->prop) == c->value; } -static UBool scriptExtensionsFilter(UChar32 ch, void* context) { +UBool scriptExtensionsFilter(UChar32 ch, void* context) { return uscript_hasScript(ch, *(UScriptCode*)context); } +UBool idTypeFilter(UChar32 ch, void* context) { + return u_hasIDType(ch, *(UIdentifierType*)context); +} + } // namespace /** @@ -744,7 +748,7 @@ void UnicodeSet::applyFilter(UnicodeSet::Filter filter, namespace { -static UBool mungeCharName(char* dst, const char* src, int32_t dstCapacity) { +UBool mungeCharName(char* dst, const char* src, int32_t dstCapacity) { /* Note: we use ' ' in compiler code page */ int32_t j = 0; char ch; @@ -782,6 +786,10 @@ UnicodeSet::applyIntPropertyValue(UProperty prop, int32_t value, UErrorCode& ec) const UnicodeSet* inclusions = CharacterProperties::getInclusionsForProperty(prop, ec); UScriptCode script = (UScriptCode)value; applyFilter(scriptExtensionsFilter, &script, inclusions, ec); + } else if (prop == UCHAR_IDENTIFIER_TYPE) { + const UnicodeSet* inclusions = CharacterProperties::getInclusionsForProperty(prop, ec); + UIdentifierType idType = (UIdentifierType)value; + applyFilter(idTypeFilter, &idType, inclusions, ec); } else if (0 <= prop && prop < UCHAR_BINARY_LIMIT) { if (value == 0 || value == 1) { const USet *set = u_getBinaryPropertySet(prop, &ec); @@ -915,6 +923,13 @@ UnicodeSet::applyPropertyAlias(const UnicodeString& prop, } // fall through to calling applyIntPropertyValue() break; + case UCHAR_IDENTIFIER_TYPE: + v = u_getPropertyValueEnum(p, vname.data()); + if (v == UCHAR_INVALID_CODE) { + FAIL(ec); + } + // fall through to calling applyIntPropertyValue() + break; default: // p is a non-binary, non-enumerated property that we // don't support (yet). diff --git a/contrib/libs/icu/common/unistr.cpp b/contrib/libs/icu/common/unistr.cpp index 04f01cfa16..ce81138c2c 100644 --- a/contrib/libs/icu/common/unistr.cpp +++ b/contrib/libs/icu/common/unistr.cpp @@ -283,7 +283,7 @@ UnicodeString::UnicodeString(const char *src, int32_t length, EInvariant) { UnicodeString::UnicodeString(const char *codepageData) { fUnion.fFields.fLengthAndFlags = kShortString; - if(codepageData != 0) { + if (codepageData != nullptr) { setToUTF8(codepageData); } } @@ -291,7 +291,7 @@ UnicodeString::UnicodeString(const char *codepageData) { UnicodeString::UnicodeString(const char *codepageData, int32_t dataLength) { fUnion.fFields.fLengthAndFlags = kShortString; // if there's nothing to convert, do nothing - if(codepageData == 0 || dataLength == 0 || dataLength < -1) { + if (codepageData == nullptr || dataLength == 0 || dataLength < -1) { return; } if(dataLength == -1) { @@ -393,7 +393,7 @@ UnicodeString::allocate(int32_t capacity) { } } fUnion.fFields.fLengthAndFlags = kIsBogus; - fUnion.fFields.fArray = 0; + fUnion.fFields.fArray = nullptr; fUnion.fFields.fCapacity = 0; return false; } @@ -564,7 +564,7 @@ UnicodeString::copyFrom(const UnicodeString &src, UBool fastCopy) { // if src is bogus, set ourselves to bogus // do not call setToBogus() here because fArray and flags are not consistent here fUnion.fFields.fLengthAndFlags = kIsBogus; - fUnion.fFields.fArray = 0; + fUnion.fFields.fArray = nullptr; fUnion.fFields.fCapacity = 0; break; } @@ -919,7 +919,7 @@ UnicodeString::extract(Char16Ptr dest, int32_t destCapacity, UErrorCode &errorCode) const { int32_t len = length(); if(U_SUCCESS(errorCode)) { - if(isBogus() || destCapacity<0 || (destCapacity>0 && dest==0)) { + if (isBogus() || destCapacity < 0 || (destCapacity > 0 && dest == nullptr)) { errorCode=U_ILLEGAL_ARGUMENT_ERROR; } else { const char16_t *array = getArrayStart(); @@ -986,7 +986,7 @@ int32_t UnicodeString::extract(int32_t start, int32_t len, char *target, uint32_t dstSize) const { // if the arguments are illegal, then do nothing - if(/*dstSize < 0 || */(dstSize > 0 && target == 0)) { + if (/*dstSize < 0 || */(dstSize > 0 && target == nullptr)) { return 0; } return toUTF8(start, len, target, dstSize <= 0x7fffffff ? (int32_t)dstSize : 0x7fffffff); @@ -1071,7 +1071,7 @@ UnicodeString::indexOf(const char16_t *srcChars, int32_t start, int32_t length) const { - if(isBogus() || srcChars == 0 || srcStart < 0 || srcLength == 0) { + if (isBogus() || srcChars == nullptr || srcStart < 0 || srcLength == 0) { return -1; } @@ -1135,7 +1135,7 @@ UnicodeString::lastIndexOf(const char16_t *srcChars, int32_t start, int32_t length) const { - if(isBogus() || srcChars == 0 || srcStart < 0 || srcLength == 0) { + if (isBogus() || srcChars == nullptr || srcStart < 0 || srcLength == 0) { return -1; } @@ -1245,7 +1245,7 @@ UnicodeString::setToBogus() releaseArray(); fUnion.fFields.fLengthAndFlags = kIsBogus; - fUnion.fFields.fArray = 0; + fUnion.fFields.fArray = nullptr; fUnion.fFields.fCapacity = 0; } @@ -1488,7 +1488,7 @@ UnicodeString::doReplace(int32_t start, return doAppend(srcChars, srcStart, srcLength); } - if(srcChars == 0) { + if (srcChars == nullptr) { srcLength = 0; } else { // Perform all remaining operations relative to srcChars + srcStart. @@ -1537,7 +1537,7 @@ UnicodeString::doReplace(int32_t start, } // clone our array and allocate a bigger array if needed - int32_t *bufferToDelete = 0; + int32_t *bufferToDelete = nullptr; if(!cloneArrayIfNeeded(newLength, getGrowCapacity(newLength), false, &bufferToDelete) ) { @@ -1607,41 +1607,58 @@ UnicodeString::doAppend(const char16_t *srcChars, int32_t srcStart, int32_t srcL int32_t oldLength = length(); int32_t newLength; - if (uprv_add32_overflow(oldLength, srcLength, &newLength)) { - setToBogus(); - return *this; - } - // Check for append onto ourself - const char16_t* oldArray = getArrayStart(); - if (isBufferWritable() && - oldArray < srcChars + srcLength && - srcChars < oldArray + oldLength) { - // Copy into a new UnicodeString and start over - UnicodeString copy(srcChars, srcLength); - if (copy.isBogus()) { + if (srcLength <= getCapacity() - oldLength && isBufferWritable()) { + newLength = oldLength + srcLength; + // Faster than a memmove + if (srcLength <= 4) { + char16_t *arr = getArrayStart(); + arr[oldLength] = srcChars[0]; + if (srcLength > 1) arr[oldLength+1] = srcChars[1]; + if (srcLength > 2) arr[oldLength+2] = srcChars[2]; + if (srcLength > 3) arr[oldLength+3] = srcChars[3]; + setLength(newLength); + return *this; + } + } else { + if (uprv_add32_overflow(oldLength, srcLength, &newLength)) { setToBogus(); return *this; } - return doAppend(copy.getArrayStart(), 0, srcLength); - } - - // optimize append() onto a large-enough, owned string - if((newLength <= getCapacity() && isBufferWritable()) || - cloneArrayIfNeeded(newLength, getGrowCapacity(newLength))) { - char16_t *newArray = getArrayStart(); - // Do not copy characters when - // char16_t *buffer=str.getAppendBuffer(...); - // is followed by - // str.append(buffer, length); - // or - // str.appendString(buffer, length) - // or similar. - if(srcChars != newArray + oldLength) { - us_arrayCopy(srcChars, 0, newArray, oldLength, srcLength); + + // Check for append onto ourself + const char16_t* oldArray = getArrayStart(); + if (isBufferWritable() && + oldArray < srcChars + srcLength && + srcChars < oldArray + oldLength) { + // Copy into a new UnicodeString and start over + UnicodeString copy(srcChars, srcLength); + if (copy.isBogus()) { + setToBogus(); + return *this; + } + return doAppend(copy.getArrayStart(), 0, srcLength); } - setLength(newLength); + + // optimize append() onto a large-enough, owned string + if (!cloneArrayIfNeeded(newLength, getGrowCapacity(newLength))) { + return *this; + } + } + + char16_t *newArray = getArrayStart(); + // Do not copy characters when + // char16_t *buffer=str.getAppendBuffer(...); + // is followed by + // str.append(buffer, length); + // or + // str.appendString(buffer, length) + // or similar. + if(srcChars != newArray + oldLength) { + us_arrayCopy(srcChars, 0, newArray, oldLength, srcLength); } + setLength(newLength); + return *this; } @@ -1913,7 +1930,7 @@ UnicodeString::cloneArrayIfNeeded(int32_t newCapacity, // the array is refCounted; decrement and release if 0 u_atomic_int32_t *pRefCount = ((u_atomic_int32_t *)oldArray - 1); if(umtx_atomic_dec(pRefCount) == 0) { - if(pBufferToDelete == 0) { + if (pBufferToDelete == nullptr) { // Note: cast to (void *) is needed with MSVC, where u_atomic_int32_t // is defined as volatile. (Volatile has useful non-standard behavior // with this compiler.) diff --git a/contrib/libs/icu/common/unistr_case.cpp b/contrib/libs/icu/common/unistr_case.cpp index 57f307c203..b04d957bdc 100644 --- a/contrib/libs/icu/common/unistr_case.cpp +++ b/contrib/libs/icu/common/unistr_case.cpp @@ -193,7 +193,7 @@ UnicodeString::caseMap(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITER // This is very similar to how doReplace() keeps the old array pointer // and deletes the old array itself after it is done. // In addition, we are forcing cloneArrayIfNeeded() to always allocate a new array. - int32_t *bufferToDelete = 0; + int32_t *bufferToDelete = nullptr; if (!cloneArrayIfNeeded(newLength, newLength, false, &bufferToDelete, true)) { return *this; } diff --git a/contrib/libs/icu/common/unistr_cnv.cpp b/contrib/libs/icu/common/unistr_cnv.cpp index 2d649b2d51..e300a79ce5 100644 --- a/contrib/libs/icu/common/unistr_cnv.cpp +++ b/contrib/libs/icu/common/unistr_cnv.cpp @@ -62,7 +62,7 @@ UnicodeString::UnicodeString(const char *codepageData, UnicodeString::UnicodeString(const char *codepageData, const char *codepage) { fUnion.fFields.fLengthAndFlags = kShortString; - if(codepageData != 0) { + if (codepageData != nullptr) { doCodepageCreate(codepageData, (int32_t)uprv_strlen(codepageData), codepage); } } @@ -71,7 +71,7 @@ UnicodeString::UnicodeString(const char *codepageData, int32_t dataLength, const char *codepage) { fUnion.fFields.fLengthAndFlags = kShortString; - if(codepageData != 0) { + if (codepageData != nullptr) { doCodepageCreate(codepageData, dataLength, codepage); } } @@ -92,7 +92,7 @@ UnicodeString::UnicodeString(const char *src, int32_t srcLength, srcLength=(int32_t)uprv_strlen(src); } if(srcLength>0) { - if(cnv!=0) { + if (cnv != nullptr) { // use the provided converter ucnv_resetToUnicode(cnv); doCodepageCreate(src, srcLength, cnv, errorCode); @@ -136,7 +136,7 @@ UnicodeString::extract(int32_t start, const char *codepage) const { // if the arguments are illegal, then do nothing - if(/*dstSize < 0 || */(dstSize > 0 && target == 0)) { + if (/*dstSize < 0 || */(dstSize > 0 && target == nullptr)) { return 0; } @@ -171,7 +171,7 @@ UnicodeString::extract(int32_t start, // if the codepage is the default, use our cache // if it is an empty string, then use the "invariant character" conversion - if (codepage == 0) { + if (codepage == nullptr) { const char *defaultName = ucnv_getDefaultName(); if(UCNV_FAST_IS_UTF8(defaultName)) { return toUTF8(start, length, target, capacity); @@ -194,7 +194,7 @@ UnicodeString::extract(int32_t start, length = doExtract(start, length, target, capacity, converter, status); // close the converter - if (codepage == 0) { + if (codepage == nullptr) { u_releaseDefaultConverter(converter); } else { ucnv_close(converter); @@ -212,7 +212,7 @@ UnicodeString::extract(char *dest, int32_t destCapacity, return 0; } - if(isBogus() || destCapacity<0 || (destCapacity>0 && dest==0)) { + if (isBogus() || destCapacity < 0 || (destCapacity > 0 && dest == nullptr)) { errorCode=U_ILLEGAL_ARGUMENT_ERROR; return 0; } @@ -224,7 +224,7 @@ UnicodeString::extract(char *dest, int32_t destCapacity, // get the converter UBool isDefaultConverter; - if(cnv==0) { + if (cnv == nullptr) { isDefaultConverter=true; cnv=u_getDefaultConverter(&errorCode); if(U_FAILURE(errorCode)) { @@ -264,7 +264,7 @@ UnicodeString::doExtract(int32_t start, int32_t length, const char *destLimit; if(destCapacity==0) { - destLimit=dest=0; + destLimit=dest=nullptr; } else if(destCapacity==-1) { // Pin the limit to U_MAX_PTR if the "magic" destCapacity is used. destLimit=(char*)U_MAX_PTR(dest); @@ -275,7 +275,7 @@ UnicodeString::doExtract(int32_t start, int32_t length, } // perform the conversion - ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, true, &errorCode); + ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, nullptr, true, &errorCode); length=(int32_t)(dest-originalDest); // if an overflow occurs, then get the preflighting length @@ -286,7 +286,7 @@ UnicodeString::doExtract(int32_t start, int32_t length, do { dest=buffer; errorCode=U_ZERO_ERROR; - ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, true, &errorCode); + ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, nullptr, true, &errorCode); length+=(int32_t)(dest-buffer); } while(errorCode==U_BUFFER_OVERFLOW_ERROR); } @@ -300,7 +300,7 @@ UnicodeString::doCodepageCreate(const char *codepageData, const char *codepage) { // if there's nothing to convert, do nothing - if(codepageData == 0 || dataLength == 0 || dataLength < -1) { + if (codepageData == nullptr || dataLength == 0 || dataLength < -1) { return; } if(dataLength == -1) { @@ -313,14 +313,14 @@ UnicodeString::doCodepageCreate(const char *codepageData, // if the codepage is the default, use our cache // if it is an empty string, then use the "invariant character" conversion UConverter *converter; - if (codepage == 0) { + if (codepage == nullptr) { const char *defaultName = ucnv_getDefaultName(); if(UCNV_FAST_IS_UTF8(defaultName)) { setToUTF8(StringPiece(codepageData, dataLength)); return; } converter = u_getDefaultConverter(&status); - } else if(*codepage == 0) { + } else if (*codepage == 0) { // use the "invariant characters" conversion if(cloneArrayIfNeeded(dataLength, dataLength, false)) { u_charsToUChars(codepageData, getArrayStart(), dataLength); @@ -346,7 +346,7 @@ UnicodeString::doCodepageCreate(const char *codepageData, } // close the converter - if(codepage == 0) { + if (codepage == nullptr) { u_releaseDefaultConverter(converter); } else { ucnv_close(converter); @@ -390,7 +390,7 @@ UnicodeString::doCodepageCreate(const char *codepageData, array = getArrayStart(); myTarget = array + length(); ucnv_toUnicode(converter, &myTarget, array + getCapacity(), - &mySource, mySourceEnd, 0, true, &status); + &mySource, mySourceEnd, nullptr, true, &status); // update the conversion parameters setLength((int32_t)(myTarget - array)); diff --git a/contrib/libs/icu/common/unistr_props.cpp b/contrib/libs/icu/common/unistr_props.cpp index 3d05233bb9..e5bbb53864 100644 --- a/contrib/libs/icu/common/unistr_props.cpp +++ b/contrib/libs/icu/common/unistr_props.cpp @@ -68,7 +68,7 @@ UnicodeString::trim() // move string forward over leading white space if(start > 0) { - doReplace(0, start, 0, 0, 0); + doReplace(0, start, nullptr, 0, 0); } return *this; diff --git a/contrib/libs/icu/common/unormcmp.cpp b/contrib/libs/icu/common/unormcmp.cpp index e11e716c8d..028b28643c 100644 --- a/contrib/libs/icu/common/unormcmp.cpp +++ b/contrib/libs/icu/common/unormcmp.cpp @@ -403,7 +403,7 @@ unorm_cmpEquivFold(const char16_t *s1, int32_t length1, } if( level1<2 && (options&_COMPARE_EQUIV) && - 0!=(p=nfcImpl->getDecomposition((UChar32)cp1, decomp1, length)) + nullptr != (p = nfcImpl->getDecomposition((UChar32)cp1, decomp1, length)) ) { /* cp1 decomposes into p[length] */ if(U_IS_SURROGATE(c1)) { @@ -444,7 +444,7 @@ unorm_cmpEquivFold(const char16_t *s1, int32_t length1, } if( level2<2 && (options&_COMPARE_EQUIV) && - 0!=(p=nfcImpl->getDecomposition((UChar32)cp2, decomp2, length)) + nullptr != (p = nfcImpl->getDecomposition((UChar32)cp2, decomp2, length)) ) { /* cp2 decomposes into p[length] */ if(U_IS_SURROGATE(c2)) { @@ -566,7 +566,7 @@ unorm_compare(const char16_t *s1, int32_t length1, if(U_FAILURE(*pErrorCode)) { return 0; } - if(s1==0 || length1<-1 || s2==0 || length2<-1) { + if (s1 == nullptr || length1 < -1 || s2 == nullptr || length2 < -1) { *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR; return 0; } diff --git a/contrib/libs/icu/common/uprops.cpp b/contrib/libs/icu/common/uprops.cpp index 28540186c6..c87eeff381 100644 --- a/contrib/libs/icu/common/uprops.cpp +++ b/contrib/libs/icu/common/uprops.cpp @@ -328,6 +328,53 @@ static UBool hasEmojiProperty(const BinaryProperty &/*prop*/, UChar32 c, UProper return EmojiProps::hasBinaryProperty(c, which); } +static UBool isIDSUnaryOperator(const BinaryProperty &/*prop*/, UChar32 c, UProperty /*which*/) { + // New in Unicode 15.1 for just two characters. + return 0x2FFE<=c && c<=0x2FFF; +} + +/** Ranges (start/limit pairs) of ID_Compat_Math_Continue (only), from UCD PropList.txt. */ +static constexpr UChar32 ID_COMPAT_MATH_CONTINUE[] = { + 0x00B2, 0x00B3 + 1, + 0x00B9, 0x00B9 + 1, + 0x2070, 0x2070 + 1, + 0x2074, 0x207E + 1, + 0x2080, 0x208E + 1 +}; + +/** ID_Compat_Math_Start characters, from UCD PropList.txt. */ +static constexpr UChar32 ID_COMPAT_MATH_START[] = { + 0x2202, + 0x2207, + 0x221E, + 0x1D6C1, + 0x1D6DB, + 0x1D6FB, + 0x1D715, + 0x1D735, + 0x1D74F, + 0x1D76F, + 0x1D789, + 0x1D7A9, + 0x1D7C3 +}; + +static UBool isIDCompatMathStart(const BinaryProperty &/*prop*/, UChar32 c, UProperty /*which*/) { + if (c < ID_COMPAT_MATH_START[0]) { return false; } // fastpath for common scripts + for (UChar32 startChar : ID_COMPAT_MATH_START) { + if (c == startChar) { return true; } + } + return false; +} + +static UBool isIDCompatMathContinue(const BinaryProperty &prop, UChar32 c, UProperty /*which*/) { + for (int32_t i = 0; i < UPRV_LENGTHOF(ID_COMPAT_MATH_CONTINUE); i += 2) { + if (c < ID_COMPAT_MATH_CONTINUE[i]) { return false; } // below range start + if (c < ID_COMPAT_MATH_CONTINUE[i + 1]) { return true; } // below range limit + } + return isIDCompatMathStart(prop, c, UCHAR_ID_COMPAT_MATH_START); +} + static const BinaryProperty binProps[UCHAR_BINARY_LIMIT]={ /* * column and mask values for binary properties from u_getUnicodeProperties(). @@ -409,6 +456,9 @@ static const BinaryProperty binProps[UCHAR_BINARY_LIMIT]={ { UPROPS_SRC_EMOJI, 0, hasEmojiProperty }, // UCHAR_RGI_EMOJI_TAG_SEQUENCE { UPROPS_SRC_EMOJI, 0, hasEmojiProperty }, // UCHAR_RGI_EMOJI_ZWJ_SEQUENCE { UPROPS_SRC_EMOJI, 0, hasEmojiProperty }, // UCHAR_RGI_EMOJI + { UPROPS_SRC_IDSU, 0, isIDSUnaryOperator }, // UCHAR_IDS_UNARY_OPERATOR + { UPROPS_SRC_ID_COMPAT_MATH, 0, isIDCompatMathStart }, // UCHAR_ID_COMPAT_MATH_START + { UPROPS_SRC_ID_COMPAT_MATH, 0, isIDCompatMathContinue }, // UCHAR_ID_COMPAT_MATH_CONTINUE }; U_CAPI UBool U_EXPORT2 @@ -618,6 +668,11 @@ static int32_t layoutGetMaxValue(const IntProperty &/*prop*/, UProperty which) { } } +static int32_t getIDStatusValue(const IntProperty & /*prop*/, UChar32 c, UProperty /*which*/) { + uint32_t value = u_getUnicodeProperties(c, 2) >> UPROPS_2_ID_TYPE_SHIFT; + return value >= UPROPS_ID_TYPE_ALLOWED_MIN ? U_ID_STATUS_ALLOWED : U_ID_STATUS_RESTRICTED; +} + static const IntProperty intProps[UCHAR_INT_LIMIT-UCHAR_INT_START]={ /* * column, mask and shift values for int-value properties from u_getUnicodeProperties(). @@ -656,6 +711,7 @@ static const IntProperty intProps[UCHAR_INT_LIMIT-UCHAR_INT_START]={ { UPROPS_SRC_INPC, 0, 0, getInPC, layoutGetMaxValue }, { UPROPS_SRC_INSC, 0, 0, getInSC, layoutGetMaxValue }, { UPROPS_SRC_VO, 0, 0, getVo, layoutGetMaxValue }, + { UPROPS_SRC_PROPSVEC, 0, (int32_t)U_ID_STATUS_ALLOWED, getIDStatusValue, getMaxValueFromShift }, }; U_CAPI int32_t U_EXPORT2 @@ -750,6 +806,7 @@ uprops_getSource(UProperty which) { } else { switch(which) { case UCHAR_SCRIPT_EXTENSIONS: + case UCHAR_IDENTIFIER_TYPE: return UPROPS_SRC_PROPSVEC; default: return UPROPS_SRC_NONE; /* undefined */ @@ -759,6 +816,19 @@ uprops_getSource(UProperty which) { U_CFUNC void U_EXPORT2 uprops_addPropertyStarts(UPropertySource src, const USetAdder *sa, UErrorCode *pErrorCode) { + if (U_FAILURE(*pErrorCode)) { return; } + if (src == UPROPS_SRC_ID_COMPAT_MATH) { + // range limits + for (UChar32 c : ID_COMPAT_MATH_CONTINUE) { + sa->add(sa->set, c); + } + // single characters + for (UChar32 c : ID_COMPAT_MATH_START) { + sa->add(sa->set, c); + sa->add(sa->set, c + 1); + } + return; + } if (!ulayout_ensureData(*pErrorCode)) { return; } const UCPTrie *trie; switch (src) { @@ -790,6 +860,86 @@ uprops_addPropertyStarts(UPropertySource src, const USetAdder *sa, UErrorCode *p } } +U_CAPI bool U_EXPORT2 +u_hasIDType(UChar32 c, UIdentifierType type) { + uint32_t typeIndex = type; // also guards against negative type integers + if (typeIndex >= UPRV_LENGTHOF(uprops_idTypeToEncoded)) { + return false; + } + uint32_t encodedType = uprops_idTypeToEncoded[typeIndex]; + uint32_t value = u_getUnicodeProperties(c, 2) >> UPROPS_2_ID_TYPE_SHIFT; + if ((encodedType & UPROPS_ID_TYPE_BIT) != 0) { + return value < UPROPS_ID_TYPE_FORBIDDEN && (value & encodedType) != 0; + } else { + return value == encodedType; + } +} + +namespace { + +void maybeAppendType(uint32_t value, uint32_t bit, UIdentifierType t, + UIdentifierType *types, int32_t &length, int32_t capacity) { + if ((value & bit) != 0) { + if (length < capacity) { + types[length] = t; + } + ++length; + } +} + +} // namespace + +U_CAPI int32_t U_EXPORT2 +u_getIDTypes(UChar32 c, UIdentifierType *types, int32_t capacity, UErrorCode *pErrorCode) { + if (U_FAILURE(*pErrorCode)) { return 0; } + if (capacity < 0 || (capacity > 0 && types == nullptr)) { + *pErrorCode = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + uint32_t value = u_getUnicodeProperties(c, 2) >> UPROPS_2_ID_TYPE_SHIFT; + if ((value & UPROPS_ID_TYPE_FORBIDDEN) == UPROPS_ID_TYPE_FORBIDDEN || + value == UPROPS_ID_TYPE_NOT_CHARACTER) { + // single value + if (capacity > 0) { + UIdentifierType t; + switch (value) { + case UPROPS_ID_TYPE_NOT_CHARACTER: t = U_ID_TYPE_NOT_CHARACTER; break; + case UPROPS_ID_TYPE_DEPRECATED: t = U_ID_TYPE_DEPRECATED; break; + case UPROPS_ID_TYPE_DEFAULT_IGNORABLE: t = U_ID_TYPE_DEFAULT_IGNORABLE; break; + case UPROPS_ID_TYPE_NOT_NFKC: t = U_ID_TYPE_NOT_NFKC; break; + case UPROPS_ID_TYPE_INCLUSION: t = U_ID_TYPE_INCLUSION; break; + case UPROPS_ID_TYPE_RECOMMENDED: t = U_ID_TYPE_RECOMMENDED; break; + default: + *pErrorCode = U_INVALID_FORMAT_ERROR; + return 0; + } + types[0] = t; + } else { + *pErrorCode = U_BUFFER_OVERFLOW_ERROR; + } + return 1; + } else { + // one or more combinable bits + int32_t length = 0; + maybeAppendType(value, UPROPS_ID_TYPE_NOT_XID, U_ID_TYPE_NOT_XID, + types, length, capacity); + maybeAppendType(value, UPROPS_ID_TYPE_EXCLUSION, U_ID_TYPE_EXCLUSION, + types, length, capacity); + maybeAppendType(value, UPROPS_ID_TYPE_OBSOLETE, U_ID_TYPE_OBSOLETE, + types, length, capacity); + maybeAppendType(value, UPROPS_ID_TYPE_TECHNICAL, U_ID_TYPE_TECHNICAL, + types, length, capacity); + maybeAppendType(value, UPROPS_ID_TYPE_UNCOMMON_USE, U_ID_TYPE_UNCOMMON_USE, + types, length, capacity); + maybeAppendType(value, UPROPS_ID_TYPE_LIMITED_USE, U_ID_TYPE_LIMITED_USE, + types, length, capacity); + if (length >= capacity) { + *pErrorCode = U_BUFFER_OVERFLOW_ERROR; + } + return length; + } +} + #if !UCONFIG_NO_NORMALIZATION U_CAPI int32_t U_EXPORT2 diff --git a/contrib/libs/icu/common/uprops.h b/contrib/libs/icu/common/uprops.h index 1e06d03519..93120017f0 100644 --- a/contrib/libs/icu/common/uprops.h +++ b/contrib/libs/icu/common/uprops.h @@ -224,23 +224,80 @@ enum { /* * Properties in vector word 2 * Bits - * 31..26 unused since ICU 70 added uemoji.icu; - * in ICU 57..69 stored emoji properties + * 31..26 ICU 75: Identifier_Type bit set + * ICU 70..74: unused + * ICU 57..69: emoji properties; moved to uemoji.icu in ICU 70 * 25..20 Line Break * 19..15 Sentence Break * 14..10 Word Break * 9.. 5 Grapheme Cluster Break * 4.. 0 Decomposition Type */ + +#ifdef __cplusplus + +// https://www.unicode.org/reports/tr39/#Identifier_Status_and_Type +// The Identifier_Type maps each code point to a *set* of one or more values. +// Some can be combined with others, some can only occur alone. +// Exclusion & Limited_Use are combinable bits, but cannot occur together. +// We use this forbidden combination for enumerated values. +// We use 6 bits for all possible combinations. +// If more combinable values are added, then we need to use more bits. +// +// We do not store separate data for Identifier_Status: +// We can derive that from the encoded Identifier_Type via a simple range check. + +inline constexpr uint32_t UPROPS_2_ID_TYPE_MASK = 0xfc000000; +inline constexpr int32_t UPROPS_2_ID_TYPE_SHIFT = 26; + enum { - UPROPS_2_UNUSED_WAS_EXTENDED_PICTOGRAPHIC=26, // ICU 62..69 - UPROPS_2_UNUSED_WAS_EMOJI_COMPONENT, // ICU 60..69 - UPROPS_2_UNUSED_WAS_EMOJI, // ICU 57..69 - UPROPS_2_UNUSED_WAS_EMOJI_PRESENTATION, // ICU 57..69 - UPROPS_2_UNUSED_WAS_EMOJI_MODIFIER, // ICU 57..69 - UPROPS_2_UNUSED_WAS_EMOJI_MODIFIER_BASE // ICU 57..69 + // A high bit for use in idTypeToEncoded[] but not used in the data + UPROPS_ID_TYPE_BIT = 0x80, + + // Combinable bits + UPROPS_ID_TYPE_EXCLUSION = 0x20, + UPROPS_ID_TYPE_LIMITED_USE = 0x10, + UPROPS_ID_TYPE_UNCOMMON_USE = 8, + UPROPS_ID_TYPE_TECHNICAL = 4, + UPROPS_ID_TYPE_OBSOLETE = 2, + UPROPS_ID_TYPE_NOT_XID = 1, + + // Exclusive values + UPROPS_ID_TYPE_NOT_CHARACTER = 0, + + // Forbidden bit combination used for enumerating other exclusive values + UPROPS_ID_TYPE_FORBIDDEN = UPROPS_ID_TYPE_EXCLUSION | UPROPS_ID_TYPE_LIMITED_USE, // 0x30 + UPROPS_ID_TYPE_DEPRECATED = UPROPS_ID_TYPE_FORBIDDEN, // 0x30 + UPROPS_ID_TYPE_DEFAULT_IGNORABLE, // 0x31 + UPROPS_ID_TYPE_NOT_NFKC, // 0x32 + + UPROPS_ID_TYPE_ALLOWED_MIN = UPROPS_ID_TYPE_FORBIDDEN + 0xc, // 0x3c + UPROPS_ID_TYPE_INCLUSION = UPROPS_ID_TYPE_FORBIDDEN + 0xe, // 0x3e + UPROPS_ID_TYPE_RECOMMENDED = UPROPS_ID_TYPE_FORBIDDEN + 0xf, // 0x3f }; +/** + * Maps UIdentifierType to encoded bits. + * When UPROPS_ID_TYPE_BIT is set, then use "&" to test whether the value bit is set. + * When UPROPS_ID_TYPE_BIT is not set, then compare ("==") the array value with the data value. + */ +inline constexpr uint8_t uprops_idTypeToEncoded[] = { + UPROPS_ID_TYPE_NOT_CHARACTER, + UPROPS_ID_TYPE_DEPRECATED, + UPROPS_ID_TYPE_DEFAULT_IGNORABLE, + UPROPS_ID_TYPE_NOT_NFKC, + UPROPS_ID_TYPE_BIT | UPROPS_ID_TYPE_NOT_XID, + UPROPS_ID_TYPE_BIT | UPROPS_ID_TYPE_EXCLUSION, + UPROPS_ID_TYPE_BIT | UPROPS_ID_TYPE_OBSOLETE, + UPROPS_ID_TYPE_BIT | UPROPS_ID_TYPE_TECHNICAL, + UPROPS_ID_TYPE_BIT | UPROPS_ID_TYPE_UNCOMMON_USE, + UPROPS_ID_TYPE_BIT | UPROPS_ID_TYPE_LIMITED_USE, + UPROPS_ID_TYPE_INCLUSION, + UPROPS_ID_TYPE_RECOMMENDED +}; + +#endif // __cplusplus + #define UPROPS_LB_MASK 0x03f00000 #define UPROPS_LB_SHIFT 20 @@ -379,6 +436,8 @@ enum UPropertySource { UPROPS_SRC_INSC, UPROPS_SRC_VO, UPROPS_SRC_EMOJI, + UPROPS_SRC_IDSU, + UPROPS_SRC_ID_COMPAT_MATH, /** One more than the highest UPropertySource (UPROPS_SRC_) constant. */ UPROPS_SRC_COUNT }; diff --git a/contrib/libs/icu/common/uresbund.cpp b/contrib/libs/icu/common/uresbund.cpp index d02bba8921..ea4327b314 100644 --- a/contrib/libs/icu/common/uresbund.cpp +++ b/contrib/libs/icu/common/uresbund.cpp @@ -24,6 +24,7 @@ #include "unicode/ures.h" #include "unicode/ustring.h" #include "unicode/ucnv.h" +#include "bytesinkutil.h" #include "charstr.h" #include "uresimp.h" #include "ustr_imp.h" @@ -93,8 +94,16 @@ static UBool chopLocale(char *name) { static UBool hasVariant(const char* localeID) { UErrorCode err = U_ZERO_ERROR; - int32_t variantLength = uloc_getVariant(localeID, nullptr, 0, &err); - return variantLength != 0; + CheckedArrayByteSink sink(nullptr, 0); + ulocimp_getSubtags( + localeID, + nullptr, + nullptr, + nullptr, + &sink, + nullptr, + err); + return sink.NumberOfBytesAppended() != 0; } // This file contains the tables for doing locale fallback, which are generated @@ -208,17 +217,11 @@ static bool getParentLocaleID(char *name, const char *origName, UResOpenType ope } UErrorCode err = U_ZERO_ERROR; - const char* tempNamePtr = name; - CharString language = ulocimp_getLanguage(tempNamePtr, &tempNamePtr, err); - if (*tempNamePtr == '_') { - ++tempNamePtr; - } - CharString script = ulocimp_getScript(tempNamePtr, &tempNamePtr, err); - if (*tempNamePtr == '_') { - ++tempNamePtr; - } - CharString region = ulocimp_getCountry(tempNamePtr, &tempNamePtr, err); - CharString workingLocale; + CharString language; + CharString script; + CharString region; + ulocimp_getSubtags(name, &language, &script, ®ion, nullptr, nullptr, err); + if (U_FAILURE(err)) { // hopefully this never happens... return chopLocale(name); @@ -237,13 +240,15 @@ static bool getParentLocaleID(char *name, const char *origName, UResOpenType ope } } + CharString workingLocale; + // if it's not in the parent locale table, figure out the fallback script algorithmically // (see CLDR-15265 for an explanation of the algorithm) if (!script.isEmpty() && !region.isEmpty()) { // if "name" has both script and region, is the script the default script? // - if so, remove it and keep the region // - if not, remove the region and keep the script - if (getDefaultScript(language, region) == script.toStringPiece()) { + if (getDefaultScript(language, region) == script) { workingLocale.append(language, err).append("_", err).append(region, err); } else { workingLocale.append(language, err).append("_", err).append(script, err); @@ -253,12 +258,9 @@ static bool getParentLocaleID(char *name, const char *origName, UResOpenType ope // - if yes, replace the region with the script from the original locale ID // - if no, replace the region with the default script for that language and region UErrorCode err = U_ZERO_ERROR; - tempNamePtr = origName; - CharString origNameLanguage = ulocimp_getLanguage(tempNamePtr, &tempNamePtr, err); - if (*tempNamePtr == '_') { - ++tempNamePtr; - } - CharString origNameScript = ulocimp_getScript(origName, nullptr, err); + CharString origNameLanguage; + CharString origNameScript; + ulocimp_getSubtags(origName, &origNameLanguage, &origNameScript, nullptr, nullptr, nullptr, err); if (!origNameScript.isEmpty()) { workingLocale.append(language, err).append("_", err).append(origNameScript, err); } else { @@ -271,7 +273,7 @@ static bool getParentLocaleID(char *name, const char *origName, UResOpenType ope // - if not, return false to continue up the chain // (we don't do this for other open types for the same reason we don't look things up in the parent // locale table for other open types-- see the reference to UTS #35 above) - if (openType != URES_OPEN_LOCALE_DEFAULT_ROOT || getDefaultScript(language, CharString()) == script.toStringPiece()) { + if (openType != URES_OPEN_LOCALE_DEFAULT_ROOT || getDefaultScript(language, CharString()) == script) { workingLocale.append(language, err); } else { return false; @@ -1707,7 +1709,7 @@ U_CAPI int32_t U_EXPORT2 ures_getSize(const UResourceBundle *resB) { static const char16_t* ures_getStringWithAlias(const UResourceBundle *resB, Resource r, int32_t sIndex, int32_t *len, UErrorCode *status) { if(RES_GET_TYPE(r) == URES_ALIAS) { - const char16_t* result = 0; + const char16_t* result = nullptr; UResourceBundle *tempRes = ures_getByIndex(resB, sIndex, nullptr, status); result = ures_getString(tempRes, len, status); ures_close(tempRes); @@ -2351,7 +2353,66 @@ struct GetAllChildrenSink : public ResourceSink { aliasedValue.setData(aliasRB->getResData()); aliasedValue.setValidLocaleDataEntry(aliasRB->fValidLocaleDataEntry); aliasedValue.setResource(aliasRB->fRes, ResourceTracer(aliasRB)); - dest.put(key, aliasedValue, isRoot, errorCode); + + if (aliasedValue.getType() != URES_TABLE) { + dest.put(key, aliasedValue, isRoot, errorCode); + } else { + // if the resource we're aliasing over to is a table, the sink might iterate over its contents. + // If it does, it'll get only the things defined in the actual alias target, not the things + // the target inherits from its parent resources. So we walk the parent chain for the *alias target*, + // calling dest.put() for each of the parent tables we could be inheriting from. This means + // that dest.put() has to iterate over the children of multiple tables to get all of the inherited + // resource values, but it already has to do that to handle normal vertical inheritance. + UResType aliasedValueType = URES_TABLE; + CharString tablePath; + tablePath.append(aliasRB->fResPath, errorCode); + const char* parentKey = key; // dest.put() changes the key + dest.put(parentKey, aliasedValue, isRoot, errorCode); + UResourceDataEntry* entry = aliasRB->fData; + Resource res = aliasRB->fRes; + while (aliasedValueType == URES_TABLE && entry->fParent != nullptr) { + CharString localPath; + localPath.copyFrom(tablePath, errorCode); + char* localPathAsCharPtr = localPath.data(); + const char* childKey; + entry = entry->fParent; + res = entry->fData.rootRes; + Resource newRes = res_findResource(&entry->fData, res, &localPathAsCharPtr, &childKey); + if (newRes != RES_BOGUS) { + aliasedValue.setData(entry->fData); + // TODO: do I also need to call aliasedValue.setValueLocaleDataEntry() ? + aliasedValue.setResource(newRes, ResourceTracer(aliasRB)); // probably wrong to use aliasRB here + aliasedValueType = aliasedValue.getType(); + if (aliasedValueType == URES_ALIAS) { + // in a few rare cases, when we get to the root resource bundle, the resource in question + // won't be an actual table, but will instead be an alias to a table. That is, we have + // two aliases in the inheritance path. (For some locales, such as Zulu, we see this with + // children of the "fields" resource: "day-narrow" aliases to "day-short", which aliases + // to "day".) When this happens, we need to make sure we follow all the aliases. + ResourceDataValue& rdv2 = static_cast<ResourceDataValue&>(aliasedValue); + aliasRB = getAliasTargetAsResourceBundle(rdv2.getData(), rdv2.getResource(), nullptr, -1, + rdv2.getValidLocaleDataEntry(), nullptr, 0, + stackTempBundle.getAlias(), &errorCode); + tablePath.clear(); + tablePath.append(aliasRB->fResPath, errorCode); + entry = aliasRB->fData; + res = aliasRB->fRes; + aliasedValue.setData(entry->fData); + // TODO: do I also need to call aliasedValue.setValueLocaleDataEntry() ? + aliasedValue.setResource(res, ResourceTracer(aliasRB)); // probably wrong to use aliasRB here + aliasedValueType = aliasedValue.getType(); + } + if (aliasedValueType == URES_TABLE) { + dest.put(parentKey, aliasedValue, isRoot, errorCode); + } else { + // once we've followed the alias, the resource we're looking at really should + // be a table + errorCode = U_INTERNAL_PROGRAM_ERROR; + return; + } + } + } + } } } else { dest.put(key, value, isRoot, errorCode); @@ -2513,7 +2574,7 @@ U_CAPI const char16_t* U_EXPORT2 ures_getStringByKey(const UResourceBundle *resB return res_getString({resB, key}, &dataEntry->fData, res, len); case URES_ALIAS: { - const char16_t* result = 0; + const char16_t* result = nullptr; UResourceBundle *tempRes = ures_getByKey(resB, inKey, nullptr, status); result = ures_getString(tempRes, len, status); ures_close(tempRes); @@ -2535,7 +2596,7 @@ U_CAPI const char16_t* U_EXPORT2 ures_getStringByKey(const UResourceBundle *resB return res_getString({resB, key}, &resB->getResData(), res, len); case URES_ALIAS: { - const char16_t* result = 0; + const char16_t* result = nullptr; UResourceBundle *tempRes = ures_getByKey(resB, inKey, nullptr, status); result = ures_getString(tempRes, len, status); ures_close(tempRes); @@ -2657,13 +2718,12 @@ ures_openWithType(UResourceBundle *r, const char* path, const char* localeID, UResourceDataEntry *entry; if(openType != URES_OPEN_DIRECT) { /* first "canonicalize" the locale ID */ - char canonLocaleID[ULOC_FULLNAME_CAPACITY]; - uloc_getBaseName(localeID, canonLocaleID, UPRV_LENGTHOF(canonLocaleID), status); - if(U_FAILURE(*status) || *status == U_STRING_NOT_TERMINATED_WARNING) { + CharString canonLocaleID = ulocimp_getBaseName(localeID, *status); + if(U_FAILURE(*status)) { *status = U_ILLEGAL_ARGUMENT_ERROR; return nullptr; } - entry = entryOpen(path, canonLocaleID, openType, status); + entry = entryOpen(path, canonLocaleID.data(), openType, status); } else { entry = entryOpenDirect(path, localeID, status); } @@ -2889,7 +2949,7 @@ ures_loc_nextLocale(UEnumeration* en, UResourceBundle *k = nullptr; const char *result = nullptr; int32_t len = 0; - if(ures_hasNext(res) && (k = ures_getNextResource(res, &ctx->curr, status)) != 0) { + if (ures_hasNext(res) && (k = ures_getNextResource(res, &ctx->curr, status)) != nullptr) { result = ures_getKey(k); len = (int32_t)uprv_strlen(result); } @@ -2974,44 +3034,66 @@ static UBool isLocaleInList(UEnumeration *locEnum, const char *locToSearch, UErr return false; } +static void getParentForFunctionalEquivalent(const char* localeID, + UResourceBundle* res, + UResourceBundle* bund1, + CharString& parent) { + // Get parent. + // First check for a parent from %%Parent resource (Note that in resource trees + // such as collation, data may have different parents than in parentLocales). + UErrorCode subStatus = U_ZERO_ERROR; + parent.clear(); + if (res != nullptr) { + ures_getByKey(res, "%%Parent", bund1, &subStatus); + if (U_SUCCESS(subStatus)) { + int32_t length16; + const char16_t* s16 = ures_getString(bund1, &length16, &subStatus); + parent.appendInvariantChars(s16, length16, subStatus); + } + } + + // If none there, use normal truncation parent + if (U_FAILURE(subStatus) || parent.isEmpty()) { + subStatus = U_ZERO_ERROR; + parent = ulocimp_getParent(localeID, subStatus); + } +} + U_CAPI int32_t U_EXPORT2 ures_getFunctionalEquivalent(char *result, int32_t resultCapacity, const char *path, const char *resName, const char *keyword, const char *locid, UBool *isAvailable, UBool omitDefault, UErrorCode *status) { - char kwVal[1024] = ""; /* value of keyword 'keyword' */ - char defVal[1024] = ""; /* default value for given locale */ - char defLoc[1024] = ""; /* default value for given locale */ - char base[1024] = ""; /* base locale */ - char found[1024] = ""; - char parent[1024] = ""; - char full[1024] = ""; + CharString defVal; /* default value for given locale */ + CharString defLoc; /* default value for given locale */ + CharString found; + CharString parent; + CharString full; UResourceBundle bund1, bund2; UResourceBundle *res = nullptr; UErrorCode subStatus = U_ZERO_ERROR; int32_t length = 0; if(U_FAILURE(*status)) return 0; - uloc_getKeywordValue(locid, keyword, kwVal, 1024-1,&subStatus); - if(!uprv_strcmp(kwVal, DEFAULT_TAG)) { - kwVal[0]=0; + CharString kwVal = ulocimp_getKeywordValue(locid, keyword, subStatus); + if(kwVal == DEFAULT_TAG) { + kwVal.clear(); } - uloc_getBaseName(locid, base, 1024-1,&subStatus); + CharString base = ulocimp_getBaseName(locid, subStatus); #if defined(URES_TREE_DEBUG) fprintf(stderr, "getFunctionalEquivalent: \"%s\" [%s=%s] in %s - %s\n", - locid, keyword, kwVal, base, u_errorName(subStatus)); + locid, keyword, kwVal.data(), base.data(), u_errorName(subStatus)); #endif ures_initStackObject(&bund1); ures_initStackObject(&bund2); - - - uprv_strcpy(parent, base); - uprv_strcpy(found, base); - if(isAvailable) { + parent.copyFrom(base, subStatus); + found.copyFrom(base, subStatus); + + if(isAvailable) { UEnumeration *locEnum = ures_openAvailableLocales(path, &subStatus); *isAvailable = true; if (U_SUCCESS(subStatus)) { - *isAvailable = isLocaleInList(locEnum, parent, &subStatus); + *isAvailable = isLocaleInList(locEnum, parent.data(), &subStatus); } uenum_close(locEnum); } @@ -3023,7 +3105,7 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity, do { subStatus = U_ZERO_ERROR; - res = ures_open(path, parent, &subStatus); + res = ures_open(path, parent.data(), &subStatus); if(((subStatus == U_USING_FALLBACK_WARNING) || (subStatus == U_USING_DEFAULT_WARNING)) && isAvailable) { @@ -3032,7 +3114,7 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity, isAvailable = nullptr; /* only want to set this the first time around */ #if defined(URES_TREE_DEBUG) - fprintf(stderr, "%s;%s -> %s [%s]\n", path?path:"ICUDATA", parent, u_errorName(subStatus), ures_getLocale(res, &subStatus)); + fprintf(stderr, "%s;%s -> %s [%s]\n", path?path:"ICUDATA", parent.data(), u_errorName(subStatus), ures_getLocale(res, &subStatus)); #endif if(U_FAILURE(subStatus)) { *status = subStatus; @@ -3044,21 +3126,21 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity, /* look for default item */ #if defined(URES_TREE_DEBUG) fprintf(stderr, "%s;%s : loaded default -> %s\n", - path?path:"ICUDATA", parent, u_errorName(subStatus)); + path?path:"ICUDATA", parent.data(), u_errorName(subStatus)); #endif defUstr = ures_getStringByKey(&bund1, DEFAULT_TAG, &defLen, &subStatus); if(U_SUCCESS(subStatus) && defLen) { - u_UCharsToChars(defUstr, defVal, u_strlen(defUstr)); + defVal.clear().appendInvariantChars(defUstr, defLen, subStatus); #if defined(URES_TREE_DEBUG) fprintf(stderr, "%s;%s -> default %s=%s, %s\n", - path?path:"ICUDATA", parent, keyword, defVal, u_errorName(subStatus)); + path?path:"ICUDATA", parent.data(), keyword, defVal.data(), u_errorName(subStatus)); #endif - uprv_strcpy(defLoc, parent); - if(kwVal[0]==0) { - uprv_strcpy(kwVal, defVal); + defLoc.copyFrom(parent, subStatus); + if(kwVal.isEmpty()) { + kwVal.append(defVal, subStatus); #if defined(URES_TREE_DEBUG) fprintf(stderr, "%s;%s -> kwVal = %s\n", - path?path:"ICUDATA", parent, keyword, kwVal); + path?path:"ICUDATA", parent.data(), keyword, kwVal.data()); #endif } } @@ -3068,20 +3150,23 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity, subStatus = U_ZERO_ERROR; if (res != nullptr) { - uprv_strcpy(found, ures_getLocaleByType(res, ULOC_VALID_LOCALE, &subStatus)); + found.clear().append(ures_getLocaleByType(res, ULOC_VALID_LOCALE, &subStatus), subStatus); } - uloc_getParent(found,parent,sizeof(parent),&subStatus); + if (found != parent) { + parent.copyFrom(found, subStatus); + } else { + getParentForFunctionalEquivalent(found.data(),res,&bund1,parent); + } ures_close(res); - } while(!defVal[0] && *found && uprv_strcmp(found, "root") != 0 && U_SUCCESS(*status)); + } while(defVal.isEmpty() && !found.isEmpty() && found != "root" && U_SUCCESS(*status)); /* Now, see if we can find the kwVal collator.. start the search over.. */ - uprv_strcpy(parent, base); - uprv_strcpy(found, base); - + parent.copyFrom(base, subStatus); + found.copyFrom(base, subStatus); + do { - subStatus = U_ZERO_ERROR; - res = ures_open(path, parent, &subStatus); + res = ures_open(path, parent.data(), &subStatus); if((subStatus == U_USING_FALLBACK_WARNING) && isAvailable) { *isAvailable = false; } @@ -3089,7 +3174,7 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity, #if defined(URES_TREE_DEBUG) fprintf(stderr, "%s;%s -> %s (looking for %s)\n", - path?path:"ICUDATA", parent, u_errorName(subStatus), kwVal); + path?path:"ICUDATA", parent.data(), u_errorName(subStatus), kwVal.data()); #endif if(U_FAILURE(subStatus)) { *status = subStatus; @@ -3099,70 +3184,92 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity, /**/ fprintf(stderr,"@%d [%s] %s\n", __LINE__, resName, u_errorName(subStatus)); #endif if(subStatus == U_ZERO_ERROR) { - ures_getByKey(&bund1, kwVal, &bund2, &subStatus); + ures_getByKey(&bund1, kwVal.data(), &bund2, &subStatus); #if defined(URES_TREE_DEBUG) -/**/ fprintf(stderr,"@%d [%s] %s\n", __LINE__, kwVal, u_errorName(subStatus)); +/**/ fprintf(stderr,"@%d [%s] %s\n", __LINE__, kwVal.data(), u_errorName(subStatus)); #endif if(subStatus == U_ZERO_ERROR) { #if defined(URES_TREE_DEBUG) fprintf(stderr, "%s;%s -> full0 %s=%s, %s\n", - path?path:"ICUDATA", parent, keyword, kwVal, u_errorName(subStatus)); + path?path:"ICUDATA", parent.data(), keyword, kwVal.data(), u_errorName(subStatus)); #endif - uprv_strcpy(full, parent); - if(*full == 0) { - uprv_strcpy(full, "root"); + if (parent.isEmpty()) { + full.clear().append("root", subStatus); + } else { + full.copyFrom(parent, subStatus); } /* now, recalculate default kw if need be */ - if(uprv_strlen(defLoc) > uprv_strlen(full)) { + if(defLoc.length() > full.length()) { const char16_t *defUstr; int32_t defLen; /* look for default item */ #if defined(URES_TREE_DEBUG) fprintf(stderr, "%s;%s -> recalculating Default0\n", - path?path:"ICUDATA", full); + path?path:"ICUDATA", full.data()); #endif defUstr = ures_getStringByKey(&bund1, DEFAULT_TAG, &defLen, &subStatus); if(U_SUCCESS(subStatus) && defLen) { - u_UCharsToChars(defUstr, defVal, u_strlen(defUstr)); + defVal.clear().appendInvariantChars(defUstr, defLen, subStatus); #if defined(URES_TREE_DEBUG) fprintf(stderr, "%s;%s -> default0 %s=%s, %s\n", - path?path:"ICUDATA", full, keyword, defVal, u_errorName(subStatus)); + path?path:"ICUDATA", full.data(), keyword, defVal.data(), u_errorName(subStatus)); #endif - uprv_strcpy(defLoc, full); + defLoc.copyFrom(full, subStatus); } } /* end of recalculate default KW */ #if defined(URES_TREE_DEBUG) else { - fprintf(stderr, "No trim0, %s <= %s\n", defLoc, full); + fprintf(stderr, "No trim0, %s <= %s\n", defLoc.data(), full.data()); } #endif } else { #if defined(URES_TREE_DEBUG) fprintf(stderr, "err=%s in %s looking for %s\n", - u_errorName(subStatus), parent, kwVal); + u_errorName(subStatus), parent.data(), kwVal.data()); #endif } } } subStatus = U_ZERO_ERROR; - - uprv_strcpy(found, parent); - uloc_getParent(found,parent,1023,&subStatus); + UBool haveFound = false; + // At least for collations which may be aliased, we need to use the VALID locale + // as the parent instead of just truncating, as long as the VALID locale is not + // root and has a different language than the parent. Use of the VALID locale + // here is similar to the procedure used at the end of the previous do-while loop + // for all resource types. + if (res != nullptr && uprv_strcmp(resName, "collations") == 0) { + const char *validLoc = ures_getLocaleByType(res, ULOC_VALID_LOCALE, &subStatus); + if (U_SUCCESS(subStatus) && validLoc != nullptr && validLoc[0] != 0 && uprv_strcmp(validLoc, "root") != 0) { + CharString validLang = ulocimp_getLanguage(validLoc, subStatus); + CharString parentLang = ulocimp_getLanguage(parent.data(), subStatus); + if (U_SUCCESS(subStatus) && validLang != parentLang) { + // validLoc is not root and has a different language than parent, use it instead + found.clear().append(validLoc, subStatus); + haveFound = true; + } + } + subStatus = U_ZERO_ERROR; + } + if (!haveFound) { + found.copyFrom(parent, subStatus); + } + + getParentForFunctionalEquivalent(found.data(),res,&bund1,parent); ures_close(res); - } while(!full[0] && *found && U_SUCCESS(*status)); - - if((full[0]==0) && uprv_strcmp(kwVal, defVal)) { + subStatus = U_ZERO_ERROR; + } while(full.isEmpty() && !found.isEmpty() && U_SUCCESS(*status)); + + if(full.isEmpty() && kwVal != defVal) { #if defined(URES_TREE_DEBUG) - fprintf(stderr, "Failed to locate kw %s - try default %s\n", kwVal, defVal); + fprintf(stderr, "Failed to locate kw %s - try default %s\n", kwVal.data(), defVal.data()); #endif - uprv_strcpy(kwVal, defVal); - uprv_strcpy(parent, base); - uprv_strcpy(found, base); - + kwVal.clear().append(defVal, subStatus); + parent.copyFrom(base, subStatus); + found.copyFrom(base, subStatus); + do { /* search for 'default' named item */ - subStatus = U_ZERO_ERROR; - res = ures_open(path, parent, &subStatus); + res = ures_open(path, parent.data(), &subStatus); if((subStatus == U_USING_FALLBACK_WARNING) && isAvailable) { *isAvailable = false; } @@ -3170,91 +3277,95 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity, #if defined(URES_TREE_DEBUG) fprintf(stderr, "%s;%s -> %s (looking for default %s)\n", - path?path:"ICUDATA", parent, u_errorName(subStatus), kwVal); + path?path:"ICUDATA", parent.data(), u_errorName(subStatus), kwVal.data()); #endif if(U_FAILURE(subStatus)) { *status = subStatus; } else if(subStatus == U_ZERO_ERROR) { ures_getByKey(res,resName,&bund1, &subStatus); if(subStatus == U_ZERO_ERROR) { - ures_getByKey(&bund1, kwVal, &bund2, &subStatus); + ures_getByKey(&bund1, kwVal.data(), &bund2, &subStatus); if(subStatus == U_ZERO_ERROR) { #if defined(URES_TREE_DEBUG) fprintf(stderr, "%s;%s -> full1 %s=%s, %s\n", path?path:"ICUDATA", - parent, keyword, kwVal, u_errorName(subStatus)); + parent.data(), keyword, kwVal.data(), u_errorName(subStatus)); #endif - uprv_strcpy(full, parent); - if(*full == 0) { - uprv_strcpy(full, "root"); + if (parent.isEmpty()) { + full.clear().append("root", subStatus); + } else { + full.copyFrom(parent, subStatus); } /* now, recalculate default kw if need be */ - if(uprv_strlen(defLoc) > uprv_strlen(full)) { + if(defLoc.length() > full.length()) { const char16_t *defUstr; int32_t defLen; /* look for default item */ #if defined(URES_TREE_DEBUG) fprintf(stderr, "%s;%s -> recalculating Default1\n", - path?path:"ICUDATA", full); + path?path:"ICUDATA", full.data()); #endif defUstr = ures_getStringByKey(&bund1, DEFAULT_TAG, &defLen, &subStatus); if(U_SUCCESS(subStatus) && defLen) { - u_UCharsToChars(defUstr, defVal, u_strlen(defUstr)); + defVal.clear().appendInvariantChars(defUstr, defLen, subStatus); #if defined(URES_TREE_DEBUG) fprintf(stderr, "%s;%s -> default %s=%s, %s\n", - path?path:"ICUDATA", full, keyword, defVal, u_errorName(subStatus)); + path?path:"ICUDATA", full.data(), keyword, defVal.data(), u_errorName(subStatus)); #endif - uprv_strcpy(defLoc, full); + defLoc.copyFrom(full, subStatus); } } /* end of recalculate default KW */ #if defined(URES_TREE_DEBUG) else { - fprintf(stderr, "No trim1, %s <= %s\n", defLoc, full); + fprintf(stderr, "No trim1, %s <= %s\n", defLoc.data(), full.data()); } #endif } } } - subStatus = U_ZERO_ERROR; - uprv_strcpy(found, parent); - uloc_getParent(found,parent,1023,&subStatus); + subStatus = U_ZERO_ERROR; + found.copyFrom(parent, subStatus); + getParentForFunctionalEquivalent(found.data(),res,&bund1,parent); ures_close(res); - } while(!full[0] && *found && U_SUCCESS(*status)); + subStatus = U_ZERO_ERROR; + } while(full.isEmpty() && !found.isEmpty() && U_SUCCESS(*status)); } if(U_SUCCESS(*status)) { - if(!full[0]) { + if(full.isEmpty()) { #if defined(URES_TREE_DEBUG) - fprintf(stderr, "Still could not load keyword %s=%s\n", keyword, kwVal); + fprintf(stderr, "Still could not load keyword %s=%s\n", keyword, kwVal.data()); #endif *status = U_MISSING_RESOURCE_ERROR; } else if(omitDefault) { #if defined(URES_TREE_DEBUG) - fprintf(stderr,"Trim? full=%s, defLoc=%s, found=%s\n", full, defLoc, found); + fprintf(stderr,"Trim? full=%s, defLoc=%s, found=%s\n", full.data(), defLoc.data(), found.data()); #endif - if(uprv_strlen(defLoc) <= uprv_strlen(full)) { + if(defLoc.length() <= full.length()) { /* found the keyword in a *child* of where the default tag was present. */ - if(!uprv_strcmp(kwVal, defVal)) { /* if the requested kw is default, */ + if(kwVal == defVal) { /* if the requested kw is default, */ /* and the default is in or in an ancestor of the current locale */ #if defined(URES_TREE_DEBUG) - fprintf(stderr, "Removing unneeded var %s=%s\n", keyword, kwVal); + fprintf(stderr, "Removing unneeded var %s=%s\n", keyword, kwVal.data()); #endif - kwVal[0]=0; + kwVal.clear(); } } } - uprv_strcpy(found, full); - if(kwVal[0]) { - uprv_strcat(found, "@"); - uprv_strcat(found, keyword); - uprv_strcat(found, "="); - uprv_strcat(found, kwVal); + found.copyFrom(full, subStatus); + if(!kwVal.isEmpty()) { + found + .append("@", subStatus) + .append(keyword, subStatus) + .append("=", subStatus) + .append(kwVal, subStatus); } else if(!omitDefault) { - uprv_strcat(found, "@"); - uprv_strcat(found, keyword); - uprv_strcat(found, "="); - uprv_strcat(found, defVal); + found + .append("@", subStatus) + .append(keyword, subStatus) + .append("=", subStatus) + .append(defVal, subStatus); } } /* we found the default locale - no need to repeat it.*/ @@ -3262,12 +3373,12 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity, ures_close(&bund1); ures_close(&bund2); - length = (int32_t)uprv_strlen(found); + length = found.length(); if(U_SUCCESS(*status)) { int32_t copyLength = uprv_min(length, resultCapacity); if(copyLength>0) { - uprv_strncpy(result, found, copyLength); + found.extract(result, copyLength, subStatus); } if(length == 0) { *status = U_MISSING_RESOURCE_ERROR; @@ -3310,8 +3421,8 @@ ures_getKeywordValues(const char *path, const char *keyword, UErrorCode *status) valuesBuf[0]=0; valuesBuf[1]=0; - - while((locale = uenum_next(locs, &locLen, status)) != 0) { + + while ((locale = uenum_next(locs, &locLen, status)) != nullptr) { UResourceBundle *bund = nullptr; UResourceBundle *subPtr = nullptr; UErrorCode subStatus = U_ZERO_ERROR; /* don't fail if a bundle is unopenable */ @@ -3335,8 +3446,8 @@ ures_getKeywordValues(const char *path, const char *keyword, UErrorCode *status) bund = nullptr; continue; } - - while((subPtr = ures_getNextResource(&item,&subItem,&subStatus)) != 0 + + while ((subPtr = ures_getNextResource(&item, &subItem, &subStatus)) != nullptr && U_SUCCESS(subStatus)) { const char *k; int32_t i; diff --git a/contrib/libs/icu/common/uresdata.cpp b/contrib/libs/icu/common/uresdata.cpp index b219e40e21..c38e75c65b 100644 --- a/contrib/libs/icu/common/uresdata.cpp +++ b/contrib/libs/icu/common/uresdata.cpp @@ -571,7 +571,7 @@ const uint8_t *ResourceDataValue::getBinary(int32_t &length, UErrorCode &errorCo ResourceArray ResourceDataValue::getArray(UErrorCode &errorCode) const { if(U_FAILURE(errorCode)) { - return ResourceArray(); + return {}; } const uint16_t *items16 = nullptr; const Resource *items32 = nullptr; @@ -590,14 +590,14 @@ ResourceArray ResourceDataValue::getArray(UErrorCode &errorCode) const { break; default: errorCode = U_RESOURCE_TYPE_MISMATCH; - return ResourceArray(); + return {}; } return ResourceArray(items16, items32, length, fTraceInfo); } ResourceTable ResourceDataValue::getTable(UErrorCode &errorCode) const { if(U_FAILURE(errorCode)) { - return ResourceTable(); + return {}; } const uint16_t *keys16 = nullptr; const int32_t *keys32 = nullptr; @@ -627,7 +627,7 @@ ResourceTable ResourceDataValue::getTable(UErrorCode &errorCode) const { break; default: errorCode = U_RESOURCE_TYPE_MISMATCH; - return ResourceTable(); + return {}; } return ResourceTable(keys16, keys32, items16, items32, length, fTraceInfo); } diff --git a/contrib/libs/icu/common/uscript.cpp b/contrib/libs/icu/common/uscript.cpp index 3cc2b6675c..2e9012a982 100644 --- a/contrib/libs/icu/common/uscript.cpp +++ b/contrib/libs/icu/common/uscript.cpp @@ -18,7 +18,6 @@ #include "unicode/uchar.h" #include "unicode/uscript.h" #include "unicode/uloc.h" -#include "bytesinkutil.h" #include "charstr.h" #include "cmemory.h" #include "cstring.h" @@ -57,33 +56,25 @@ setOneCode(UScriptCode script, UScriptCode *scripts, int32_t capacity, UErrorCod static int32_t getCodesFromLocale(const char *locale, UScriptCode *scripts, int32_t capacity, UErrorCode *err) { - UErrorCode internalErrorCode = U_ZERO_ERROR; - char lang[8] = {0}; - char script[8] = {0}; - int32_t scriptLength; - if(U_FAILURE(*err)) { return 0; } + if (U_FAILURE(*err)) { return 0; } + icu::CharString lang; + icu::CharString script; + ulocimp_getSubtags(locale, &lang, &script, nullptr, nullptr, nullptr, *err); + if (U_FAILURE(*err)) { return 0; } // Multi-script languages, equivalent to the LocaleScript data // that we used to load from locale resource bundles. - /*length = */ uloc_getLanguage(locale, lang, UPRV_LENGTHOF(lang), &internalErrorCode); - if(U_FAILURE(internalErrorCode) || internalErrorCode == U_STRING_NOT_TERMINATED_WARNING) { - return 0; - } - if(0 == uprv_strcmp(lang, "ja")) { + if (lang == "ja") { return setCodes(JAPANESE, UPRV_LENGTHOF(JAPANESE), scripts, capacity, err); } - if(0 == uprv_strcmp(lang, "ko")) { + if (lang == "ko") { return setCodes(KOREAN, UPRV_LENGTHOF(KOREAN), scripts, capacity, err); } - scriptLength = uloc_getScript(locale, script, UPRV_LENGTHOF(script), &internalErrorCode); - if(U_FAILURE(internalErrorCode) || internalErrorCode == U_STRING_NOT_TERMINATED_WARNING) { - return 0; - } - if(0 == uprv_strcmp(lang, "zh") && 0 == uprv_strcmp(script, "Hant")) { + if (lang == "zh" && script == "Hant") { return setCodes(HAN_BOPO, UPRV_LENGTHOF(HAN_BOPO), scripts, capacity, err); } // Explicit script code. - if(scriptLength != 0) { - UScriptCode scriptCode = (UScriptCode)u_getPropertyValueEnum(UCHAR_SCRIPT, script); + if (!script.isEmpty()) { + UScriptCode scriptCode = (UScriptCode)u_getPropertyValueEnum(UCHAR_SCRIPT, script.data()); if(scriptCode != USCRIPT_INVALID_CODE) { if(scriptCode == USCRIPT_SIMPLIFIED_HAN || scriptCode == USCRIPT_TRADITIONAL_HAN) { scriptCode = USCRIPT_HAN; @@ -140,11 +131,7 @@ uscript_getCode(const char* nameOrAbbrOrLocale, if(U_FAILURE(*err) || length != 0) { return length; } - icu::CharString likely; - { - icu::CharStringByteSink sink(&likely); - ulocimp_addLikelySubtags(nameOrAbbrOrLocale, sink, &internalErrorCode); - } + icu::CharString likely = ulocimp_addLikelySubtags(nameOrAbbrOrLocale, internalErrorCode); if(U_SUCCESS(internalErrorCode) && internalErrorCode != U_STRING_NOT_TERMINATED_WARNING) { length = getCodesFromLocale(likely.data(), fillIn, capacity, err); if(U_FAILURE(*err) || length != 0) { diff --git a/contrib/libs/icu/common/uset_props.cpp b/contrib/libs/icu/common/uset_props.cpp index 6f6e0c550f..c5efde1ff7 100644 --- a/contrib/libs/icu/common/uset_props.cpp +++ b/contrib/libs/icu/common/uset_props.cpp @@ -36,9 +36,9 @@ uset_openPattern(const char16_t* pattern, int32_t patternLength, UnicodeString pat(patternLength==-1, pattern, patternLength); UnicodeSet* set = new UnicodeSet(pat, *ec); /* test for nullptr */ - if(set == 0) { + if (set == nullptr) { *ec = U_MEMORY_ALLOCATION_ERROR; - return 0; + return nullptr; } if (U_FAILURE(*ec)) { @@ -56,9 +56,9 @@ uset_openPatternOptions(const char16_t* pattern, int32_t patternLength, UnicodeString pat(patternLength==-1, pattern, patternLength); UnicodeSet* set = new UnicodeSet(pat, options, nullptr, *ec); /* test for nullptr */ - if(set == 0) { + if (set == nullptr) { *ec = U_MEMORY_ALLOCATION_ERROR; - return 0; + return nullptr; } if (U_FAILURE(*ec)) { diff --git a/contrib/libs/icu/common/usprep.cpp b/contrib/libs/icu/common/usprep.cpp index fc9d0ac208..22ab0c24eb 100644 --- a/contrib/libs/icu/common/usprep.cpp +++ b/contrib/libs/icu/common/usprep.cpp @@ -228,7 +228,7 @@ loadData(UStringPrepProfile* profile, const char* type, UErrorCode* errorCode) { /* load Unicode SPREP data from file */ - UTrie _sprepTrie={ 0,0,0,0,0,0,0 }; + UTrie _sprepTrie = {nullptr, nullptr, nullptr, 0, 0, 0, 0}; UDataMemory *dataMemory; const int32_t *p=nullptr; const uint8_t *pb; diff --git a/contrib/libs/icu/common/ustrcase.cpp b/contrib/libs/icu/common/ustrcase.cpp index 537b5ba857..4c726d47db 100644 --- a/contrib/libs/icu/common/ustrcase.cpp +++ b/contrib/libs/icu/common/ustrcase.cpp @@ -1130,14 +1130,18 @@ int32_t toUpper(uint32_t options, // Adding one only to the final vowel in a longer sequence // (which does not occur in normal writing) would require lookahead. // Set the same flag as for preserving an existing dialytika. - if ((data & HAS_VOWEL) != 0 && (state & AFTER_VOWEL_WITH_ACCENT) != 0 && - (upper == 0x399 || upper == 0x3A5)) { - data |= HAS_DIALYTIKA; + if ((data & HAS_VOWEL) != 0 && + (state & (AFTER_VOWEL_WITH_PRECOMPOSED_ACCENT | AFTER_VOWEL_WITH_COMBINING_ACCENT)) != + 0 && + (upper == 0x399 || upper == 0x3A5)) { + data |= (state & AFTER_VOWEL_WITH_PRECOMPOSED_ACCENT) ? HAS_DIALYTIKA + : HAS_COMBINING_DIALYTIKA; } int32_t numYpogegrammeni = 0; // Map each one to a trailing, spacing, capital iota. if ((data & HAS_YPOGEGRAMMENI) != 0) { numYpogegrammeni = 1; } + const UBool hasPrecomposedAccent = (data & HAS_ACCENT) != 0; // Skip combining diacritics after this Greek letter. while (nextIndex < srcLength) { uint32_t diacriticData = getDiacriticData(src[nextIndex]); @@ -1152,7 +1156,8 @@ int32_t toUpper(uint32_t options, } } if ((data & HAS_VOWEL_AND_ACCENT_AND_DIALYTIKA) == HAS_VOWEL_AND_ACCENT) { - nextState |= AFTER_VOWEL_WITH_ACCENT; + nextState |= hasPrecomposedAccent ? AFTER_VOWEL_WITH_PRECOMPOSED_ACCENT + : AFTER_VOWEL_WITH_COMBINING_ACCENT; } // Map according to Greek rules. UBool addTonos = false; @@ -1163,7 +1168,7 @@ int32_t toUpper(uint32_t options, !isFollowedByCasedLetter(src, nextIndex, srcLength)) { // Keep disjunctive "or" with (only) a tonos. // We use the same "word boundary" conditions as for the Final_Sigma test. - if (i == nextIndex) { + if (hasPrecomposedAccent) { upper = 0x389; // Preserve the precomposed form. } else { addTonos = true; @@ -1852,7 +1857,7 @@ u_strCaseCompare(const char16_t *s1, int32_t length1, uint32_t options, UErrorCode *pErrorCode) { /* argument checking */ - if(pErrorCode==0 || U_FAILURE(*pErrorCode)) { + if (pErrorCode == nullptr || U_FAILURE(*pErrorCode)) { return 0; } if(s1==nullptr || length1<-1 || s2==nullptr || length2<-1) { diff --git a/contrib/libs/icu/common/ustrenum.cpp b/contrib/libs/icu/common/ustrenum.cpp index a60b2208f6..f4fc5906ed 100644 --- a/contrib/libs/icu/common/ustrenum.cpp +++ b/contrib/libs/icu/common/ustrenum.cpp @@ -168,8 +168,8 @@ const char *UStringEnumeration::next(int32_t *resultLength, UErrorCode &status) const UnicodeString* UStringEnumeration::snext(UErrorCode& status) { int32_t length; const char16_t* str = uenum_unext(uenum, &length, &status); - if (str == 0 || U_FAILURE(status)) { - return 0; + if (str == nullptr || U_FAILURE(status)) { + return nullptr; } return &unistr.setTo(str, length); } @@ -360,7 +360,7 @@ U_CAPI UEnumeration* U_EXPORT2 uenum_openCharStringsEnumeration(const char* const strings[], int32_t count, UErrorCode* ec) { UCharStringEnumeration* result = nullptr; - if (U_SUCCESS(*ec) && count >= 0 && (count == 0 || strings != 0)) { + if (U_SUCCESS(*ec) && count >= 0 && (count == 0 || strings != nullptr)) { result = (UCharStringEnumeration*) uprv_malloc(sizeof(UCharStringEnumeration)); if (result == nullptr) { *ec = U_MEMORY_ALLOCATION_ERROR; @@ -379,7 +379,7 @@ U_CAPI UEnumeration* U_EXPORT2 uenum_openUCharStringsEnumeration(const char16_t* const strings[], int32_t count, UErrorCode* ec) { UCharStringEnumeration* result = nullptr; - if (U_SUCCESS(*ec) && count >= 0 && (count == 0 || strings != 0)) { + if (U_SUCCESS(*ec) && count >= 0 && (count == 0 || strings != nullptr)) { result = (UCharStringEnumeration*) uprv_malloc(sizeof(UCharStringEnumeration)); if (result == nullptr) { *ec = U_MEMORY_ALLOCATION_ERROR; diff --git a/contrib/libs/icu/common/util_props.cpp b/contrib/libs/icu/common/util_props.cpp index 5991769d06..366a555eee 100644 --- a/contrib/libs/icu/common/util_props.cpp +++ b/contrib/libs/icu/common/util_props.cpp @@ -198,12 +198,11 @@ int32_t ICU_Utility::parseNumber(const UnicodeString& text, if (d < 0) { break; } - n = radix*n + d; - // ASSUME that when a 32-bit integer overflows it becomes - // negative. E.g., 214748364 * 10 + 8 => negative value. - if (n < 0) { + int64_t update = radix*static_cast<int64_t>(n) + d; + if (update > INT32_MAX) { return -1; } + n = static_cast<int32_t>(update); ++p; } if (p == pos) { diff --git a/contrib/libs/icu/common/utrie2.cpp b/contrib/libs/icu/common/utrie2.cpp index 74f91bc813..2c3488a4cd 100644 --- a/contrib/libs/icu/common/utrie2.cpp +++ b/contrib/libs/icu/common/utrie2.cpp @@ -137,33 +137,33 @@ utrie2_openFromSerialized(UTrie2ValueBits valueBits, UTrie2 *trie; if(U_FAILURE(*pErrorCode)) { - return 0; + return nullptr; } if( length<=0 || (U_POINTER_MASK_LSB(data, 3)!=0) || valueBits<0 || UTRIE2_COUNT_VALUE_BITS<=valueBits ) { *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR; - return 0; + return nullptr; } /* enough data for a trie header? */ if(length<(int32_t)sizeof(UTrie2Header)) { *pErrorCode=U_INVALID_FORMAT_ERROR; - return 0; + return nullptr; } /* check the signature */ header=(const UTrie2Header *)data; if(header->signature!=UTRIE2_SIG) { *pErrorCode=U_INVALID_FORMAT_ERROR; - return 0; + return nullptr; } /* get the options */ if(valueBits!=(UTrie2ValueBits)(header->options&UTRIE2_OPTIONS_VALUE_BITS_MASK)) { *pErrorCode=U_INVALID_FORMAT_ERROR; - return 0; + return nullptr; } /* get the length values and offsets */ @@ -188,14 +188,14 @@ utrie2_openFromSerialized(UTrie2ValueBits valueBits, } if(length<actualLength) { *pErrorCode=U_INVALID_FORMAT_ERROR; /* not enough bytes */ - return 0; + return nullptr; } /* allocate the trie */ trie=(UTrie2 *)uprv_malloc(sizeof(UTrie2)); if(trie==nullptr) { *pErrorCode=U_MEMORY_ALLOCATION_ERROR; - return 0; + return nullptr; } uprv_memcpy(trie, &tempTrie, sizeof(tempTrie)); trie->memory=(uint32_t *)data; @@ -226,7 +226,7 @@ utrie2_openFromSerialized(UTrie2ValueBits valueBits, break; default: *pErrorCode=U_INVALID_FORMAT_ERROR; - return 0; + return nullptr; } if(pActualLength!=nullptr) { @@ -247,12 +247,12 @@ utrie2_openDummy(UTrie2ValueBits valueBits, int32_t dataMove; /* >0 if the data is moved to the end of the index array */ if(U_FAILURE(*pErrorCode)) { - return 0; + return nullptr; } if(valueBits<0 || UTRIE2_COUNT_VALUE_BITS<=valueBits) { *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR; - return 0; + return nullptr; } /* calculate the total length of the dummy trie data */ @@ -269,14 +269,14 @@ utrie2_openDummy(UTrie2ValueBits valueBits, trie=(UTrie2 *)uprv_malloc(sizeof(UTrie2)); if(trie==nullptr) { *pErrorCode=U_MEMORY_ALLOCATION_ERROR; - return 0; + return nullptr; } uprv_memset(trie, 0, sizeof(UTrie2)); trie->memory=uprv_malloc(length); if(trie->memory==nullptr) { uprv_free(trie); *pErrorCode=U_MEMORY_ALLOCATION_ERROR; - return 0; + return nullptr; } trie->length=length; trie->isMemoryOwned=true; @@ -364,7 +364,7 @@ utrie2_openDummy(UTrie2ValueBits valueBits, break; default: *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR; - return 0; + return nullptr; } return trie; diff --git a/contrib/libs/icu/common/utrie2_builder.cpp b/contrib/libs/icu/common/utrie2_builder.cpp index 1254e8cba6..02a62e3fd4 100644 --- a/contrib/libs/icu/common/utrie2_builder.cpp +++ b/contrib/libs/icu/common/utrie2_builder.cpp @@ -131,7 +131,7 @@ utrie2_open(uint32_t initialValue, uint32_t errorValue, UErrorCode *pErrorCode) uprv_free(newTrie); uprv_free(data); *pErrorCode=U_MEMORY_ALLOCATION_ERROR; - return 0; + return nullptr; } uprv_memset(trie, 0, sizeof(UTrie2)); @@ -880,8 +880,6 @@ utrie2_setRange32(UTrie2 *trie, fillBlock(newTrie->data+block, 0, rest, value, newTrie->initialValue, overwrite); } - - return; } /* compaction --------------------------------------------------------------- */ diff --git a/contrib/libs/icu/common/uts46.cpp b/contrib/libs/icu/common/uts46.cpp index fce2af4130..f0e1372422 100644 --- a/contrib/libs/icu/common/uts46.cpp +++ b/contrib/libs/icu/common/uts46.cpp @@ -18,16 +18,17 @@ #if !UCONFIG_NO_IDNA +#include "unicode/bytestream.h" #include "unicode/idna.h" #include "unicode/normalizer2.h" #include "unicode/uscript.h" #include "unicode/ustring.h" #include "unicode/utf16.h" +#include "bytesinkutil.h" #include "cmemory.h" #include "cstring.h" #include "punycode.h" #include "ubidi_props.h" -#include "ustr_imp.h" // Note about tests for UIDNA_ERROR_DOMAIN_NAME_TOO_LONG: // @@ -669,14 +670,6 @@ UTS46::mapDevChars(UnicodeString &dest, int32_t labelStart, int32_t mappingStart return length; } -// Some non-ASCII characters are equivalent to sequences with -// non-LDH ASCII characters. To find them: -// grep disallowed_STD3_valid IdnaMappingTable.txt (or uts46.txt) -static inline UBool -isNonASCIIDisallowedSTD3Valid(UChar32 c) { - return c==0x2260 || c==0x226E || c==0x226F; -} - // Replace the label in dest with the label string, if the label was modified. // If &label==&dest then the label was modified in-place and labelLength // is the new label length, different from label.length(). @@ -820,10 +813,7 @@ UTS46::processLabel(UnicodeString &dest, } } else { oredChars|=c; - if(disallowNonLDHDot && isNonASCIIDisallowedSTD3Valid(c)) { - info.labelErrors|=UIDNA_ERROR_DISALLOWED; - *s=0xfffd; - } else if(c==0xfffd) { + if(c==0xfffd) { info.labelErrors|=UIDNA_ERROR_DISALLOWED; } } @@ -1436,11 +1426,14 @@ uidna_labelToASCII_UTF8(const UIDNA *idna, return 0; } StringPiece src(label, length<0 ? static_cast<int32_t>(uprv_strlen(label)) : length); - CheckedArrayByteSink sink(dest, capacity); - IDNAInfo info; - reinterpret_cast<const IDNA *>(idna)->labelToASCII_UTF8(src, sink, info, *pErrorCode); - idnaInfoToStruct(info, pInfo); - return u_terminateChars(dest, capacity, sink.NumberOfBytesAppended(), pErrorCode); + return ByteSinkUtil::viaByteSinkToTerminatedChars( + dest, capacity, + [&](ByteSink& sink, UErrorCode& status) { + IDNAInfo info; + reinterpret_cast<const IDNA *>(idna)->labelToASCII_UTF8(src, sink, info, status); + idnaInfoToStruct(info, pInfo); + }, + *pErrorCode); } U_CAPI int32_t U_EXPORT2 @@ -1452,11 +1445,14 @@ uidna_labelToUnicodeUTF8(const UIDNA *idna, return 0; } StringPiece src(label, length<0 ? static_cast<int32_t>(uprv_strlen(label)) : length); - CheckedArrayByteSink sink(dest, capacity); - IDNAInfo info; - reinterpret_cast<const IDNA *>(idna)->labelToUnicodeUTF8(src, sink, info, *pErrorCode); - idnaInfoToStruct(info, pInfo); - return u_terminateChars(dest, capacity, sink.NumberOfBytesAppended(), pErrorCode); + return ByteSinkUtil::viaByteSinkToTerminatedChars( + dest, capacity, + [&](ByteSink& sink, UErrorCode& status) { + IDNAInfo info; + reinterpret_cast<const IDNA *>(idna)->labelToUnicodeUTF8(src, sink, info, status); + idnaInfoToStruct(info, pInfo); + }, + *pErrorCode); } U_CAPI int32_t U_EXPORT2 @@ -1468,11 +1464,14 @@ uidna_nameToASCII_UTF8(const UIDNA *idna, return 0; } StringPiece src(name, length<0 ? static_cast<int32_t>(uprv_strlen(name)) : length); - CheckedArrayByteSink sink(dest, capacity); - IDNAInfo info; - reinterpret_cast<const IDNA *>(idna)->nameToASCII_UTF8(src, sink, info, *pErrorCode); - idnaInfoToStruct(info, pInfo); - return u_terminateChars(dest, capacity, sink.NumberOfBytesAppended(), pErrorCode); + return ByteSinkUtil::viaByteSinkToTerminatedChars( + dest, capacity, + [&](ByteSink& sink, UErrorCode& status) { + IDNAInfo info; + reinterpret_cast<const IDNA *>(idna)->nameToASCII_UTF8(src, sink, info, status); + idnaInfoToStruct(info, pInfo); + }, + *pErrorCode); } U_CAPI int32_t U_EXPORT2 @@ -1484,11 +1483,14 @@ uidna_nameToUnicodeUTF8(const UIDNA *idna, return 0; } StringPiece src(name, length<0 ? static_cast<int32_t>(uprv_strlen(name)) : length); - CheckedArrayByteSink sink(dest, capacity); - IDNAInfo info; - reinterpret_cast<const IDNA *>(idna)->nameToUnicodeUTF8(src, sink, info, *pErrorCode); - idnaInfoToStruct(info, pInfo); - return u_terminateChars(dest, capacity, sink.NumberOfBytesAppended(), pErrorCode); + return ByteSinkUtil::viaByteSinkToTerminatedChars( + dest, capacity, + [&](ByteSink& sink, UErrorCode& status) { + IDNAInfo info; + reinterpret_cast<const IDNA *>(idna)->nameToUnicodeUTF8(src, sink, info, status); + idnaInfoToStruct(info, pInfo); + }, + *pErrorCode); } #endif // UCONFIG_NO_IDNA diff --git a/contrib/libs/icu/common/utypes.cpp b/contrib/libs/icu/common/utypes.cpp index 63e05b1249..715994d67f 100644 --- a/contrib/libs/icu/common/utypes.cpp +++ b/contrib/libs/icu/common/utypes.cpp @@ -129,6 +129,19 @@ _uFmtErrorName[U_FMT_PARSE_ERROR_LIMIT - U_FMT_PARSE_ERROR_START] = { "U_FORMAT_INEXACT_ERROR", "U_NUMBER_ARG_OUTOFBOUNDS_ERROR", "U_NUMBER_SKELETON_SYNTAX_ERROR", + "U_MF_UNRESOLVED_VARIABLE_ERROR", + "U_MF_SYNTAX_ERROR", + "U_MF_UNKNOWN_FUNCTION_ERROR", + "U_MF_VARIANT_KEY_MISMATCH_ERROR", + "U_MF_FORMATTING_ERROR", + "U_MF_NONEXHAUSTIVE_PATTERN_ERROR", + "U_MF_DUPLICATE_OPTION_NAME_ERROR", + "U_MF_SELECTOR_ERROR", + "U_MF_MISSING_SELECTOR_ANNOTATION_ERROR", + "U_MF_DUPLICATE_DECLARATION_ERROR", + "U_MF_OPERAND_MISMATCH_ERROR", + "U_MF_UNSUPPORTED_STATEMENT_ERROR", + "U_MF_UNSUPPORTED_EXPRESSION_ERROR" }; static const char * const diff --git a/contrib/libs/icu/common/uvector.cpp b/contrib/libs/icu/common/uvector.cpp index f93d73a3c6..85c322cea7 100644 --- a/contrib/libs/icu/common/uvector.cpp +++ b/contrib/libs/icu/common/uvector.cpp @@ -183,7 +183,7 @@ void UVector::insertElementAt(int32_t elem, int32_t index, UErrorCode &status) { } void* UVector::elementAt(int32_t index) const { - return (0 <= index && index < count) ? elements[index].pointer : 0; + return (0 <= index && index < count) ? elements[index].pointer : nullptr; } int32_t UVector::elementAti(int32_t index) const { diff --git a/contrib/libs/icu/common/uvectr32.cpp b/contrib/libs/icu/common/uvectr32.cpp index fb554729fe..a2dc1bdbc9 100644 --- a/contrib/libs/icu/common/uvectr32.cpp +++ b/contrib/libs/icu/common/uvectr32.cpp @@ -39,7 +39,7 @@ UVector32::UVector32(int32_t initialCapacity, UErrorCode &status) : count(0), capacity(0), maxCapacity(0), - elements(0) + elements(nullptr) { _init(initialCapacity, status); } @@ -58,7 +58,7 @@ void UVector32::_init(int32_t initialCapacity, UErrorCode &status) { initialCapacity = uprv_min(DEFAULT_CAPACITY, maxCapacity); } elements = (int32_t *)uprv_malloc(sizeof(int32_t)*initialCapacity); - if (elements == 0) { + if (elements == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; } else { capacity = initialCapacity; @@ -67,7 +67,7 @@ void UVector32::_init(int32_t initialCapacity, UErrorCode &status) { UVector32::~UVector32() { uprv_free(elements); - elements = 0; + elements = nullptr; } /** diff --git a/contrib/libs/icu/common/uvectr64.cpp b/contrib/libs/icu/common/uvectr64.cpp index 05559dd833..58b0b1f8b8 100644 --- a/contrib/libs/icu/common/uvectr64.cpp +++ b/contrib/libs/icu/common/uvectr64.cpp @@ -36,7 +36,7 @@ UVector64::UVector64(int32_t initialCapacity, UErrorCode &status) : count(0), capacity(0), maxCapacity(0), - elements(0) + elements(nullptr) { _init(initialCapacity, status); } @@ -55,7 +55,7 @@ void UVector64::_init(int32_t initialCapacity, UErrorCode &status) { initialCapacity = uprv_min(DEFAULT_CAPACITY, maxCapacity); } elements = (int64_t *)uprv_malloc(sizeof(int64_t)*initialCapacity); - if (elements == 0) { + if (elements == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; } else { capacity = initialCapacity; @@ -64,7 +64,7 @@ void UVector64::_init(int32_t initialCapacity, UErrorCode &status) { UVector64::~UVector64() { uprv_free(elements); - elements = 0; + elements = nullptr; } /** diff --git a/contrib/libs/icu/i18n/astro.cpp b/contrib/libs/icu/i18n/astro.cpp index 575efeb175..f91f6fe089 100644 --- a/contrib/libs/icu/i18n/astro.cpp +++ b/contrib/libs/icu/i18n/astro.cpp @@ -242,7 +242,7 @@ inline static double normPI(double angle) { * @deprecated ICU 2.4. This class may be removed or modified. */ CalendarAstronomer::CalendarAstronomer(): - fTime(Calendar::getNow()), fLongitude(0.0), fLatitude(0.0), fGmtOffset(0.0), moonPosition(0,0), moonPositionSet(false) { + fTime(Calendar::getNow()), moonPosition(0,0), moonPositionSet(false) { clearCache(); } @@ -252,30 +252,7 @@ CalendarAstronomer::CalendarAstronomer(): * @internal * @deprecated ICU 2.4. This class may be removed or modified. */ -CalendarAstronomer::CalendarAstronomer(UDate d): fTime(d), fLongitude(0.0), fLatitude(0.0), fGmtOffset(0.0), moonPosition(0,0), moonPositionSet(false) { - clearCache(); -} - -/** - * Construct a new <code>CalendarAstronomer</code> object with the given - * latitude and longitude. The object's time is set to the current - * date and time. - * <p> - * @param longitude The desired longitude, in <em>degrees</em> east of - * the Greenwich meridian. - * - * @param latitude The desired latitude, in <em>degrees</em>. Positive - * values signify North, negative South. - * - * @see java.util.Date#getTime() - * @internal - * @deprecated ICU 2.4. This class may be removed or modified. - */ -CalendarAstronomer::CalendarAstronomer(double longitude, double latitude) : - fTime(Calendar::getNow()), moonPosition(0,0), moonPositionSet(false) { - fLongitude = normPI(longitude * (double)DEG_RAD); - fLatitude = normPI(latitude * (double)DEG_RAD); - fGmtOffset = (double)(fLongitude * 24. * (double)HOUR_MS / (double)CalendarAstronomer_PI2); +CalendarAstronomer::CalendarAstronomer(UDate d): fTime(d), moonPosition(0,0), moonPositionSet(false) { clearCache(); } @@ -301,32 +278,10 @@ CalendarAstronomer::~CalendarAstronomer() */ void CalendarAstronomer::setTime(UDate aTime) { fTime = aTime; - U_DEBUG_ASTRO_MSG(("setTime(%.1lf, %sL)\n", aTime, debug_astro_date(aTime+fGmtOffset))); clearCache(); } /** - * Set the current date and time of this <code>CalendarAstronomer</code> object. All - * astronomical calculations are performed based on this time setting. - * - * @param jdn the desired time, expressed as a "julian day number", - * which is the number of elapsed days since - * 1/1/4713 BC (Julian), 12:00 GMT. Note that julian day - * numbers start at <em>noon</em>. To get the jdn for - * the corresponding midnight, subtract 0.5. - * - * @see #getJulianDay - * @see #JULIAN_EPOCH_MS - * @internal - * @deprecated ICU 2.4. This class may be removed or modified. - */ -void CalendarAstronomer::setJulianDay(double jdn) { - fTime = (double)(jdn * DAY_MS) + JULIAN_EPOCH_MS; - clearCache(); - julianDay = jdn; -} - -/** * Get the current time of this <code>CalendarAstronomer</code> object, * represented as the number of milliseconds since * 1/1/1970 AD 0:00 GMT (Gregorian). @@ -357,80 +312,6 @@ double CalendarAstronomer::getJulianDay() { return julianDay; } -/** - * Return this object's time expressed in julian centuries: - * the number of centuries after 1/1/1900 AD, 12:00 GMT - * - * @see #getJulianDay - * @internal - * @deprecated ICU 2.4. This class may be removed or modified. - */ -double CalendarAstronomer::getJulianCentury() { - if (isINVALID(julianCentury)) { - julianCentury = (getJulianDay() - 2415020.0) / 36525.0; - } - return julianCentury; -} - -/** - * Returns the current Greenwich sidereal time, measured in hours - * @internal - * @deprecated ICU 2.4. This class may be removed or modified. - */ -double CalendarAstronomer::getGreenwichSidereal() { - if (isINVALID(siderealTime)) { - // See page 86 of "Practical Astronomy with your Calculator", - // by Peter Duffet-Smith, for details on the algorithm. - - double UT = normalize(fTime/(double)HOUR_MS, 24.); - - siderealTime = normalize(getSiderealOffset() + UT*1.002737909, 24.); - } - return siderealTime; -} - -double CalendarAstronomer::getSiderealOffset() { - if (isINVALID(siderealT0)) { - double JD = uprv_floor(getJulianDay() - 0.5) + 0.5; - double S = JD - 2451545.0; - double T = S / 36525.0; - siderealT0 = normalize(6.697374558 + 2400.051336*T + 0.000025862*T*T, 24); - } - return siderealT0; -} - -/** - * Returns the current local sidereal time, measured in hours - * @internal - * @deprecated ICU 2.4. This class may be removed or modified. - */ -double CalendarAstronomer::getLocalSidereal() { - return normalize(getGreenwichSidereal() + (fGmtOffset/(double)HOUR_MS), 24.); -} - -/** - * Converts local sidereal time to Universal Time. - * - * @param lst The Local Sidereal Time, in hours since sidereal midnight - * on this object's current date. - * - * @return The corresponding Universal Time, in milliseconds since - * 1 Jan 1970, GMT. - */ -double CalendarAstronomer::lstToUT(double lst) { - // Convert to local mean time - double lt = normalize((lst - getSiderealOffset()) * 0.9972695663, 24); - - // Then find local midnight on this day - double base = (DAY_MS * ClockMath::floorDivide(fTime + fGmtOffset,(double)DAY_MS)) - fGmtOffset; - - //out(" lt =" + lt + " hours"); - //out(" base=" + new Date(base)); - - return base + (long)(lt * HOUR_MS); -} - - //------------------------------------------------------------------------- // Coordinate transformations, all based on the current time of this object //------------------------------------------------------------------------- @@ -438,19 +319,6 @@ double CalendarAstronomer::lstToUT(double lst) { /** * Convert from ecliptic to equatorial coordinates. * - * @param ecliptic A point in the sky in ecliptic coordinates. - * @return The corresponding point in equatorial coordinates. - * @internal - * @deprecated ICU 2.4. This class may be removed or modified. - */ -CalendarAstronomer::Equatorial& CalendarAstronomer::eclipticToEquatorial(CalendarAstronomer::Equatorial& result, const CalendarAstronomer::Ecliptic& ecliptic) -{ - return eclipticToEquatorial(result, ecliptic.longitude, ecliptic.latitude); -} - -/** - * Convert from ecliptic to equatorial coordinates. - * * @param eclipLong The ecliptic longitude * @param eclipLat The ecliptic latitude * @@ -479,46 +347,6 @@ CalendarAstronomer::Equatorial& CalendarAstronomer::eclipticToEquatorial(Calenda return result; } -/** - * Convert from ecliptic longitude to equatorial coordinates. - * - * @param eclipLong The ecliptic longitude - * - * @return The corresponding point in equatorial coordinates. - * @internal - * @deprecated ICU 2.4. This class may be removed or modified. - */ -CalendarAstronomer::Equatorial& CalendarAstronomer::eclipticToEquatorial(CalendarAstronomer::Equatorial& result, double eclipLong) -{ - return eclipticToEquatorial(result, eclipLong, 0); // TODO: optimize -} - -/** - * @internal - * @deprecated ICU 2.4. This class may be removed or modified. - */ -CalendarAstronomer::Horizon& CalendarAstronomer::eclipticToHorizon(CalendarAstronomer::Horizon& result, double eclipLong) -{ - Equatorial equatorial; - eclipticToEquatorial(equatorial, eclipLong); - - double H = getLocalSidereal()*CalendarAstronomer::PI/12 - equatorial.ascension; // Hour-angle - - double sinH = ::sin(H); - double cosH = cos(H); - double sinD = ::sin(equatorial.declination); - double cosD = cos(equatorial.declination); - double sinL = ::sin(fLatitude); - double cosL = cos(fLatitude); - - double altitude = asin(sinD*sinL + cosD*cosL*cosH); - double azimuth = atan2(-cosD*cosL*sinH, sinD - sinL * ::sin(altitude)); - - result.set(azimuth, altitude); - return result; -} - - //------------------------------------------------------------------------- // The Sun //------------------------------------------------------------------------- @@ -658,50 +486,6 @@ double CalendarAstronomer::getSunLongitude() } /** - * The position of the sun at this object's current date and time, - * in equatorial coordinates. - * @internal - * @deprecated ICU 2.4. This class may be removed or modified. - */ -CalendarAstronomer::Equatorial& CalendarAstronomer::getSunPosition(CalendarAstronomer::Equatorial& result) { - return eclipticToEquatorial(result, getSunLongitude(), 0); -} - - -/** - * Constant representing the vernal equinox. - * For use with {@link #getSunTime getSunTime}. - * Note: In this case, "vernal" refers to the northern hemisphere's seasons. - * @internal - * @deprecated ICU 2.4. This class may be removed or modified. - */ -/*double CalendarAstronomer::VERNAL_EQUINOX() { - return 0; -}*/ - -/** - * Constant representing the summer solstice. - * For use with {@link #getSunTime getSunTime}. - * Note: In this case, "summer" refers to the northern hemisphere's seasons. - * @internal - * @deprecated ICU 2.4. This class may be removed or modified. - */ -double CalendarAstronomer::SUMMER_SOLSTICE() { - return (CalendarAstronomer::PI/2); -} - -/** - * Constant representing the autumnal equinox. - * For use with {@link #getSunTime getSunTime}. - * Note: In this case, "autumn" refers to the northern hemisphere's seasons. - * @internal - * @deprecated ICU 2.4. This class may be removed or modified. - */ -/*double CalendarAstronomer::AUTUMN_EQUINOX() { - return (CalendarAstronomer::PI); -}*/ - -/** * Constant representing the winter solstice. * For use with {@link #getSunTime getSunTime}. * Note: In this case, "winter" refers to the northern hemisphere's seasons. @@ -738,310 +522,6 @@ UDate CalendarAstronomer::getSunTime(double desired, UBool next) next); } -CalendarAstronomer::CoordFunc::~CoordFunc() {} - -class RiseSetCoordFunc : public CalendarAstronomer::CoordFunc { -public: - virtual ~RiseSetCoordFunc(); - virtual void eval(CalendarAstronomer::Equatorial& result, CalendarAstronomer& a) override { a.getSunPosition(result); } -}; - -RiseSetCoordFunc::~RiseSetCoordFunc() {} - -UDate CalendarAstronomer::getSunRiseSet(UBool rise) -{ - UDate t0 = fTime; - - // Make a rough guess: 6am or 6pm local time on the current day - double noon = ClockMath::floorDivide(fTime + fGmtOffset, (double)DAY_MS)*DAY_MS - fGmtOffset + (12*HOUR_MS); - - U_DEBUG_ASTRO_MSG(("Noon=%.2lf, %sL, gmtoff %.2lf\n", noon, debug_astro_date(noon+fGmtOffset), fGmtOffset)); - setTime(noon + ((rise ? -6 : 6) * HOUR_MS)); - U_DEBUG_ASTRO_MSG(("added %.2lf ms as a guess,\n", ((rise ? -6. : 6.) * HOUR_MS))); - - RiseSetCoordFunc func; - double t = riseOrSet(func, - rise, - .533 * DEG_RAD, // Angular Diameter - 34. /60.0 * DEG_RAD, // Refraction correction - MINUTE_MS / 12.); // Desired accuracy - - setTime(t0); - return t; -} - -// Commented out - currently unused. ICU 2.6, Alan -// //------------------------------------------------------------------------- -// // Alternate Sun Rise/Set -// // See Duffett-Smith p.93 -// //------------------------------------------------------------------------- -// -// // This yields worse results (as compared to USNO data) than getSunRiseSet(). -// /** -// * TODO Make this when the entire class is package-private. -// */ -// /*public*/ long getSunRiseSet2(boolean rise) { -// // 1. Calculate coordinates of the sun's center for midnight -// double jd = uprv_floor(getJulianDay() - 0.5) + 0.5; -// double[] sl = getSunLongitude(jd);// double lambda1 = sl[0]; -// Equatorial pos1 = eclipticToEquatorial(lambda1, 0); -// -// // 2. Add ... to lambda to get position 24 hours later -// double lambda2 = lambda1 + 0.985647*DEG_RAD; -// Equatorial pos2 = eclipticToEquatorial(lambda2, 0); -// -// // 3. Calculate LSTs of rising and setting for these two positions -// double tanL = ::tan(fLatitude); -// double H = ::acos(-tanL * ::tan(pos1.declination)); -// double lst1r = (CalendarAstronomer_PI2 + pos1.ascension - H) * 24 / CalendarAstronomer_PI2; -// double lst1s = (pos1.ascension + H) * 24 / CalendarAstronomer_PI2; -// H = ::acos(-tanL * ::tan(pos2.declination)); -// double lst2r = (CalendarAstronomer_PI2-H + pos2.ascension ) * 24 / CalendarAstronomer_PI2; -// double lst2s = (H + pos2.ascension ) * 24 / CalendarAstronomer_PI2; -// if (lst1r > 24) lst1r -= 24; -// if (lst1s > 24) lst1s -= 24; -// if (lst2r > 24) lst2r -= 24; -// if (lst2s > 24) lst2s -= 24; -// -// // 4. Convert LSTs to GSTs. If GST1 > GST2, add 24 to GST2. -// double gst1r = lstToGst(lst1r); -// double gst1s = lstToGst(lst1s); -// double gst2r = lstToGst(lst2r); -// double gst2s = lstToGst(lst2s); -// if (gst1r > gst2r) gst2r += 24; -// if (gst1s > gst2s) gst2s += 24; -// -// // 5. Calculate GST at 0h UT of this date -// double t00 = utToGst(0); -// -// // 6. Calculate GST at 0h on the observer's longitude -// double offset = ::round(fLongitude*12/PI); // p.95 step 6; he _rounds_ to nearest 15 deg. -// double t00p = t00 - offset*1.002737909; -// if (t00p < 0) t00p += 24; // do NOT normalize -// -// // 7. Adjust -// if (gst1r < t00p) { -// gst1r += 24; -// gst2r += 24; -// } -// if (gst1s < t00p) { -// gst1s += 24; -// gst2s += 24; -// } -// -// // 8. -// double gstr = (24.07*gst1r-t00*(gst2r-gst1r))/(24.07+gst1r-gst2r); -// double gsts = (24.07*gst1s-t00*(gst2s-gst1s))/(24.07+gst1s-gst2s); -// -// // 9. Correct for parallax, refraction, and sun's diameter -// double dec = (pos1.declination + pos2.declination) / 2; -// double psi = ::acos(sin(fLatitude) / cos(dec)); -// double x = 0.830725 * DEG_RAD; // parallax+refraction+diameter -// double y = ::asin(sin(x) / ::sin(psi)) * RAD_DEG; -// double delta_t = 240 * y / cos(dec) / 3600; // hours -// -// // 10. Add correction to GSTs, subtract from GSTr -// gstr -= delta_t; -// gsts += delta_t; -// -// // 11. Convert GST to UT and then to local civil time -// double ut = gstToUt(rise ? gstr : gsts); -// //System.out.println((rise?"rise=":"set=") + ut + ", delta_t=" + delta_t); -// long midnight = DAY_MS * (time / DAY_MS); // Find UT midnight on this day -// return midnight + (long) (ut * 3600000); -// } - -// Commented out - currently unused. ICU 2.6, Alan -// /** -// * Convert local sidereal time to Greenwich sidereal time. -// * Section 15. Duffett-Smith p.21 -// * @param lst in hours (0..24) -// * @return GST in hours (0..24) -// */ -// double lstToGst(double lst) { -// double delta = fLongitude * 24 / CalendarAstronomer_PI2; -// return normalize(lst - delta, 24); -// } - -// Commented out - currently unused. ICU 2.6, Alan -// /** -// * Convert UT to GST on this date. -// * Section 12. Duffett-Smith p.17 -// * @param ut in hours -// * @return GST in hours -// */ -// double utToGst(double ut) { -// return normalize(getT0() + ut*1.002737909, 24); -// } - -// Commented out - currently unused. ICU 2.6, Alan -// /** -// * Convert GST to UT on this date. -// * Section 13. Duffett-Smith p.18 -// * @param gst in hours -// * @return UT in hours -// */ -// double gstToUt(double gst) { -// return normalize(gst - getT0(), 24) * 0.9972695663; -// } - -// Commented out - currently unused. ICU 2.6, Alan -// double getT0() { -// // Common computation for UT <=> GST -// -// // Find JD for 0h UT -// double jd = uprv_floor(getJulianDay() - 0.5) + 0.5; -// -// double s = jd - 2451545.0; -// double t = s / 36525.0; -// double t0 = 6.697374558 + (2400.051336 + 0.000025862*t)*t; -// return t0; -// } - -// Commented out - currently unused. ICU 2.6, Alan -// //------------------------------------------------------------------------- -// // Alternate Sun Rise/Set -// // See sci.astro FAQ -// // http://www.faqs.org/faqs/astronomy/faq/part3/section-5.html -// //------------------------------------------------------------------------- -// -// // Note: This method appears to produce inferior accuracy as -// // compared to getSunRiseSet(). -// -// /** -// * TODO Make this when the entire class is package-private. -// */ -// /*public*/ long getSunRiseSet3(boolean rise) { -// -// // Compute day number for 0.0 Jan 2000 epoch -// double d = (double)(time - EPOCH_2000_MS) / DAY_MS; -// -// // Now compute the Local Sidereal Time, LST: -// // -// double LST = 98.9818 + 0.985647352 * d + /*UT*15 + long*/ -// fLongitude*RAD_DEG; -// // -// // (east long. positive). Note that LST is here expressed in degrees, -// // where 15 degrees corresponds to one hour. Since LST really is an angle, -// // it's convenient to use one unit---degrees---throughout. -// -// // COMPUTING THE SUN'S POSITION -// // ---------------------------- -// // -// // To be able to compute the Sun's rise/set times, you need to be able to -// // compute the Sun's position at any time. First compute the "day -// // number" d as outlined above, for the desired moment. Next compute: -// // -// double oblecl = 23.4393 - 3.563E-7 * d; -// // -// double w = 282.9404 + 4.70935E-5 * d; -// double M = 356.0470 + 0.9856002585 * d; -// double e = 0.016709 - 1.151E-9 * d; -// // -// // This is the obliquity of the ecliptic, plus some of the elements of -// // the Sun's apparent orbit (i.e., really the Earth's orbit): w = -// // argument of perihelion, M = mean anomaly, e = eccentricity. -// // Semi-major axis is here assumed to be exactly 1.0 (while not strictly -// // true, this is still an accurate approximation). Next compute E, the -// // eccentric anomaly: -// // -// double E = M + e*(180/PI) * ::sin(M*DEG_RAD) * ( 1.0 + e*cos(M*DEG_RAD) ); -// // -// // where E and M are in degrees. This is it---no further iterations are -// // needed because we know e has a sufficiently small value. Next compute -// // the true anomaly, v, and the distance, r: -// // -// /* r * cos(v) = */ double A = cos(E*DEG_RAD) - e; -// /* r * ::sin(v) = */ double B = ::sqrt(1 - e*e) * ::sin(E*DEG_RAD); -// // -// // and -// // -// // r = sqrt( A*A + B*B ) -// double v = ::atan2( B, A )*RAD_DEG; -// // -// // The Sun's true longitude, slon, can now be computed: -// // -// double slon = v + w; -// // -// // Since the Sun is always at the ecliptic (or at least very very close to -// // it), we can use simplified formulae to convert slon (the Sun's ecliptic -// // longitude) to sRA and sDec (the Sun's RA and Dec): -// // -// // ::sin(slon) * cos(oblecl) -// // tan(sRA) = ------------------------- -// // cos(slon) -// // -// // ::sin(sDec) = ::sin(oblecl) * ::sin(slon) -// // -// // As was the case when computing az, the Azimuth, if possible use an -// // atan2() function to compute sRA. -// -// double sRA = ::atan2(sin(slon*DEG_RAD) * cos(oblecl*DEG_RAD), cos(slon*DEG_RAD))*RAD_DEG; -// -// double sin_sDec = ::sin(oblecl*DEG_RAD) * ::sin(slon*DEG_RAD); -// double sDec = ::asin(sin_sDec)*RAD_DEG; -// -// // COMPUTING RISE AND SET TIMES -// // ---------------------------- -// // -// // To compute when an object rises or sets, you must compute when it -// // passes the meridian and the HA of rise/set. Then the rise time is -// // the meridian time minus HA for rise/set, and the set time is the -// // meridian time plus the HA for rise/set. -// // -// // To find the meridian time, compute the Local Sidereal Time at 0h local -// // time (or 0h UT if you prefer to work in UT) as outlined above---name -// // that quantity LST0. The Meridian Time, MT, will now be: -// // -// // MT = RA - LST0 -// double MT = normalize(sRA - LST, 360); -// // -// // where "RA" is the object's Right Ascension (in degrees!). If negative, -// // add 360 deg to MT. If the object is the Sun, leave the time as it is, -// // but if it's stellar, multiply MT by 365.2422/366.2422, to convert from -// // sidereal to solar time. Now, compute HA for rise/set, name that -// // quantity HA0: -// // -// // ::sin(h0) - ::sin(lat) * ::sin(Dec) -// // cos(HA0) = --------------------------------- -// // cos(lat) * cos(Dec) -// // -// // where h0 is the altitude selected to represent rise/set. For a purely -// // mathematical horizon, set h0 = 0 and simplify to: -// // -// // cos(HA0) = - tan(lat) * tan(Dec) -// // -// // If you want to account for refraction on the atmosphere, set h0 = -35/60 -// // degrees (-35 arc minutes), and if you want to compute the rise/set times -// // for the Sun's upper limb, set h0 = -50/60 (-50 arc minutes). -// // -// double h0 = -50/60 * DEG_RAD; -// -// double HA0 = ::acos( -// (sin(h0) - ::sin(fLatitude) * sin_sDec) / -// (cos(fLatitude) * cos(sDec*DEG_RAD)))*RAD_DEG; -// -// // When HA0 has been computed, leave it as it is for the Sun but multiply -// // by 365.2422/366.2422 for stellar objects, to convert from sidereal to -// // solar time. Finally compute: -// // -// // Rise time = MT - HA0 -// // Set time = MT + HA0 -// // -// // convert the times from degrees to hours by dividing by 15. -// // -// // If you'd like to check that your calculations are accurate or just -// // need a quick result, check the USNO's Sun or Moon Rise/Set Table, -// // <URL:http://aa.usno.navy.mil/AA/data/docs/RS_OneYear.html>. -// -// double result = MT + (rise ? -HA0 : HA0); // in degrees -// -// // Find UT midnight on this day -// long midnight = DAY_MS * (time / DAY_MS); -// -// return midnight + (long) (result * 3600000 / 15); -// } - //------------------------------------------------------------------------- // The Moon //------------------------------------------------------------------------- @@ -1083,7 +563,7 @@ const CalendarAstronomer::Equatorial& CalendarAstronomer::getMoonPosition() // Calculate the mean longitude and anomaly of the moon, based on // a circular orbit. Similar to the corresponding solar calculation. double meanLongitude = norm2PI(13.1763966*PI/180*day + moonL0); - meanAnomalyMoon = norm2PI(meanLongitude - 0.1114041*PI/180 * day - moonP0); + double meanAnomalyMoon = norm2PI(meanLongitude - 0.1114041*PI/180 * day - moonP0); // // Calculate the following corrections: @@ -1109,7 +589,7 @@ const CalendarAstronomer::Equatorial& CalendarAstronomer::getMoonPosition() double a4 = 0.2140*PI/180 * ::sin(2 * meanAnomalyMoon); // Now find the moon's corrected longitude - moonLongitude = meanLongitude + evection + center - annual + a4; + double moonLongitude = meanLongitude + evection + center - annual + a4; // // And finally, find the variation, caused by the fact that the sun's @@ -1149,7 +629,6 @@ const CalendarAstronomer::Equatorial& CalendarAstronomer::getMoonPosition() * current ecliptic longitudes of the sun and the moon, * measured in radians. * - * @see #getMoonPhase * @internal * @deprecated ICU 2.4. This class may be removed or modified. */ @@ -1166,56 +645,16 @@ double CalendarAstronomer::getMoonAge() { } /** - * Calculate the phase of the moon at the time set in this object. - * The returned phase is a <code>double</code> in the range - * <code>0 <= phase < 1</code>, interpreted as follows: - * <ul> - * <li>0.00: New moon - * <li>0.25: First quarter - * <li>0.50: Full moon - * <li>0.75: Last quarter - * </ul> - * - * @see #getMoonAge - * @internal - * @deprecated ICU 2.4. This class may be removed or modified. - */ -double CalendarAstronomer::getMoonPhase() { - // See page 147 of "Practical Astronomy with your Calculator", - // by Peter Duffet-Smith, for details on the algorithm. - return 0.5 * (1 - cos(getMoonAge())); -} - -/** * Constant representing a new moon. * For use with {@link #getMoonTime getMoonTime} * @internal * @deprecated ICU 2.4. This class may be removed or modified. */ -const CalendarAstronomer::MoonAge CalendarAstronomer::NEW_MOON() { +CalendarAstronomer::MoonAge CalendarAstronomer::NEW_MOON() { return CalendarAstronomer::MoonAge(0); } /** - * Constant representing the moon's first quarter. - * For use with {@link #getMoonTime getMoonTime} - * @internal - * @deprecated ICU 2.4. This class may be removed or modified. - */ -/*const CalendarAstronomer::MoonAge CalendarAstronomer::FIRST_QUARTER() { - return CalendarAstronomer::MoonAge(CalendarAstronomer::PI/2); -}*/ - -/** - * Constant representing a full moon. - * For use with {@link #getMoonTime getMoonTime} - * @internal - * @deprecated ICU 2.4. This class may be removed or modified. - */ -const CalendarAstronomer::MoonAge CalendarAstronomer::FULL_MOON() { - return CalendarAstronomer::MoonAge(CalendarAstronomer::PI); -} -/** * Constant representing the moon's last quarter. * For use with {@link #getMoonTime getMoonTime} * @internal @@ -1235,63 +674,24 @@ MoonTimeAngleFunc::~MoonTimeAngleFunc() {} }*/ /** - * Find the next or previous time at which the Moon's ecliptic - * longitude will have the desired value. + * Find the next or previous time at which the moon will be in the + * desired phase. * <p> - * @param desired The desired longitude. + * @param desired The desired phase of the moon. * @param next <tt>true</tt> if the next occurrence of the phase * is desired, <tt>false</tt> for the previous occurrence. * @internal * @deprecated ICU 2.4. This class may be removed or modified. */ -UDate CalendarAstronomer::getMoonTime(double desired, UBool next) -{ +UDate CalendarAstronomer::getMoonTime(const CalendarAstronomer::MoonAge& desired, UBool next) { MoonTimeAngleFunc func; return timeOfAngle( func, - desired, + desired.value, SYNODIC_MONTH, MINUTE_MS, next); } -/** - * Find the next or previous time at which the moon will be in the - * desired phase. - * <p> - * @param desired The desired phase of the moon. - * @param next <tt>true</tt> if the next occurrence of the phase - * is desired, <tt>false</tt> for the previous occurrence. - * @internal - * @deprecated ICU 2.4. This class may be removed or modified. - */ -UDate CalendarAstronomer::getMoonTime(const CalendarAstronomer::MoonAge& desired, UBool next) { - return getMoonTime(desired.value, next); -} - -class MoonRiseSetCoordFunc : public CalendarAstronomer::CoordFunc { -public: - virtual ~MoonRiseSetCoordFunc(); - virtual void eval(CalendarAstronomer::Equatorial& result, CalendarAstronomer& a) override { result = a.getMoonPosition(); } -}; - -MoonRiseSetCoordFunc::~MoonRiseSetCoordFunc() {} - -/** - * Returns the time (GMT) of sunrise or sunset on the local date to which - * this calendar is currently set. - * @internal - * @deprecated ICU 2.4. This class may be removed or modified. - */ -UDate CalendarAstronomer::getMoonRiseSet(UBool rise) -{ - MoonRiseSetCoordFunc func; - return riseOrSet(func, - rise, - .533 * DEG_RAD, // Angular Diameter - 34 /60.0 * DEG_RAD, // Refraction correction - MINUTE_MS); // Desired accuracy -} - //------------------------------------------------------------------------- // Interpolation methods for finding the time at which a given event occurs //------------------------------------------------------------------------- @@ -1364,48 +764,7 @@ UDate CalendarAstronomer::timeOfAngle(AngleFunc& func, double desired, return fTime; } -UDate CalendarAstronomer::riseOrSet(CoordFunc& func, UBool rise, - double diameter, double refraction, - double epsilon) -{ - Equatorial pos; - double tanL = ::tan(fLatitude); - double deltaT = 0; - int32_t count = 0; - - // - // Calculate the object's position at the current time, then use that - // position to calculate the time of rising or setting. The position - // will be different at that time, so iterate until the error is allowable. - // - U_DEBUG_ASTRO_MSG(("setup rise=%s, dia=%.3lf, ref=%.3lf, eps=%.3lf\n", - rise?"T":"F", diameter, refraction, epsilon)); - do { - // See "Practical Astronomy With Your Calculator, section 33. - func.eval(pos, *this); - double angle = ::acos(-tanL * ::tan(pos.declination)); - double lst = ((rise ? CalendarAstronomer_PI2-angle : angle) + pos.ascension ) * 24 / CalendarAstronomer_PI2; - - // Convert from LST to Universal Time. - UDate newTime = lstToUT( lst ); - - deltaT = newTime - fTime; - setTime(newTime); - U_DEBUG_ASTRO_MSG(("%d] dT=%.3lf, angle=%.3lf, lst=%.3lf, A=%.3lf/D=%.3lf\n", - count, deltaT, angle, lst, pos.ascension, pos.declination)); - } - while (++ count < 5 && uprv_fabs(deltaT) > epsilon); - - // Calculate the correction due to refraction and the object's angular diameter - double cosD = ::cos(pos.declination); - double psi = ::acos(sin(fLatitude) / cosD); - double x = diameter / 2 + refraction; - double y = ::asin(sin(x) / ::sin(psi)); - long delta = (long)((240 * y * RAD_DEG / cosD)*SECOND_MS); - - return fTime + (rise ? -delta : delta); -} - /** +/** * Return the obliquity of the ecliptic (the angle between the ecliptic * and the earth's equator) at the current time. This varies due to * the precession of the earth's axis. @@ -1414,19 +773,16 @@ UDate CalendarAstronomer::riseOrSet(CoordFunc& func, UBool rise, * measured in radians. */ double CalendarAstronomer::eclipticObliquity() { - if (isINVALID(eclipObliquity)) { - const double epoch = 2451545.0; // 2000 AD, January 1.5 + const double epoch = 2451545.0; // 2000 AD, January 1.5 - double T = (getJulianDay() - epoch) / 36525; + double T = (getJulianDay() - epoch) / 36525; - eclipObliquity = 23.439292 - - 46.815/3600 * T - - 0.0006/3600 * T*T - + 0.00181/3600 * T*T*T; + double eclipObliquity = 23.439292 + - 46.815/3600 * T + - 0.0006/3600 * T*T + + 0.00181/3600 * T*T*T; - eclipObliquity *= DEG_RAD; - } - return eclipObliquity; + return eclipObliquity * DEG_RAD; } @@ -1437,45 +793,13 @@ void CalendarAstronomer::clearCache() { const double INVALID = uprv_getNaN(); julianDay = INVALID; - julianCentury = INVALID; sunLongitude = INVALID; meanAnomalySun = INVALID; - moonLongitude = INVALID; moonEclipLong = INVALID; - meanAnomalyMoon = INVALID; - eclipObliquity = INVALID; - siderealTime = INVALID; - siderealT0 = INVALID; + moonPositionSet = false; } -//private static void out(String s) { -// System.out.println(s); -//} - -//private static String deg(double rad) { -// return Double.toString(rad * RAD_DEG); -//} - -//private static String hours(long ms) { -// return Double.toString((double)ms / HOUR_MS) + " hours"; -//} - -/** - * @internal - * @deprecated ICU 2.4. This class may be removed or modified. - */ -/*UDate CalendarAstronomer::local(UDate localMillis) { - // TODO - srl ? - TimeZone *tz = TimeZone::createDefault(); - int32_t rawOffset; - int32_t dstOffset; - UErrorCode status = U_ZERO_ERROR; - tz->getOffset(localMillis, true, rawOffset, dstOffset, status); - delete tz; - return localMillis - rawOffset; -}*/ - // Debugging functions UnicodeString CalendarAstronomer::Ecliptic::toString() const { @@ -1484,7 +808,7 @@ UnicodeString CalendarAstronomer::Ecliptic::toString() const snprintf(tmp, sizeof(tmp), "[%.5f,%.5f]", longitude*RAD_DEG, latitude*RAD_DEG); return UnicodeString(tmp, ""); #else - return UnicodeString(); + return {}; #endif } @@ -1496,37 +820,10 @@ UnicodeString CalendarAstronomer::Equatorial::toString() const (ascension*RAD_DEG), (declination*RAD_DEG)); return UnicodeString(tmp, ""); #else - return UnicodeString(); + return {}; #endif } -UnicodeString CalendarAstronomer::Horizon::toString() const -{ -#ifdef U_DEBUG_ASTRO - char tmp[800]; - snprintf(tmp, sizeof(tmp), "[%.5f,%.5f]", altitude*RAD_DEG, azimuth*RAD_DEG); - return UnicodeString(tmp, ""); -#else - return UnicodeString(); -#endif -} - - -// static private String radToHms(double angle) { -// int hrs = (int) (angle*RAD_HOUR); -// int min = (int)((angle*RAD_HOUR - hrs) * 60); -// int sec = (int)((angle*RAD_HOUR - hrs - min/60.0) * 3600); - -// return Integer.toString(hrs) + "h" + min + "m" + sec + "s"; -// } - -// static private String radToDms(double angle) { -// int deg = (int) (angle*RAD_DEG); -// int min = (int)((angle*RAD_DEG - deg) * 60); -// int sec = (int)((angle*RAD_DEG - deg - min/60.0) * 3600); - -// return Integer.toString(deg) + "\u00b0" + min + "'" + sec + "\""; -// } // =============== Calendar Cache ================ diff --git a/contrib/libs/icu/i18n/astro.h b/contrib/libs/icu/i18n/astro.h index 372a79ac67..ef297c4b3c 100644 --- a/contrib/libs/icu/i18n/astro.h +++ b/contrib/libs/icu/i18n/astro.h @@ -31,7 +31,7 @@ U_NAMESPACE_BEGIN * at a given moment in time. Accordingly, each <code>CalendarAstronomer</code> * object has a <code>time</code> property that determines the date * and time for which its calculations are performed. You can set and - * retrieve this property with {@link #setDate setDate}, {@link #getDate getDate} + * retrieve this property with {@link #setTime setTime}, {@link #getTime getTime} * and related methods. * <p> * Almost all of the calculations performed by this class, or by any @@ -72,7 +72,6 @@ public: * value without worrying about whether other code will modify them. * * @see CalendarAstronomer.Equatorial - * @see CalendarAstronomer.Horizon * @internal */ class U_I18N_API Ecliptic : public UMemory { @@ -141,7 +140,6 @@ public: * value without worrying about whether other code will modify them. * * @see CalendarAstronomer.Ecliptic - * @see CalendarAstronomer.Horizon * @internal */ class U_I18N_API Equatorial : public UMemory { @@ -201,66 +199,6 @@ public: double declination; }; - /** - * Represents the position of an object in the sky relative to - * the local horizon. - * The <i>Altitude</i> represents the object's elevation above the horizon, - * with objects below the horizon having a negative altitude. - * The <i>Azimuth</i> is the geographic direction of the object from the - * observer's position, with 0 representing north. The azimuth increases - * clockwise from north. - * <p> - * Note that Horizon objects are immutable and cannot be modified - * once they are constructed. This allows them to be passed and returned by - * value without worrying about whether other code will modify them. - * - * @see CalendarAstronomer.Ecliptic - * @see CalendarAstronomer.Equatorial - * @internal - */ - class U_I18N_API Horizon : public UMemory { - public: - /** - * Constructs a Horizon coordinate object. - * <p> - * @param alt The altitude, measured in radians above the horizon. - * @param azim The azimuth, measured in radians clockwise from north. - * @internal - */ - Horizon(double alt=0, double azim=0) - : altitude(alt), azimuth(azim) { } - - /** - * Setter for Ecliptic Coordinate object - * @param alt The altitude, measured in radians above the horizon. - * @param azim The azimuth, measured in radians clockwise from north. - * @internal - */ - void set(double alt, double azim) { - altitude = alt; - azimuth = azim; - } - - /** - * Return a string representation of this object, with the - * angles measured in degrees. - * @internal - */ - UnicodeString toString() const; - - /** - * The object's altitude above the horizon, in radians. - * @internal - */ - double altitude; - - /** - * The object's direction, in radians clockwise from north. - * @internal - */ - double azimuth; - }; - public: //------------------------------------------------------------------------- // Assorted private data used for conversions @@ -301,22 +239,6 @@ public: CalendarAstronomer(UDate d); /** - * Construct a new <code>CalendarAstronomer</code> object with the given - * latitude and longitude. The object's time is set to the current - * date and time. - * <p> - * @param longitude The desired longitude, in <em>degrees</em> east of - * the Greenwich meridian. - * - * @param latitude The desired latitude, in <em>degrees</em>. Positive - * values signify North, negative South. - * - * @see java.util.Date#getTime() - * @internal - */ - CalendarAstronomer(double longitude, double latitude); - - /** * Destructor * @internal */ @@ -333,48 +255,17 @@ public: * @param aTime the date and time, expressed as the number of milliseconds since * 1/1/1970 0:00 GMT (Gregorian). * - * @see #setDate * @see #getTime * @internal */ void setTime(UDate aTime); - - /** - * Set the current date and time of this <code>CalendarAstronomer</code> object. All - * astronomical calculations are performed based on this time setting. - * - * @param aTime the date and time, expressed as the number of milliseconds since - * 1/1/1970 0:00 GMT (Gregorian). - * - * @see #getTime - * @internal - */ - void setDate(UDate aDate) { setTime(aDate); } - - /** - * Set the current date and time of this <code>CalendarAstronomer</code> object. All - * astronomical calculations are performed based on this time setting. - * - * @param jdn the desired time, expressed as a "julian day number", - * which is the number of elapsed days since - * 1/1/4713 BC (Julian), 12:00 GMT. Note that julian day - * numbers start at <em>noon</em>. To get the jdn for - * the corresponding midnight, subtract 0.5. - * - * @see #getJulianDay - * @see #JULIAN_EPOCH_MS - * @internal - */ - void setJulianDay(double jdn); - /** * Get the current time of this <code>CalendarAstronomer</code> object, * represented as the number of milliseconds since * 1/1/1970 AD 0:00 GMT (Gregorian). * * @see #setTime - * @see #getDate * @internal */ UDate getTime(); @@ -384,59 +275,13 @@ public: * expressed as a "julian day number", which is the number of elapsed * days since 1/1/4713 BC (Julian), 12:00 GMT. * - * @see #setJulianDay * @see #JULIAN_EPOCH_MS * @internal */ double getJulianDay(); - /** - * Return this object's time expressed in julian centuries: - * the number of centuries after 1/1/1900 AD, 12:00 GMT - * - * @see #getJulianDay - * @internal - */ - double getJulianCentury(); - - /** - * Returns the current Greenwich sidereal time, measured in hours - * @internal - */ - double getGreenwichSidereal(); - -private: - double getSiderealOffset(); public: /** - * Returns the current local sidereal time, measured in hours - * @internal - */ - double getLocalSidereal(); - - /** - * Converts local sidereal time to Universal Time. - * - * @param lst The Local Sidereal Time, in hours since sidereal midnight - * on this object's current date. - * - * @return The corresponding Universal Time, in milliseconds since - * 1 Jan 1970, GMT. - */ - //private: - double lstToUT(double lst); - - /** - * - * Convert from ecliptic to equatorial coordinates. - * - * @param ecliptic The ecliptic - * @param result Fillin result - * @return reference to result - */ - Equatorial& eclipticToEquatorial(Equatorial& result, const Ecliptic& ecliptic); - - /** * Convert from ecliptic to equatorial coordinates. * * @param eclipLong The ecliptic longitude @@ -447,21 +292,6 @@ public: */ Equatorial& eclipticToEquatorial(Equatorial& result, double eclipLong, double eclipLat); - /** - * Convert from ecliptic longitude to equatorial coordinates. - * - * @param eclipLong The ecliptic longitude - * - * @return The corresponding point in equatorial coordinates. - * @internal - */ - Equatorial& eclipticToEquatorial(Equatorial& result, double eclipLong) ; - - /** - * @internal - */ - Horizon& eclipticToHorizon(Horizon& result, double eclipLong) ; - //------------------------------------------------------------------------- // The Sun //------------------------------------------------------------------------- @@ -484,40 +314,8 @@ public: */ /*public*/ void getSunLongitude(double julianDay, double &longitude, double &meanAnomaly); - /** - * The position of the sun at this object's current date and time, - * in equatorial coordinates. - * @param result fillin for the result - * @internal - */ - Equatorial& getSunPosition(Equatorial& result); - public: /** - * Constant representing the vernal equinox. - * For use with {@link #getSunTime getSunTime}. - * Note: In this case, "vernal" refers to the northern hemisphere's seasons. - * @internal - */ -// static double VERNAL_EQUINOX(); - - /** - * Constant representing the summer solstice. - * For use with {@link #getSunTime getSunTime}. - * Note: In this case, "summer" refers to the northern hemisphere's seasons. - * @internal - */ - static double SUMMER_SOLSTICE(); - - /** - * Constant representing the autumnal equinox. - * For use with {@link #getSunTime getSunTime}. - * Note: In this case, "autumn" refers to the northern hemisphere's seasons. - * @internal - */ -// static double AUTUMN_EQUINOX(); - - /** * Constant representing the winter solstice. * For use with {@link #getSunTime getSunTime}. * Note: In this case, "winter" refers to the northern hemisphere's seasons. @@ -532,20 +330,6 @@ public: */ UDate getSunTime(double desired, UBool next); - /** - * Returns the time (GMT) of sunrise or sunset on the local date to which - * this calendar is currently set. - * - * NOTE: This method only works well if this object is set to a - * time near local noon. Because of variations between the local - * official time zone and the geographic longitude, the - * computation can flop over into an adjacent day if this object - * is set to a time near local midnight. - * - * @internal - */ - UDate getSunRiseSet(UBool rise); - //------------------------------------------------------------------------- // The Moon //------------------------------------------------------------------------- @@ -569,22 +353,6 @@ public: */ double getMoonAge(); - /** - * Calculate the phase of the moon at the time set in this object. - * The returned phase is a <code>double</code> in the range - * <code>0 <= phase < 1</code>, interpreted as follows: - * <ul> - * <li>0.00: New moon - * <li>0.25: First quarter - * <li>0.50: Full moon - * <li>0.75: Last quarter - * </ul> - * - * @see #getMoonAge - * @internal - */ - double getMoonPhase(); - class U_I18N_API MoonAge : public UMemory { public: MoonAge(double l) @@ -598,28 +366,7 @@ public: * For use with {@link #getMoonTime getMoonTime} * @internal */ - static const MoonAge NEW_MOON(); - - /** - * Constant representing the moon's first quarter. - * For use with {@link #getMoonTime getMoonTime} - * @internal - */ -// static const MoonAge FIRST_QUARTER(); - - /** - * Constant representing a full moon. - * For use with {@link #getMoonTime getMoonTime} - * @internal - */ - static const MoonAge FULL_MOON(); - - /** - * Constant representing the moon's last quarter. - * For use with {@link #getMoonTime getMoonTime} - * @internal - */ -// static const MoonAge LAST_QUARTER(); + static MoonAge NEW_MOON(); /** * Find the next or previous time at which the Moon's ecliptic @@ -630,21 +377,13 @@ public: * is desired, <tt>false</tt> for the previous occurrence. * @internal */ - UDate getMoonTime(double desired, UBool next); UDate getMoonTime(const MoonAge& desired, UBool next); - /** - * Returns the time (GMT) of sunrise or sunset on the local date to which - * this calendar is currently set. - * @internal - */ - UDate getMoonRiseSet(UBool rise); - //------------------------------------------------------------------------- // Interpolation methods for finding the time at which a given event occurs //------------------------------------------------------------------------- - // private +public: class AngleFunc : public UMemory { public: virtual double eval(CalendarAstronomer&) = 0; @@ -652,20 +391,10 @@ public: }; friend class AngleFunc; +private: UDate timeOfAngle(AngleFunc& func, double desired, double periodDays, double epsilon, UBool next); - class CoordFunc : public UMemory { - public: - virtual void eval(Equatorial& result, CalendarAstronomer&) = 0; - virtual ~CoordFunc(); - }; - friend class CoordFunc; - - double riseOrSet(CoordFunc& func, UBool rise, - double diameter, double refraction, - double epsilon); - //------------------------------------------------------------------------- // Other utility methods //------------------------------------------------------------------------- @@ -691,29 +420,13 @@ private: */ UDate fTime; - /* These aren't used yet, but they'll be needed for sunset calculations - * and equatorial to horizon coordinate conversions - */ - double fLongitude; - double fLatitude; - double fGmtOffset; - - // // The following fields are used to cache calculated results for improved // performance. These values all depend on the current time setting // of this object, so the clearCache method is provided. - // - double julianDay; - double julianCentury; double sunLongitude; double meanAnomalySun; - double moonLongitude; double moonEclipLong; - double meanAnomalyMoon; - double eclipObliquity; - double siderealT0; - double siderealTime; void clearCache(); diff --git a/contrib/libs/icu/i18n/basictz.cpp b/contrib/libs/icu/i18n/basictz.cpp index 2490fadcc9..d03c50adac 100644 --- a/contrib/libs/icu/i18n/basictz.cpp +++ b/contrib/libs/icu/i18n/basictz.cpp @@ -511,7 +511,6 @@ BasicTimeZone::getTimeZoneRulesAfter(UDate start, InitialTimeZoneRule*& initial, // Set the results initial = res_initial.orphan(); transitionRules = filteredRules.orphan(); - return; } void diff --git a/contrib/libs/icu/i18n/brktrans.h b/contrib/libs/icu/i18n/brktrans.h index 5dcc8c50c0..45de01aa59 100644 --- a/contrib/libs/icu/i18n/brktrans.h +++ b/contrib/libs/icu/i18n/brktrans.h @@ -38,7 +38,7 @@ public: * Constructs a transliterator. * @param adoptedFilter the filter for this transliterator. */ - BreakTransliterator(UnicodeFilter* adoptedFilter = 0); + BreakTransliterator(UnicodeFilter* adoptedFilter = nullptr); /** * Destructor. diff --git a/contrib/libs/icu/i18n/buddhcal.cpp b/contrib/libs/icu/i18n/buddhcal.cpp index dc14af00bf..7723ade105 100644 --- a/contrib/libs/icu/i18n/buddhcal.cpp +++ b/contrib/libs/icu/i18n/buddhcal.cpp @@ -18,6 +18,7 @@ #if !UCONFIG_NO_FORMATTING #include "buddhcal.h" +#include "gregoimp.h" #include "unicode/gregocal.h" #include "umutex.h" #include <float.h> @@ -63,17 +64,21 @@ const char *BuddhistCalendar::getType() const return "buddhist"; } -int32_t BuddhistCalendar::handleGetExtendedYear() +int32_t BuddhistCalendar::handleGetExtendedYear(UErrorCode& status) { + if (U_FAILURE(status)) { + return 0; + } // EXTENDED_YEAR in BuddhistCalendar is a Gregorian year. // The default value of EXTENDED_YEAR is 1970 (Buddhist 2513) - int32_t year; if (newerField(UCAL_EXTENDED_YEAR, UCAL_YEAR) == UCAL_EXTENDED_YEAR) { - year = internalGet(UCAL_EXTENDED_YEAR, kGregorianEpoch); - } else { - // extended year is a gregorian year, where 1 = 1AD, 0 = 1BC, -1 = 2BC, etc - year = internalGet(UCAL_YEAR, kGregorianEpoch - kBuddhistEraStart) - + kBuddhistEraStart; + return internalGet(UCAL_EXTENDED_YEAR, kGregorianEpoch); + } + // extended year is a gregorian year, where 1 = 1AD, 0 = 1BC, -1 = 2BC, etc + int32_t year = internalGet(UCAL_YEAR, kGregorianEpoch - kBuddhistEraStart); + if (uprv_add32_overflow(year, kBuddhistEraStart, &year)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; } return year; } @@ -90,84 +95,11 @@ int32_t BuddhistCalendar::handleGetLimit(UCalendarDateFields field, ELimitType l { if(field == UCAL_ERA) { return BE; - } else { - return GregorianCalendar::handleGetLimit(field,limitType); - } -} - -#if 0 -void BuddhistCalendar::timeToFields(UDate theTime, UBool quick, UErrorCode& status) -{ - //Calendar::timeToFields(theTime, quick, status); - - int32_t era = internalGet(UCAL_ERA); - int32_t year = internalGet(UCAL_YEAR); - - if(era == GregorianCalendar::BC) { - year = 1-year; - era = BuddhistCalendar::BE; - } else if(era == GregorianCalendar::AD) { - era = BuddhistCalendar::BE; - } else { - status = U_INTERNAL_PROGRAM_ERROR; - } - - year = year - kBuddhistEraStart; - - internalSet(UCAL_ERA, era); - internalSet(UCAL_YEAR, year); -} -#endif - -/** - * The system maintains a static default century start date. This is initialized - * the first time it is used. Once the system default century date and year - * are set, they do not change. - */ -static UDate gSystemDefaultCenturyStart = DBL_MIN; -static int32_t gSystemDefaultCenturyStartYear = -1; -static icu::UInitOnce gBCInitOnce {}; - - -UBool BuddhistCalendar::haveDefaultCentury() const -{ - return true; -} - -static void U_CALLCONV -initializeSystemDefaultCentury() -{ - // initialize systemDefaultCentury and systemDefaultCenturyYear based - // on the current time. They'll be set to 80 years before - // the current time. - UErrorCode status = U_ZERO_ERROR; - BuddhistCalendar calendar(Locale("@calendar=buddhist"),status); - if (U_SUCCESS(status)) { - calendar.setTime(Calendar::getNow(), status); - calendar.add(UCAL_YEAR, -80, status); - UDate newStart = calendar.getTime(status); - int32_t newYear = calendar.get(UCAL_YEAR, status); - gSystemDefaultCenturyStartYear = newYear; - gSystemDefaultCenturyStart = newStart; } - // We have no recourse upon failure unless we want to propagate the failure - // out. -} - -UDate BuddhistCalendar::defaultCenturyStart() const -{ - // lazy-evaluate systemDefaultCenturyStart and systemDefaultCenturyStartYear - umtx_initOnce(gBCInitOnce, &initializeSystemDefaultCentury); - return gSystemDefaultCenturyStart; -} - -int32_t BuddhistCalendar::defaultCenturyStartYear() const -{ - // lazy-evaluate systemDefaultCenturyStartYear and systemDefaultCenturyStart - umtx_initOnce(gBCInitOnce, &initializeSystemDefaultCentury); - return gSystemDefaultCenturyStartYear; + return GregorianCalendar::handleGetLimit(field,limitType); } +IMPL_SYSTEM_DEFAULT_CENTURY(BuddhistCalendar, "@calendar=buddhist") U_NAMESPACE_END diff --git a/contrib/libs/icu/i18n/buddhcal.h b/contrib/libs/icu/i18n/buddhcal.h index 01b59341c1..1fa8395b35 100644 --- a/contrib/libs/icu/i18n/buddhcal.h +++ b/contrib/libs/icu/i18n/buddhcal.h @@ -139,10 +139,11 @@ private: * use the UCAL_EXTENDED_YEAR field or the UCAL_YEAR and supra-year fields (such * as UCAL_ERA) specific to the calendar system, depending on which set of * fields is newer. + * @param status * @return the extended year * @internal */ - virtual int32_t handleGetExtendedYear() override; + virtual int32_t handleGetExtendedYear(UErrorCode& status) override; /** * Subclasses may override this method to compute several fields * specific to each calendar system. @@ -158,24 +159,9 @@ private: */ virtual int32_t handleGetLimit(UCalendarDateFields field, ELimitType limitType) const override; - /** - * Returns true because the Buddhist Calendar does have a default century - * @internal - */ - virtual UBool haveDefaultCentury() const override; - - /** - * Returns the date of the start of the default century - * @return start of century - in milliseconds since epoch, 1970 - * @internal - */ - virtual UDate defaultCenturyStart() const override; + virtual bool isEra0CountingBackward() const override { return false; } - /** - * Returns the year in which the default century begins - * @internal - */ - virtual int32_t defaultCenturyStartYear() const override; + DECLARE_OVERRIDE_SYSTEM_DEFAULT_CENTURY }; U_NAMESPACE_END diff --git a/contrib/libs/icu/i18n/calendar.cpp b/contrib/libs/icu/i18n/calendar.cpp index 72d5d10ed5..8d5246966e 100644 --- a/contrib/libs/icu/i18n/calendar.cpp +++ b/contrib/libs/icu/i18n/calendar.cpp @@ -63,6 +63,7 @@ #include "sharedcalendar.h" #include "unifiedcache.h" #include "ulocimp.h" +#include "charstr.h" #if !UCONFIG_NO_SERVICE static icu::ICULocaleService* gService = nullptr; @@ -247,46 +248,24 @@ static UBool isStandardSupportedKeyword(const char *keyword, UErrorCode& status) return (calType != CALTYPE_UNKNOWN); } -// only used with service registration. -static void getCalendarKeyword(const UnicodeString &id, char *targetBuffer, int32_t targetBufferSize) { - UnicodeString calendarKeyword = UNICODE_STRING_SIMPLE("calendar="); - int32_t calKeyLen = calendarKeyword.length(); - int32_t keyLen = 0; - - int32_t keywordIdx = id.indexOf((char16_t)0x003D); /* '=' */ - if (id[0] == 0x40/*'@'*/ - && id.compareBetween(1, keywordIdx+1, calendarKeyword, 0, calKeyLen) == 0) - { - keyLen = id.extract(keywordIdx+1, id.length(), targetBuffer, targetBufferSize, US_INV); - } - targetBuffer[keyLen] = 0; -} #endif static ECalType getCalendarTypeForLocale(const char *locid) { UErrorCode status = U_ZERO_ERROR; ECalType calType = CALTYPE_UNKNOWN; - //TODO: ULOC_FULL_NAME is out of date and too small.. - char canonicalName[256]; - // Canonicalize, so that an old-style variant will be transformed to keywords. // e.g ja_JP_TRADITIONAL -> ja_JP@calendar=japanese // NOTE: Since ICU-20187, ja_JP_TRADITIONAL no longer canonicalizes, and // the Gregorian calendar is returned instead. - int32_t canonicalLen = uloc_canonicalize(locid, canonicalName, sizeof(canonicalName) - 1, &status); + CharString canonicalName = ulocimp_canonicalize(locid, status); if (U_FAILURE(status)) { return CALTYPE_GREGORIAN; } - canonicalName[canonicalLen] = 0; // terminate - - char calTypeBuf[32]; - int32_t calTypeBufLen; - calTypeBufLen = uloc_getKeywordValue(canonicalName, "calendar", calTypeBuf, sizeof(calTypeBuf) - 1, &status); + CharString calTypeBuf = ulocimp_getKeywordValue(canonicalName.data(), "calendar", status); if (U_SUCCESS(status)) { - calTypeBuf[calTypeBufLen] = 0; - calType = getCalendarType(calTypeBuf); + calType = getCalendarType(calTypeBuf.data()); if (calType != CALTYPE_UNKNOWN) { return calType; } @@ -295,8 +274,7 @@ static ECalType getCalendarTypeForLocale(const char *locid) { // when calendar keyword is not available or not supported, read supplementalData // to get the default calendar type for the locale's region - char region[ULOC_COUNTRY_CAPACITY]; - (void)ulocimp_getRegionForSupplementalData(canonicalName, true, region, sizeof(region), &status); + CharString region = ulocimp_getRegionForSupplementalData(canonicalName.data(), true, status); if (U_FAILURE(status)) { return CALTYPE_GREGORIAN; } @@ -304,22 +282,19 @@ static ECalType getCalendarTypeForLocale(const char *locid) { // Read preferred calendar values from supplementalData calendarPreference UResourceBundle *rb = ures_openDirect(nullptr, "supplementalData", &status); ures_getByKey(rb, "calendarPreferenceData", rb, &status); - UResourceBundle *order = ures_getByKey(rb, region, nullptr, &status); + UResourceBundle *order = ures_getByKey(rb, region.data(), nullptr, &status); if (status == U_MISSING_RESOURCE_ERROR && rb != nullptr) { status = U_ZERO_ERROR; order = ures_getByKey(rb, "001", nullptr, &status); } - calTypeBuf[0] = 0; + calTypeBuf.clear(); if (U_SUCCESS(status) && order != nullptr) { // the first calendar type is the default for the region int32_t len = 0; const char16_t *uCalType = ures_getStringByIndex(order, 0, &len, &status); - if (len < (int32_t)sizeof(calTypeBuf)) { - u_UCharsToChars(uCalType, calTypeBuf, len); - *(calTypeBuf + len) = 0; // terminate; - calType = getCalendarType(calTypeBuf); - } + calTypeBuf.appendInvariantChars(uCalType, len, status); + calType = getCalendarType(calTypeBuf.data()); } ures_close(order); @@ -458,10 +433,7 @@ protected: lkey->canonicalLocale(canLoc); char keyword[ULOC_FULLNAME_CAPACITY]; - UnicodeString str; - - key.currentID(str); - getCalendarKeyword(str, keyword, (int32_t) sizeof(keyword)); + curLoc.getKeywordValue("calendar", keyword, (int32_t) sizeof(keyword), status); #ifdef U_DEBUG_CALSVC fprintf(stderr, "BasicCalendarFactory::create() - cur %s, can %s\n", (const char*)curLoc.getName(), (const char*)canLoc.getName()); @@ -654,7 +626,7 @@ static const int32_t kCalendarLimits[UCAL_FIELD_COUNT][4] = { { 0, 0, 59, 59 }, // MINUTE { 0, 0, 59, 59 }, // SECOND { 0, 0, 999, 999 }, // MILLISECOND - {-16*kOneHour, -16*kOneHour, 12*kOneHour, 30*kOneHour }, // ZONE_OFFSET + {-24*kOneHour, -16*kOneHour, 12*kOneHour, 30*kOneHour }, // ZONE_OFFSET { -1*kOneHour, -1*kOneHour, 2*kOneHour, 2*kOneHour }, // DST_OFFSET {/*N/A*/-1, /*N/A*/-1, /*N/A*/-1, /*N/A*/-1}, // YEAR_WOY { 1, 1, 7, 7 }, // DOW_LOCAL @@ -769,7 +741,7 @@ fSkippedWallTime(UCAL_WALLTIME_LAST) delete zone; return; } - if(zone == 0) { + if (zone == nullptr) { #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: ILLEGAL ARG because timezone cannot be 0\n", __FILE__, __LINE__); @@ -1186,6 +1158,9 @@ Calendar::setTimeInMillis( double millis, UErrorCode& status ) { status = U_ILLEGAL_ARGUMENT_ERROR; return; } + } else if (uprv_isNaN(millis)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; } fTime = millis; @@ -1206,6 +1181,13 @@ Calendar::setTimeInMillis( double millis, UErrorCode& status ) { int32_t Calendar::get(UCalendarDateFields field, UErrorCode& status) const { + if (U_FAILURE(status)) { + return 0; + } + if (field < 0 || field >= UCAL_FIELD_COUNT) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } // field values are only computed when actually requested; for more on when computation // of various things happens, see the "data flow in Calendar" description at the top // of this file @@ -1218,6 +1200,9 @@ Calendar::get(UCalendarDateFields field, UErrorCode& status) const void Calendar::set(UCalendarDateFields field, int32_t value) { + if (field < 0 || field >= UCAL_FIELD_COUNT) { + return; + } if (fAreFieldsVirtuallySet) { UErrorCode ec = U_ZERO_ERROR; computeFields(ec); @@ -1299,13 +1284,25 @@ Calendar::clear() void Calendar::clear(UCalendarDateFields field) { + if (field < 0 || field >= UCAL_FIELD_COUNT) { + return; + } if (fAreFieldsVirtuallySet) { UErrorCode ec = U_ZERO_ERROR; computeFields(ec); } fFields[field] = 0; fStamp[field] = kUnset; - fIsSet[field] = false; // Remove later + if (field == UCAL_MONTH) { + fFields[UCAL_ORDINAL_MONTH] = 0; + fStamp[UCAL_ORDINAL_MONTH] = kUnset; + fIsSet[UCAL_ORDINAL_MONTH] = false; // Remove later + } + if (field == UCAL_ORDINAL_MONTH) { + fFields[UCAL_MONTH] = 0; + fStamp[UCAL_MONTH] = kUnset; + fIsSet[UCAL_MONTH] = false; // Remove later + } fIsTimeSet = fAreFieldsSet = fAreAllFieldsSet = fAreFieldsVirtuallySet = false; } @@ -1314,6 +1311,9 @@ Calendar::clear(UCalendarDateFields field) UBool Calendar::isSet(UCalendarDateFields field) const { + if (field < 0 || field >= UCAL_FIELD_COUNT) { + return false; + } return fAreFieldsVirtuallySet || (fStamp[field] != kUnset); } @@ -1392,6 +1392,10 @@ void Calendar::pinField(UCalendarDateFields field, UErrorCode& status) { if (U_FAILURE(status)) { return; } + if (field < 0 || field >= UCAL_FIELD_COUNT) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } int32_t max = getActualMaximum(field, status); int32_t min = getActualMinimum(field, status); @@ -1448,9 +1452,15 @@ void Calendar::computeFields(UErrorCode &ec) // 11/6/00 int32_t millisInDay; - int32_t days = ClockMath::floorDivide(localMillis, kOneDay, &millisInDay); + double days = ClockMath::floorDivide( + localMillis, U_MILLIS_PER_DAY, &millisInDay) + + kEpochStartAsJulianDay; + if (days > INT32_MAX || days < INT32_MIN) { + ec = U_ILLEGAL_ARGUMENT_ERROR; + return; + } - internalSet(UCAL_JULIAN_DAY,days + kEpochStartAsJulianDay); + internalSet(UCAL_JULIAN_DAY, static_cast<int32_t>(days)); #if defined (U_DEBUG_CAL) //fprintf(stderr, "%s:%d- Hmm! Jules @ %d, as per %.0lf millis\n", @@ -1518,11 +1528,11 @@ void Calendar::computeFields(UErrorCode &ec) U_ASSERT(fFields[UCAL_DST_OFFSET] <= getMaximum(UCAL_DST_OFFSET)); } -uint8_t Calendar::julianDayToDayOfWeek(double julian) +uint8_t Calendar::julianDayToDayOfWeek(int32_t julian) { // If julian is negative, then julian%7 will be negative, so we adjust // accordingly. We add 1 because Julian day 0 is Monday. - int8_t dayOfWeek = (int8_t) uprv_fmod(julian + 1, 7); + int8_t dayOfWeek = (int8_t) ((julian + 1LL) % 7); uint8_t result = (uint8_t)(dayOfWeek + ((dayOfWeek < 0) ? (7+UCAL_SUNDAY ) : UCAL_SUNDAY)); return result; @@ -1566,7 +1576,14 @@ void Calendar::computeGregorianFields(int32_t julianDay, UErrorCode& ec) { return; } int32_t gregorianDayOfWeekUnused; - Grego::dayToFields(julianDay - kEpochStartAsJulianDay, fGregorianYear, fGregorianMonth, fGregorianDayOfMonth, gregorianDayOfWeekUnused, fGregorianDayOfYear); + if (uprv_add32_overflow( + julianDay, -kEpochStartAsJulianDay, &julianDay)) { + ec = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + Grego::dayToFields(julianDay, fGregorianYear, fGregorianMonth, + fGregorianDayOfMonth, gregorianDayOfWeekUnused, + fGregorianDayOfYear); } /** @@ -1727,6 +1744,10 @@ void Calendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& statu if(U_FAILURE(status)) { return; } + if (field < 0 || field >= UCAL_FIELD_COUNT) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } switch (field) { case UCAL_DAY_OF_MONTH: case UCAL_AM_PM: @@ -1743,8 +1764,8 @@ void Calendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& statu int32_t max = getActualMaximum(field,status); int32_t gap = max - min + 1; - int32_t value = internalGet(field) + amount; - value = (value - min) % gap; + int64_t value = internalGet(field); + value = (value + amount - min) % gap; if (value < 0) { value += gap; } @@ -1766,7 +1787,7 @@ void Calendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& statu { // Assume min == 0 in calculations below double start = getTimeInMillis(status); - int32_t oldHour = internalGet(field); + int64_t oldHour = internalGet(field); int32_t max = getMaximum(field); int32_t newHour = (oldHour + amount) % (max + 1); if (newHour < 0) { @@ -1783,11 +1804,12 @@ void Calendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& statu // DAY_OF_MONTH if, after updating the MONTH field, it is illegal. // E.g., <jan31>.roll(MONTH, 1) -> <feb28> or <feb29>. { - int32_t max = getActualMaximum(UCAL_MONTH, status); - int32_t mon = (internalGet(UCAL_MONTH) + amount) % (max+1); + int32_t max = getActualMaximum(UCAL_MONTH, status) + 1; + int64_t mon = internalGet(UCAL_MONTH); + mon = (mon + amount) % max; if (mon < 0) { - mon += (max + 1); + mon += max; } set(UCAL_MONTH, mon); @@ -1804,16 +1826,19 @@ void Calendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& statu // * If era==0 and years go backwards in time, change sign of amount. // * Until we have new API per #9393, we temporarily hardcode knowledge of // which calendars have era 0 years that go backwards. - UBool era0WithYearsThatGoBackwards = false; - int32_t era = get(UCAL_ERA, status); - if (era == 0) { - const char * calType = getType(); - if ( uprv_strcmp(calType,"gregorian")==0 || uprv_strcmp(calType,"roc")==0 || uprv_strcmp(calType,"coptic")==0 ) { - amount = -amount; - era0WithYearsThatGoBackwards = true; + int32_t era = internalGet(UCAL_ERA); + if (era == 0 && isEra0CountingBackward()) { + if (uprv_mul32_overflow(amount, -1, &amount)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; } } - int32_t newYear = internalGet(field) + amount; + int32_t newYear; + if (uprv_add32_overflow( + amount, internalGet(field), &newYear)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } if (era > 0 || newYear >= 1) { int32_t maxYear = getActualMaximum(field, status); if (maxYear < 32768) { @@ -1830,21 +1855,24 @@ void Calendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& statu // else we are in era 0 with newYear < 1; // calendars with years that go backwards must pin the year value at 0, // other calendars can have years < 0 in era 0 - } else if (era0WithYearsThatGoBackwards) { + } else if (era == 0 && isEra0CountingBackward()) { newYear = 1; } set(field, newYear); pinField(UCAL_MONTH,status); - pinField(UCAL_ORDINAL_MONTH,status); pinField(UCAL_DAY_OF_MONTH,status); return; } case UCAL_EXTENDED_YEAR: // Rolling the year can involve pinning the DAY_OF_MONTH. - set(field, internalGet(field) + amount); + if (uprv_add32_overflow( + amount, internalGet(field), &amount)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + set(field, amount); pinField(UCAL_MONTH,status); - pinField(UCAL_ORDINAL_MONTH,status); pinField(UCAL_DAY_OF_MONTH,status); return; @@ -1911,7 +1939,11 @@ void Calendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& statu // Now roll between start and (limit - 1). int32_t gap = limit - start; - int32_t day_of_month = (internalGet(UCAL_DAY_OF_MONTH) + amount*7 - + if (gap == 0) { + status = U_INTERNAL_PROGRAM_ERROR; + return; + } + int32_t day_of_month = (internalGet(UCAL_DAY_OF_MONTH) + amount*7LL - start) % gap; if (day_of_month < 0) day_of_month += gap; day_of_month += start; @@ -1969,7 +2001,11 @@ void Calendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& statu // Now roll between start and (limit - 1). int32_t gap = limit - start; - int32_t day_of_year = (internalGet(UCAL_DAY_OF_YEAR) + amount*7 - + if (gap == 0) { + status = U_INTERNAL_PROGRAM_ERROR; + return; + } + int32_t day_of_year = (internalGet(UCAL_DAY_OF_YEAR) + amount*7LL - start) % gap; if (day_of_year < 0) day_of_year += gap; day_of_year += start; @@ -2048,7 +2084,12 @@ void Calendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& statu return; } case UCAL_JULIAN_DAY: - set(field, internalGet(field) + amount); + if (uprv_add32_overflow( + amount, internalGet(field), &amount)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + set(field, amount); return; default: // Other fields cannot be rolled by this method @@ -2071,6 +2112,10 @@ void Calendar::add(UCalendarDateFields field, int32_t amount, UErrorCode& status if (U_FAILURE(status)) { return; } + if (field < 0 || field >= UCAL_FIELD_COUNT) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } if (amount == 0) { return; // Do nothing! } @@ -2101,9 +2146,19 @@ void Calendar::add(UCalendarDateFields field, int32_t amount, UErrorCode& status switch (field) { case UCAL_ERA: - set(field, get(field, status) + amount); + { + int32_t era = get(UCAL_ERA, status); + if (U_FAILURE(status)) { + return; + } + if (uprv_add32_overflow(era, amount, &era)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + set(UCAL_ERA, era); pinField(UCAL_ERA, status); return; + } case UCAL_YEAR: case UCAL_YEAR_WOY: @@ -2115,11 +2170,10 @@ void Calendar::add(UCalendarDateFields field, int32_t amount, UErrorCode& status // this by applying the amount to the UCAL_EXTENDED_YEAR field; but since // we would still need to handle UCAL_YEAR_WOY as below, might as well // also handle UCAL_YEAR the same way. - int32_t era = get(UCAL_ERA, status); - if (era == 0) { - const char * calType = getType(); - if ( uprv_strcmp(calType,"gregorian")==0 || uprv_strcmp(calType,"roc")==0 || uprv_strcmp(calType,"coptic")==0 ) { - amount = -amount; + if (get(UCAL_ERA, status) == 0 && isEra0CountingBackward()) { + if (uprv_mul32_overflow(amount, -1, &amount)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; } } } @@ -2131,7 +2185,16 @@ void Calendar::add(UCalendarDateFields field, int32_t amount, UErrorCode& status { UBool oldLenient = isLenient(); setLenient(true); - set(field, get(field, status) + amount); + int32_t value = get(field, status); + if (U_FAILURE(status)) { + return; + } + if (uprv_add32_overflow(value, amount, &value)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + set(field, value); + pinField(UCAL_DAY_OF_MONTH, status); if(oldLenient==false) { complete(status); /* force recalculate */ @@ -2257,7 +2320,13 @@ int32_t Calendar::fieldDifference(UDate when, EDateFields field, UErrorCode& sta } int32_t Calendar::fieldDifference(UDate targetMs, UCalendarDateFields field, UErrorCode& ec) { - if (U_FAILURE(ec)) return 0; + if (U_FAILURE(ec)) { + return 0; + } + if (field < 0 || field >= UCAL_FIELD_COUNT) { + ec = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } int32_t min = 0; double startMs = getTimeInMillis(ec); // Always add from the start millis. This accommodates @@ -2290,6 +2359,7 @@ int32_t Calendar::fieldDifference(UDate targetMs, UCalendarDateFields field, UEr __FILE__, __LINE__, fldName(field)); #endif ec = U_ILLEGAL_ARGUMENT_ERROR; + return 0; } } // Do a binary search @@ -2327,6 +2397,7 @@ int32_t Calendar::fieldDifference(UDate targetMs, UCalendarDateFields field, UEr __FILE__, __LINE__, fldName(field)); #endif ec = U_ILLEGAL_ARGUMENT_ERROR; + return 0; } } } @@ -2362,7 +2433,9 @@ void Calendar::adoptTimeZone(TimeZone* zone) { // Do nothing if passed-in zone is nullptr - if (zone == nullptr) return; + if (zone == nullptr) { + return; + } // fZone should always be non-null delete fZone; @@ -2715,6 +2788,10 @@ Calendar::getActualMinimum(UCalendarDateFields field, UErrorCode& status) const if (U_FAILURE(status)) { return 0; } + if (field < 0 || field >= UCAL_FIELD_COUNT) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } int32_t fieldValue = getGreatestMinimum(field); int32_t endValue = getMinimum(field); @@ -2790,7 +2867,9 @@ const char* Calendar::getTemporalMonthCode(UErrorCode& status) const { int32_t month = get(UCAL_MONTH, status); - if (U_FAILURE(status)) return nullptr; + if (U_FAILURE(status)) { + return nullptr; + } U_ASSERT(month < 12); U_ASSERT(internalGet(UCAL_IS_LEAP_MONTH) == 0); return gTemporalMonthCodes[month]; @@ -2799,7 +2878,9 @@ Calendar::getTemporalMonthCode(UErrorCode& status) const void Calendar::setTemporalMonthCode(const char* code, UErrorCode& status ) { - if (U_FAILURE(status)) return; + if (U_FAILURE(status)) { + return; + } int32_t len = static_cast<int32_t>(uprv_strlen(code)); if (len == 3 && code[0] == 'M') { for (int m = 0; gTemporalMonthCodes[m] != nullptr; m++) { @@ -2844,14 +2925,24 @@ void Calendar::validateField(UCalendarDateFields field, UErrorCode &status) { if (U_FAILURE(status)) { return; } + if (field < 0 || field >= UCAL_FIELD_COUNT) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } int32_t y; switch (field) { case UCAL_DAY_OF_MONTH: - y = handleGetExtendedYear(); - validateField(field, 1, handleGetMonthLength(y, internalGetMonth()), status); + y = handleGetExtendedYear(status); + if (U_FAILURE(status)) { + return; + } + validateField(field, 1, handleGetMonthLength(y, internalGetMonth(status), status), status); break; case UCAL_DAY_OF_YEAR: - y = handleGetExtendedYear(); + y = handleGetExtendedYear(status); + if (U_FAILURE(status)) { + return; + } validateField(field, 1, handleGetYearLength(y), status); break; case UCAL_DAY_OF_WEEK_IN_MONTH: @@ -2883,6 +2974,10 @@ void Calendar::validateField(UCalendarDateFields field, int32_t min, int32_t max if (U_FAILURE(status)) { return; } + if (field < 0 || field >= UCAL_FIELD_COUNT) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } int32_t value = fFields[field]; if (value < min || value > max) { #if defined (U_DEBUG_CAL) @@ -3026,7 +3121,10 @@ void Calendar::computeTime(UErrorCode& status) { } // Compute the Julian day - int32_t julianDay = computeJulianDay(); + int32_t julianDay = computeJulianDay(status); + if (U_FAILURE(status)) { + return; + } double millis = Grego::julianDayToMillis(julianDay); @@ -3055,7 +3153,7 @@ void Calendar::computeTime(UErrorCode& status) { UDate t = 0; if (fStamp[UCAL_ZONE_OFFSET] >= ((int32_t)kMinimumUserStamp) || fStamp[UCAL_DST_OFFSET] >= ((int32_t)kMinimumUserStamp)) { - t = millis + millisInDay - (internalGet(UCAL_ZONE_OFFSET) + internalGet(UCAL_DST_OFFSET)); + t = millis + millisInDay - internalGet(UCAL_ZONE_OFFSET) - internalGet(UCAL_DST_OFFSET); } else { // Compute the time zone offset and DST offset. There are two potential // ambiguities here. We'll assume a 2:00 am (wall time) switchover time @@ -3184,7 +3282,9 @@ double Calendar::computeMillisInDay() { // Don't normalize here; let overflow bump into the next period. // This is consistent with how we handle other fields. millisInDay += internalGet(UCAL_HOUR); - millisInDay += 12 * internalGet(UCAL_AM_PM); // Default works for unset AM_PM + // Treat even number as AM and odd nubmber as PM to align with the + // logic in roll() + millisInDay += (internalGet(UCAL_AM_PM) % 2 == 0) ? 0 : 12; } } @@ -3257,7 +3357,7 @@ int32_t Calendar::computeZoneOffset(double millis, double millisInDay, UErrorCod return rawOffset + dstOffset; } -int32_t Calendar::computeJulianDay() +int32_t Calendar::computeJulianDay(UErrorCode &status) { // We want to see if any of the date fields is newer than the // JULIAN_DAY. If not, then we use JULIAN_DAY. If so, then we do @@ -3281,12 +3381,15 @@ int32_t Calendar::computeJulianDay() bestField = UCAL_DAY_OF_MONTH; } - return handleComputeJulianDay(bestField); + return handleComputeJulianDay(bestField, status); } // ------------------------------------------- -int32_t Calendar::handleComputeJulianDay(UCalendarDateFields bestField) { +int32_t Calendar::handleComputeJulianDay(UCalendarDateFields bestField, UErrorCode &status) { + if (U_FAILURE(status)) { + return 0; + } UBool useMonth = (bestField == UCAL_DAY_OF_MONTH || bestField == UCAL_WEEK_OF_MONTH || bestField == UCAL_DAY_OF_WEEK_IN_MONTH); @@ -3295,10 +3398,19 @@ int32_t Calendar::handleComputeJulianDay(UCalendarDateFields bestField) { if (bestField == UCAL_WEEK_OF_YEAR && newerField(UCAL_YEAR_WOY, UCAL_YEAR) == UCAL_YEAR_WOY) { year = internalGet(UCAL_YEAR_WOY); } else { - year = handleGetExtendedYear(); + year = handleGetExtendedYear(status); + if (U_FAILURE(status)) { + return 0; + } } internalSet(UCAL_EXTENDED_YEAR, year); + // Return U_ILLEGAL_ARGUMENT_ERROR if year is too large that may cuase int32_t overflow + // later. + if (year > INT32_MAX / 400) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: bestField= %s - y=%d\n", __FILE__, __LINE__, fldName(bestField), year); @@ -3311,12 +3423,21 @@ int32_t Calendar::handleComputeJulianDay(UCalendarDateFields bestField) { int32_t month; if(isSet(UCAL_MONTH) || isSet(UCAL_ORDINAL_MONTH)) { - month = internalGetMonth(); + month = internalGetMonth(status); + if (U_FAILURE(status)) { + return 0; + } } else { - month = getDefaultMonthInYear(year); + month = getDefaultMonthInYear(year, status); + if (U_FAILURE(status)) { + return 0; + } } - int32_t julianDay = handleComputeMonthStart(year, useMonth ? month : 0, useMonth); + int32_t julianDay = handleComputeMonthStart(year, useMonth ? month : 0, useMonth, status); + if (U_FAILURE(status)) { + return 0; + } if (bestField == UCAL_DAY_OF_MONTH) { @@ -3327,11 +3448,20 @@ int32_t Calendar::handleComputeJulianDay(UCalendarDateFields bestField) { } else { dayOfMonth = getDefaultDayInMonth(year, month); } - return julianDay + dayOfMonth; + if (uprv_add32_overflow(dayOfMonth, julianDay, &dayOfMonth)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + return dayOfMonth; } if (bestField == UCAL_DAY_OF_YEAR) { - return julianDay + internalGet(UCAL_DAY_OF_YEAR); + int32_t result; + if (uprv_add32_overflow(internalGet(UCAL_DAY_OF_YEAR), julianDay, &result)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + return result; } int32_t firstDayOfWeek = getFirstDayOfWeek(); // Localized fdw @@ -3353,7 +3483,10 @@ int32_t Calendar::handleComputeJulianDay(UCalendarDateFields bestField) { first += 7; } - int32_t dowLocal = getLocalDOW(); + int32_t dowLocal = getLocalDOW(status); + if (U_FAILURE(status)) { + return 0; + } // Find the first target DOW (dowLocal) in the month or year. // Actually, it may be just before the first of the month or year. @@ -3370,7 +3503,12 @@ int32_t Calendar::handleComputeJulianDay(UCalendarDateFields bestField) { // negative. int32_t dim = internalGet(UCAL_DAY_OF_WEEK_IN_MONTH, 1); if (dim >= 0) { - date += 7*(dim - 1); + int32_t temp; + if (uprv_mul32_overflow(7, dim - 1, &temp) || + uprv_add32_overflow(date, temp, &date)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } } else { // Move date to the last of this day-of-week in this month, @@ -3379,9 +3517,18 @@ int32_t Calendar::handleComputeJulianDay(UCalendarDateFields bestField) { // past the first of the given day-of-week in this month. // Note that we handle -2, -3, etc. correctly, even though // values < -1 are technically disallowed. - int32_t m = internalGetMonth(UCAL_JANUARY); - int32_t monthLength = handleGetMonthLength(year, m); - date += ((monthLength - date) / 7 + dim + 1) * 7; + int32_t m = internalGetMonth(UCAL_JANUARY, status); + int32_t monthLength = handleGetMonthLength(year, m, status); + if (U_FAILURE(status)) { + return 0; + } + int32_t temp; + if (uprv_add32_overflow((monthLength - date) / 7, dim+1, &temp) || + uprv_mul32_overflow(temp, 7, &temp) || + uprv_add32_overflow(date, temp, &date)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } } } else { #if defined (U_DEBUG_CAL) @@ -3396,7 +3543,10 @@ int32_t Calendar::handleComputeJulianDay(UCalendarDateFields bestField) { // need to be sure to stay in 'real' year. int32_t woy = internalGet(bestField); - int32_t nextJulianDay = handleComputeMonthStart(year+1, 0, false); // jd of day before jan 1 + int32_t nextJulianDay = handleComputeMonthStart(year+1, 0, false, status); // jd of day before jan 1 + if (U_FAILURE(status)) { + return 0; + } int32_t nextFirst = julianDayToDayOfWeek(nextJulianDay + 1) - firstDayOfWeek; if (nextFirst < 0) { // 0..6 ldow of Jan 1 @@ -3439,7 +3589,12 @@ int32_t Calendar::handleComputeJulianDay(UCalendarDateFields bestField) { } // Now adjust for the week number. - testDate += 7 * (woy - 1); + int32_t weeks; + if (uprv_mul32_overflow(woy-1, 7, &weeks) || + uprv_add32_overflow(weeks, testDate, &testDate)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d - y=%d, y-1=%d doy%d, njd%d (C.F. %d)\n", @@ -3447,7 +3602,10 @@ int32_t Calendar::handleComputeJulianDay(UCalendarDateFields bestField) { #endif if(julianDay+testDate > nextJulianDay) { // is it past Dec 31? (nextJulianDay is day BEFORE year+1's Jan 1) // Fire up the calculating engines.. retry YWOY = (year-1) - julianDay = handleComputeMonthStart(year-1, 0, false); // jd before Jan 1 of previous year + julianDay = handleComputeMonthStart(year-1, 0, false, status); // jd before Jan 1 of previous year + if (U_FAILURE(status)) { + return 0; + } first = julianDayToDayOfWeek(julianDay + 1) - firstDayOfWeek; // 0 based local dow of first week if(first < 0) { // 0..6 @@ -3473,14 +3631,24 @@ int32_t Calendar::handleComputeJulianDay(UCalendarDateFields bestField) { } // Now adjust for the week number. - date += 7 * (internalGet(bestField) - 1); + int32_t weeks = internalGet(bestField); + if (uprv_add32_overflow(weeks, -1, &weeks) || + uprv_mul32_overflow(7, weeks, &weeks) || + uprv_add32_overflow(date, weeks, &date)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } } - return julianDay + date; + if (uprv_add32_overflow(julianDay, date, &julianDay)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + return julianDay; } int32_t -Calendar::getDefaultMonthInYear(int32_t /*eyear*/) +Calendar::getDefaultMonthInYear(int32_t /*eyear*/, UErrorCode& /* status */) { return 0; } @@ -3492,17 +3660,28 @@ Calendar::getDefaultDayInMonth(int32_t /*eyear*/, int32_t /*month*/) } -int32_t Calendar::getLocalDOW() +int32_t Calendar::getLocalDOW(UErrorCode& status) { - // Get zero-based localized DOW, valid range 0..6. This is the DOW + if (U_FAILURE(status)) { + return 0; + } + // Get zero-based localized DOW, valid range 0..6. This is the DOW // we are looking for. int32_t dowLocal = 0; switch (resolveFields(kDOWPrecedence)) { case UCAL_DAY_OF_WEEK: - dowLocal = internalGet(UCAL_DAY_OF_WEEK) - fFirstDayOfWeek; + dowLocal = internalGet(UCAL_DAY_OF_WEEK); + if (uprv_add32_overflow(dowLocal, -fFirstDayOfWeek, &dowLocal)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } break; case UCAL_DOW_LOCAL: - dowLocal = internalGet(UCAL_DOW_LOCAL) - 1; + dowLocal = internalGet(UCAL_DOW_LOCAL); + if (uprv_add32_overflow(dowLocal, -1, &dowLocal)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } break; default: break; @@ -3514,8 +3693,11 @@ int32_t Calendar::getLocalDOW() return dowLocal; } -int32_t Calendar::handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t woy) +int32_t Calendar::handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t woy, UErrorCode& status) { + if (U_FAILURE(status)) { + return 0; + } // We have UCAL_YEAR_WOY and UCAL_WEEK_OF_YEAR - from those, determine // what year we fall in, so that other code can set it properly. // (code borrowed from computeWeekFields and handleComputeJulianDay) @@ -3525,10 +3707,21 @@ int32_t Calendar::handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t w UCalendarDateFields bestField = resolveFields(kDatePrecedence); // !! Note: if subclasses have a different table, they should override handleGetExtendedYearFromWeekFields // Now, a local DOW - int32_t dowLocal = getLocalDOW(); // 0..6 + int32_t dowLocal = getLocalDOW(status); // 0..6 + if (U_FAILURE(status)) { + return 0; + } int32_t firstDayOfWeek = getFirstDayOfWeek(); // Localized fdw - int32_t jan1Start = handleComputeMonthStart(yearWoy, 0, false); - int32_t nextJan1Start = handleComputeMonthStart(yearWoy+1, 0, false); // next year's Jan1 start + int32_t jan1Start = handleComputeMonthStart(yearWoy, 0, false, status); + int32_t yearWoyPlus1; + if (uprv_add32_overflow(yearWoy, 1, &yearWoyPlus1)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + int32_t nextJan1Start = handleComputeMonthStart(yearWoyPlus1, 0, false, status); // next year's Jan1 start + if (U_FAILURE(status)) { + return 0; + } // At this point julianDay is the 0-based day BEFORE the first day of // January 1, year 1 of the given calendar. If julianDay == 0, it @@ -3605,7 +3798,10 @@ int32_t Calendar::handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t w case UCAL_DATE: { - int32_t m = internalGetMonth(); + int32_t m = internalGetMonth(status); + if (U_FAILURE(status)) { + return 0; + } if((m == 0) && (woy >= getLeastMaximum(UCAL_WEEK_OF_YEAR))) { return yearWoy+1; // month 0, late woy = in the next year @@ -3629,15 +3825,19 @@ int32_t Calendar::handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t w } } -int32_t Calendar::handleGetMonthLength(int32_t extendedYear, int32_t month) const +int32_t Calendar::handleGetMonthLength(int32_t extendedYear, int32_t month, UErrorCode& status) const { - return handleComputeMonthStart(extendedYear, month+1, true) - - handleComputeMonthStart(extendedYear, month, true); + return handleComputeMonthStart(extendedYear, month+1, true, status) - + handleComputeMonthStart(extendedYear, month, true, status); } -int32_t Calendar::handleGetYearLength(int32_t eyear) const { - return handleComputeMonthStart(eyear+1, 0, false) - - handleComputeMonthStart(eyear, 0, false); +int32_t Calendar::handleGetYearLength(int32_t eyear) const +{ + UErrorCode status = U_ZERO_ERROR; + int32_t result = handleComputeMonthStart(eyear+1, 0, false, status) - + handleComputeMonthStart(eyear, 0, false, status); + U_ASSERT(U_SUCCESS(status)); + return result; } int32_t @@ -3646,25 +3846,33 @@ Calendar::getActualMaximum(UCalendarDateFields field, UErrorCode& status) const if (U_FAILURE(status)) { return 0; } + if (field < 0 || field >= UCAL_FIELD_COUNT) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } int32_t result; switch (field) { case UCAL_DATE: { - if(U_FAILURE(status)) return 0; Calendar *cal = clone(); - if(!cal) { status = U_MEMORY_ALLOCATION_ERROR; return 0; } + if(!cal) { + status = U_MEMORY_ALLOCATION_ERROR; + return 0; + } cal->setLenient(true); cal->prepareGetActual(field,false,status); - result = handleGetMonthLength(cal->get(UCAL_EXTENDED_YEAR, status), cal->get(UCAL_MONTH, status)); + result = handleGetMonthLength(cal->get(UCAL_EXTENDED_YEAR, status), cal->get(UCAL_MONTH, status), status); delete cal; } break; case UCAL_DAY_OF_YEAR: { - if(U_FAILURE(status)) return 0; Calendar *cal = clone(); - if(!cal) { status = U_MEMORY_ALLOCATION_ERROR; return 0; } + if(!cal) { + status = U_MEMORY_ALLOCATION_ERROR; + return 0; + } cal->setLenient(true); cal->prepareGetActual(field,false,status); result = handleGetYearLength(cal->get(UCAL_EXTENDED_YEAR, status)); @@ -3727,6 +3935,10 @@ void Calendar::prepareGetActual(UCalendarDateFields field, UBool isMinimum, UErr if (U_FAILURE(status)) { return; } + if (field < 0 || field >= UCAL_FIELD_COUNT) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } set(UCAL_MILLISECONDS_IN_DAY, 0); switch (field) { @@ -3785,6 +3997,10 @@ int32_t Calendar::getActualHelper(UCalendarDateFields field, int32_t startValue, if (U_FAILURE(status)) { return 0; } + if (field < 0 || field >= UCAL_FIELD_COUNT) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } if (startValue == endValue) { // if we know that the maximum value is always the same, just return it return startValue; @@ -3794,9 +4010,14 @@ int32_t Calendar::getActualHelper(UCalendarDateFields field, int32_t startValue, // clone the calendar so we don't mess with the real one, and set it to // accept anything for the field values - if(U_FAILURE(status)) return startValue; + if(U_FAILURE(status)) { + return startValue; + } Calendar *work = clone(); - if(!work) { status = U_MEMORY_ALLOCATION_ERROR; return startValue; } + if(!work) { + status = U_MEMORY_ALLOCATION_ERROR; + return startValue; + } // need to resolve time here, otherwise, fields set for actual limit // may cause conflict with fields previously set (but not yet resolved). @@ -3850,7 +4071,9 @@ void Calendar::setWeekData(const Locale& desiredLocale, const char *type, UErrorCode& status) { - if (U_FAILURE(status)) return; + if (U_FAILURE(status)) { + return; + } fFirstDayOfWeek = UCAL_SUNDAY; fMinimalDaysInFirstWeek = 1; @@ -3917,13 +4140,12 @@ Calendar::setWeekData(const Locale& desiredLocale, const char *type, UErrorCode& return; } - char region[ULOC_COUNTRY_CAPACITY]; - (void)ulocimp_getRegionForSupplementalData(desiredLocale.getName(), true, region, sizeof(region), &status); + CharString region = ulocimp_getRegionForSupplementalData(desiredLocale.getName(), true, status); // Read week data values from supplementalData week data UResourceBundle *rb = ures_openDirect(nullptr, "supplementalData", &status); ures_getByKey(rb, "weekData", rb, &status); - UResourceBundle *weekData = ures_getByKey(rb, region, nullptr, &status); + UResourceBundle *weekData = ures_getByKey(rb, region.data(), nullptr, &status); if (status == U_MISSING_RESOURCE_ERROR && rb != nullptr) { status = U_ZERO_ERROR; weekData = ures_getByKey(rb, "001", nullptr, &status); @@ -4044,14 +4266,17 @@ Calendar::internalSet(EDateFields field, int32_t value) internalSet((UCalendarDateFields) field, value); } -int32_t Calendar::internalGetMonth() const { +int32_t Calendar::internalGetMonth(UErrorCode& status) const { + if (U_FAILURE(status)) { + return 0; + } if (resolveFields(kMonthPrecedence) == UCAL_MONTH) { - return internalGet(UCAL_MONTH); + return internalGet(UCAL_MONTH, status); } - return internalGet(UCAL_ORDINAL_MONTH); + return internalGet(UCAL_ORDINAL_MONTH, status); } -int32_t Calendar::internalGetMonth(int32_t defaultValue) const { +int32_t Calendar::internalGetMonth(int32_t defaultValue, UErrorCode& /* status */) const { if (resolveFields(kMonthPrecedence) == UCAL_MONTH) { return internalGet(UCAL_MONTH, defaultValue); } diff --git a/contrib/libs/icu/i18n/casetrn.cpp b/contrib/libs/icu/i18n/casetrn.cpp index 2f9699ee9d..f159171e08 100644 --- a/contrib/libs/icu/i18n/casetrn.cpp +++ b/contrib/libs/icu/i18n/casetrn.cpp @@ -91,7 +91,7 @@ UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION(CaseMapTransliterator) * Constructs a transliterator. */ CaseMapTransliterator::CaseMapTransliterator(const UnicodeString &id, UCaseMapFull *map) : - Transliterator(id, 0), + Transliterator(id, nullptr), fMap(map) { // TODO test incremental mode with context-sensitive text (e.g. greek sigma) diff --git a/contrib/libs/icu/i18n/cecal.cpp b/contrib/libs/icu/i18n/cecal.cpp index 456801ee37..b550684b79 100644 --- a/contrib/libs/icu/i18n/cecal.cpp +++ b/contrib/libs/icu/i18n/cecal.cpp @@ -76,10 +76,27 @@ CECalendar::operator=(const CECalendar& right) // Calendar framework //------------------------------------------------------------------------- -int32_t -CECalendar::handleComputeMonthStart(int32_t eyear,int32_t emonth, UBool /*useMonth*/) const +int64_t +CECalendar::handleComputeMonthStart(int32_t eyear,int32_t emonth, UBool /*useMonth*/, UErrorCode& /*status*/) const { - return ceToJD(eyear, emonth, 0, getJDEpochOffset()); + int64_t year64 = eyear; + // handle month > 12, < 0 (e.g. from add/set) + if ( emonth >= 0 ) { + year64 += emonth/13; + emonth %= 13; + } else { + ++emonth; + year64 += emonth/13 - 1; + emonth = emonth%13 + 12; + } + + return ( + getJDEpochOffset() // difference from Julian epoch to 1,1,1 + + 365LL * year64 // number of days from years + + ClockMath::floorDivideInt64(year64, 4LL) // extra day of leap year + + 30 * emonth // number of days from months (months are 0-based) + - 1 // number of days for present month (1 based) + ); } int32_t @@ -88,35 +105,9 @@ CECalendar::handleGetLimit(UCalendarDateFields field, ELimitType limitType) cons return LIMITS[field][limitType]; } -UBool -CECalendar::haveDefaultCentury() const -{ - return true; -} - //------------------------------------------------------------------------- // Calendar system Conversion methods... //------------------------------------------------------------------------- -int32_t -CECalendar::ceToJD(int32_t year, int32_t month, int32_t date, int32_t jdEpochOffset) -{ - // handle month > 12, < 0 (e.g. from add/set) - if ( month >= 0 ) { - year += month/13; - month %= 13; - } else { - ++month; - year += month/13 - 1; - month = month%13 + 12; - } - return (int32_t) ( - jdEpochOffset // difference from Julian epoch to 1,1,1 - + 365 * year // number of days from years - + ClockMath::floorDivide(year, 4) // extra day of leap year - + 30 * month // number of days from months (months are 0-based) - + date - 1 // number of days for present month (1 based) - ); -} void CECalendar::jdToCE(int32_t julianDay, int32_t jdEpochOffset, int32_t& year, int32_t& month, int32_t& day) @@ -137,13 +128,17 @@ CECalendar::jdToCE(int32_t julianDay, int32_t jdEpochOffset, int32_t& year, int3 static const char* kMonthCode13 = "M13"; const char* CECalendar::getTemporalMonthCode(UErrorCode& status) const { - if (get(UCAL_MONTH, status) == 12) return kMonthCode13; + if (get(UCAL_MONTH, status) == 12) { + return kMonthCode13; + } return Calendar::getTemporalMonthCode(status); } void CECalendar::setTemporalMonthCode(const char* code, UErrorCode& status) { - if (U_FAILURE(status)) return; + if (U_FAILURE(status)) { + return; + } if (uprv_strcmp(code, kMonthCode13) == 0) { set(UCAL_MONTH, 12); set(UCAL_IS_LEAP_MONTH, 0); diff --git a/contrib/libs/icu/i18n/cecal.h b/contrib/libs/icu/i18n/cecal.h index 16f36a7976..8f634e7963 100644 --- a/contrib/libs/icu/i18n/cecal.h +++ b/contrib/libs/icu/i18n/cecal.h @@ -98,7 +98,7 @@ protected: * Return JD of start of given month/extended year * @internal */ - virtual int32_t handleComputeMonthStart(int32_t eyear, int32_t month, UBool useMonth) const override; + virtual int64_t handleComputeMonthStart(int32_t eyear, int32_t month, UBool useMonth, UErrorCode& status) const override; /** * Calculate the limit for a specified type of limit and field @@ -106,12 +106,6 @@ protected: */ virtual int32_t handleGetLimit(UCalendarDateFields field, ELimitType limitType) const override; - /** - * Returns true because Coptic/Ethiopic Calendar does have a default century - * @internal - */ - virtual UBool haveDefaultCentury() const override; - protected: /** * The Coptic and Ethiopic calendars differ only in their epochs. @@ -122,19 +116,6 @@ protected: virtual int32_t getJDEpochOffset() const = 0; /** - * Convert an Coptic/Ethiopic year, month, and day to a Julian day. - * - * @param year the extended year - * @param month the month - * @param day the day - * @param jdEpochOffset the epoch offset from Julian epoch - * @return Julian day - * @internal - */ - static int32_t ceToJD(int32_t year, int32_t month, int32_t date, - int32_t jdEpochOffset); - - /** * Convert a Julian day to an Coptic/Ethiopic year, month and day * * @param julianDay the Julian day diff --git a/contrib/libs/icu/i18n/chnsecal.cpp b/contrib/libs/icu/i18n/chnsecal.cpp index 58685632e0..7db5b4800b 100644 --- a/contrib/libs/icu/i18n/chnsecal.cpp +++ b/contrib/libs/icu/i18n/chnsecal.cpp @@ -17,12 +17,14 @@ #include "chnsecal.h" +#include <cstdint> + #if !UCONFIG_NO_FORMATTING #include "umutex.h" #include <float.h> #include "gregoimp.h" // Math -#include "astro.h" // CalendarAstronomer +#include "astro.h" // CalendarAstronomer and CalendarCache #include "unicode/simpletz.h" #include "uhash.h" #include "ucln_in.h" @@ -51,16 +53,12 @@ static void debug_chnsecal_msg(const char *pat, ...) #endif -// --- The cache -- -static icu::UMutex astroLock; -static icu::CalendarAstronomer *gChineseCalendarAstro = nullptr; - // Lazy Creation & Access synchronized by class CalendarCache with a mutex. -static icu::CalendarCache *gChineseCalendarWinterSolsticeCache = nullptr; -static icu::CalendarCache *gChineseCalendarNewYearCache = nullptr; +static icu::CalendarCache *gWinterSolsticeCache = nullptr; +static icu::CalendarCache *gNewYearCache = nullptr; -static icu::TimeZone *gChineseCalendarZoneAstroCalc = nullptr; -static icu::UInitOnce gChineseCalendarZoneAstroCalcInitOnce {}; +static icu::TimeZone *gAstronomerTimeZone = nullptr; +static icu::UInitOnce gAstronomerTimeZoneInitOnce {}; /** * The start year of the Chinese calendar, the 61st year of the reign @@ -87,23 +85,19 @@ static const int32_t SYNODIC_GAP = 25; U_CDECL_BEGIN static UBool calendar_chinese_cleanup() { - if (gChineseCalendarAstro) { - delete gChineseCalendarAstro; - gChineseCalendarAstro = nullptr; - } - if (gChineseCalendarWinterSolsticeCache) { - delete gChineseCalendarWinterSolsticeCache; - gChineseCalendarWinterSolsticeCache = nullptr; + if (gWinterSolsticeCache) { + delete gWinterSolsticeCache; + gWinterSolsticeCache = nullptr; } - if (gChineseCalendarNewYearCache) { - delete gChineseCalendarNewYearCache; - gChineseCalendarNewYearCache = nullptr; + if (gNewYearCache) { + delete gNewYearCache; + gNewYearCache = nullptr; } - if (gChineseCalendarZoneAstroCalc) { - delete gChineseCalendarZoneAstroCalc; - gChineseCalendarZoneAstroCalc = nullptr; + if (gAstronomerTimeZone) { + delete gAstronomerTimeZone; + gAstronomerTimeZone = nullptr; } - gChineseCalendarZoneAstroCalcInitOnce.reset(); + gAstronomerTimeZoneInitOnce.reset(); return true; } U_CDECL_END @@ -119,33 +113,28 @@ U_NAMESPACE_BEGIN //------------------------------------------------------------------------- +namespace { + +const TimeZone* getAstronomerTimeZone(); +int32_t newMoonNear(const TimeZone*, double, UBool); +int32_t newYear(const icu::ChineseCalendar::Setting&, int32_t); +UBool isLeapMonthBetween(const TimeZone*, int32_t, int32_t); + +} // namespace + ChineseCalendar* ChineseCalendar::clone() const { return new ChineseCalendar(*this); } ChineseCalendar::ChineseCalendar(const Locale& aLocale, UErrorCode& success) : Calendar(TimeZone::forLocaleOrDefault(aLocale), aLocale, success), - hasLeapMonthBetweenWinterSolstices(false), - fEpochYear(CHINESE_EPOCH_YEAR), - fZoneAstroCalc(getChineseCalZoneAstroCalc()) -{ - setTimeInMillis(getNow(), success); // Call this again now that the vtable is set up properly. -} - -ChineseCalendar::ChineseCalendar(const Locale& aLocale, int32_t epochYear, - const TimeZone* zoneAstroCalc, UErrorCode &success) -: Calendar(TimeZone::forLocaleOrDefault(aLocale), aLocale, success), - hasLeapMonthBetweenWinterSolstices(false), - fEpochYear(epochYear), - fZoneAstroCalc(zoneAstroCalc) + hasLeapMonthBetweenWinterSolstices(false) { setTimeInMillis(getNow(), success); // Call this again now that the vtable is set up properly. } ChineseCalendar::ChineseCalendar(const ChineseCalendar& other) : Calendar(other) { hasLeapMonthBetweenWinterSolstices = other.hasLeapMonthBetweenWinterSolstices; - fEpochYear = other.fEpochYear; - fZoneAstroCalc = other.fZoneAstroCalc; } ChineseCalendar::~ChineseCalendar() @@ -156,16 +145,20 @@ const char *ChineseCalendar::getType() const { return "chinese"; } -static void U_CALLCONV initChineseCalZoneAstroCalc() { - gChineseCalendarZoneAstroCalc = new SimpleTimeZone(CHINA_OFFSET, UNICODE_STRING_SIMPLE("CHINA_ZONE") ); +namespace { // anonymous + +static void U_CALLCONV initAstronomerTimeZone() { + gAstronomerTimeZone = new SimpleTimeZone(CHINA_OFFSET, UNICODE_STRING_SIMPLE("CHINA_ZONE") ); ucln_i18n_registerCleanup(UCLN_I18N_CHINESE_CALENDAR, calendar_chinese_cleanup); } -const TimeZone* ChineseCalendar::getChineseCalZoneAstroCalc() const { - umtx_initOnce(gChineseCalendarZoneAstroCalcInitOnce, &initChineseCalZoneAstroCalc); - return gChineseCalendarZoneAstroCalc; +const TimeZone* getAstronomerTimeZone() { + umtx_initOnce(gAstronomerTimeZoneInitOnce, &initAstronomerTimeZone); + return gAstronomerTimeZone; } +} // namespace anonymous + //------------------------------------------------------------------------- // Minimum / Maximum access functions //------------------------------------------------------------------------- @@ -220,14 +213,32 @@ int32_t ChineseCalendar::handleGetLimit(UCalendarDateFields field, ELimitType li * field as the continuous year count, depending on which is newer. * @stable ICU 2.8 */ -int32_t ChineseCalendar::handleGetExtendedYear() { +int32_t ChineseCalendar::handleGetExtendedYear(UErrorCode& status) { + if (U_FAILURE(status)) { + return 0; + } + int32_t year; if (newestStamp(UCAL_ERA, UCAL_YEAR, kUnset) <= fStamp[UCAL_EXTENDED_YEAR]) { year = internalGet(UCAL_EXTENDED_YEAR, 1); // Default to year 1 } else { - int32_t cycle = internalGet(UCAL_ERA, 1) - 1; // 0-based cycle // adjust to the instance specific epoch - year = cycle * 60 + internalGet(UCAL_YEAR, 1) - (fEpochYear - CHINESE_EPOCH_YEAR); + int32_t cycle = internalGet(UCAL_ERA, 1); + year = internalGet(UCAL_YEAR, 1); + const Setting setting = getSetting(status); + if (U_FAILURE(status)) { + return 0; + } + // Handle int32 overflow calculation for + // year = year + (cycle-1) * 60 -(fEpochYear - CHINESE_EPOCH_YEAR) + if (uprv_add32_overflow(cycle, -1, &cycle) || // 0-based cycle + uprv_mul32_overflow(cycle, 60, &cycle) || + uprv_add32_overflow(year, cycle, &year) || + uprv_add32_overflow(year, -(setting.epochYear-CHINESE_EPOCH_YEAR), + &year)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } } return year; } @@ -240,39 +251,19 @@ int32_t ChineseCalendar::handleGetExtendedYear() { * whether or not the given month is a leap month. * @stable ICU 2.8 */ -int32_t ChineseCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month) const { - int32_t thisStart = handleComputeMonthStart(extendedYear, month, true) - +int32_t ChineseCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month, UErrorCode& status) const { + const Setting setting = getSetting(status); + int32_t thisStart = handleComputeMonthStart(extendedYear, month, true, status); + if (U_FAILURE(status)) { + return 0; + } + thisStart = thisStart - kEpochStartAsJulianDay + 1; // Julian day -> local days - int32_t nextStart = newMoonNear(thisStart + SYNODIC_GAP, true); + int32_t nextStart = newMoonNear(setting.zoneAstroCalc, thisStart + SYNODIC_GAP, true); return nextStart - thisStart; } /** - * Override Calendar to compute several fields specific to the Chinese - * calendar system. These are: - * - * <ul><li>ERA - * <li>YEAR - * <li>MONTH - * <li>DAY_OF_MONTH - * <li>DAY_OF_YEAR - * <li>EXTENDED_YEAR</ul> - * - * The DAY_OF_WEEK and DOW_LOCAL fields are already set when this - * method is called. The getGregorianXxx() methods return Gregorian - * calendar equivalents for the given Julian day. - * - * <p>Compute the ChineseCalendar-specific field IS_LEAP_MONTH. - * @stable ICU 2.8 - */ -void ChineseCalendar::handleComputeFields(int32_t julianDay, UErrorCode &/*status*/) { - - computeChineseFields(julianDay - kEpochStartAsJulianDay, // local days - getGregorianYear(), getGregorianMonth(), - true); // set all fields -} - -/** * Field resolution table that incorporates IS_LEAP_MONTH. */ const UFieldResolutionTable ChineseCalendar::CHINESE_DATE_PRECEDENCE[] = @@ -309,6 +300,21 @@ const UFieldResolutionTable* ChineseCalendar::getFieldResolutionTable() const { return CHINESE_DATE_PRECEDENCE; } +namespace { + +struct MonthInfo { + int32_t month; + int32_t ordinalMonth; + int32_t thisMoon; + bool isLeapMonth; + bool hasLeapMonthBetweenWinterSolstices; +}; +struct MonthInfo computeMonthInfo( + const icu::ChineseCalendar::Setting& setting, + int32_t gyear, int32_t days); + +} // namespace + /** * Return the Julian day number of day before the first day of the * given month in the given extended year. @@ -322,50 +328,57 @@ const UFieldResolutionTable* ChineseCalendar::getFieldResolutionTable() const { * day of the given month and year * @stable ICU 2.8 */ -int32_t ChineseCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, UBool useMonth) const { - ChineseCalendar *nonConstThis = (ChineseCalendar*)this; // cast away const - +int64_t ChineseCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, UBool useMonth, UErrorCode& status) const { + if (U_FAILURE(status)) { + return 0; + } // If the month is out of range, adjust it into range, and // modify the extended year value accordingly. if (month < 0 || month > 11) { double m = month; - eyear += (int32_t)ClockMath::floorDivide(m, 12.0, &m); + if (uprv_add32_overflow(eyear, ClockMath::floorDivide(m, 12.0, &m), &eyear)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } month = (int32_t)m; } - int32_t gyear = eyear + fEpochYear - 1; // Gregorian year - int32_t theNewYear = newYear(gyear); - int32_t newMoon = newMoonNear(theNewYear + month * 29, true); - - int32_t julianDay = newMoon + kEpochStartAsJulianDay; + const Setting setting = getSetting(status); + if (U_FAILURE(status)) { + return 0; + } + int32_t gyear; + if (uprv_add32_overflow(eyear, setting.epochYear - 1, &gyear)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } - // Save fields for later restoration - int32_t saveMonth = internalGet(UCAL_MONTH); - int32_t saveOrdinalMonth = internalGet(UCAL_ORDINAL_MONTH); - int32_t saveIsLeapMonth = internalGet(UCAL_IS_LEAP_MONTH); + int32_t theNewYear = newYear(setting, gyear); + int32_t newMoon = newMoonNear(setting.zoneAstroCalc, theNewYear + month * 29, true); // Ignore IS_LEAP_MONTH field if useMonth is false - int32_t isLeapMonth = useMonth ? saveIsLeapMonth : 0; + bool isLeapMonth = false; + if (useMonth) { + isLeapMonth = internalGet(UCAL_IS_LEAP_MONTH) != 0; + } - UErrorCode status = U_ZERO_ERROR; - nonConstThis->computeGregorianFields(julianDay, status); - if (U_FAILURE(status)) - return 0; - - // This will modify the MONTH and IS_LEAP_MONTH fields (only) - nonConstThis->computeChineseFields(newMoon, getGregorianYear(), - getGregorianMonth(), false); + int32_t unusedMonth; + int32_t unusedDayOfWeek; + int32_t unusedDayOfMonth; + int32_t unusedDayOfYear; + Grego::dayToFields(newMoon, gyear, unusedMonth, unusedDayOfWeek, unusedDayOfMonth, unusedDayOfYear); - if (month != internalGet(UCAL_MONTH) || - isLeapMonth != internalGet(UCAL_IS_LEAP_MONTH)) { - newMoon = newMoonNear(newMoon + SYNODIC_GAP, true); - julianDay = newMoon + kEpochStartAsJulianDay; + struct MonthInfo monthInfo = computeMonthInfo(setting, gyear, newMoon); + if (month != monthInfo.month-1 || isLeapMonth != monthInfo.isLeapMonth) { + newMoon = newMoonNear(setting.zoneAstroCalc, newMoon + SYNODIC_GAP, true); + } + int32_t julianDay; + if (uprv_add32_overflow(newMoon-1, kEpochStartAsJulianDay, &julianDay)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; } - nonConstThis->internalSet(UCAL_MONTH, saveMonth); - nonConstThis->internalSet(UCAL_ORDINAL_MONTH, saveOrdinalMonth); - nonConstThis->internalSet(UCAL_IS_LEAP_MONTH, saveIsLeapMonth); - return julianDay - 1; + return julianDay; } @@ -383,7 +396,7 @@ void ChineseCalendar::add(UCalendarDateFields field, int32_t amount, UErrorCode& int32_t day = get(UCAL_JULIAN_DAY, status) - kEpochStartAsJulianDay; // Get local day if (U_FAILURE(status)) break; int32_t moon = day - dom + 1; // New moon - offsetMonth(moon, dom, amount); + offsetMonth(moon, dom, amount, status); } break; default: @@ -400,6 +413,66 @@ void ChineseCalendar::add(EDateFields field, int32_t amount, UErrorCode& status) add((UCalendarDateFields)field, amount, status); } +namespace { + +struct RollMonthInfo { + int32_t month; + int32_t newMoon; + int32_t thisMoon; +}; + +struct RollMonthInfo rollMonth(const TimeZone* timeZone, int32_t amount, int32_t day, int32_t month, int32_t dayOfMonth, + bool isLeapMonth, bool hasLeapMonthBetweenWinterSolstices, + UErrorCode& status) { + struct RollMonthInfo output = {0, 0, 0}; + if (U_FAILURE(status)) { + return output; + } + + output.thisMoon = day - dayOfMonth + 1; // New moon (start of this month) + + // Note throughout the following: Months 12 and 1 are never + // followed by a leap month (D&R p. 185). + + // Compute the adjusted month number m. This is zero-based + // value from 0..11 in a non-leap year, and from 0..12 in a + // leap year. + if (hasLeapMonthBetweenWinterSolstices) { // (member variable) + if (isLeapMonth) { + ++month; + } else { + // Check for a prior leap month. (In the + // following, month 0 is the first month of the + // year.) Month 0 is never followed by a leap + // month, and we know month m is not a leap month. + // moon1 will be the start of month 0 if there is + // no leap month between month 0 and month m; + // otherwise it will be the start of month 1. + int prevMoon = output.thisMoon - + (int) (CalendarAstronomer::SYNODIC_MONTH * (month - 0.5)); + prevMoon = newMoonNear(timeZone, prevMoon, true); + if (isLeapMonthBetween(timeZone, prevMoon, output.thisMoon)) { + ++month; + } + } + } + // Now do the standard roll computation on month, with the + // allowed range of 0..n-1, where n is 12 or 13. + int32_t numberOfMonths = hasLeapMonthBetweenWinterSolstices ? 13 : 12; // Months in this year + if (uprv_add32_overflow(amount, month, &amount)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return output; + } + output.newMoon = amount % numberOfMonths; + if (output.newMoon < 0) { + output.newMoon += numberOfMonths; + } + output.month = month; + return output; +} + +} // namespace + /** * Override Calendar to handle leap months properly. * @stable ICU 2.8 @@ -409,51 +482,17 @@ void ChineseCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode case UCAL_MONTH: case UCAL_ORDINAL_MONTH: if (amount != 0) { - int32_t dom = get(UCAL_DAY_OF_MONTH, status); - if (U_FAILURE(status)) break; + const Setting setting = getSetting(status); int32_t day = get(UCAL_JULIAN_DAY, status) - kEpochStartAsJulianDay; // Get local day + int32_t month = get(UCAL_MONTH, status); // 0-based month + int32_t dayOfMonth = get(UCAL_DAY_OF_MONTH, status); + bool isLeapMonth = get(UCAL_IS_LEAP_MONTH, status) == 1; if (U_FAILURE(status)) break; - int32_t moon = day - dom + 1; // New moon (start of this month) - - // Note throughout the following: Months 12 and 1 are never - // followed by a leap month (D&R p. 185). - - // Compute the adjusted month number m. This is zero-based - // value from 0..11 in a non-leap year, and from 0..12 in a - // leap year. - int32_t m = get(UCAL_MONTH, status); // 0-based month + struct RollMonthInfo r = rollMonth(setting.zoneAstroCalc, amount, + day, month, dayOfMonth, isLeapMonth, hasLeapMonthBetweenWinterSolstices, status); if (U_FAILURE(status)) break; - if (hasLeapMonthBetweenWinterSolstices) { // (member variable) - if (get(UCAL_IS_LEAP_MONTH, status) == 1) { - ++m; - } else { - // Check for a prior leap month. (In the - // following, month 0 is the first month of the - // year.) Month 0 is never followed by a leap - // month, and we know month m is not a leap month. - // moon1 will be the start of month 0 if there is - // no leap month between month 0 and month m; - // otherwise it will be the start of month 1. - int moon1 = moon - - (int) (CalendarAstronomer::SYNODIC_MONTH * (m - 0.5)); - moon1 = newMoonNear(moon1, true); - if (isLeapMonthBetween(moon1, moon)) { - ++m; - } - } - if (U_FAILURE(status)) break; - } - - // Now do the standard roll computation on m, with the - // allowed range of 0..n-1, where n is 12 or 13. - int32_t n = hasLeapMonthBetweenWinterSolstices ? 13 : 12; // Months in this year - int32_t newM = (m + amount) % n; - if (newM < 0) { - newM += n; - } - - if (newM != m) { - offsetMonth(moon, dom, newM - m); + if (r.newMoon != r.month) { + offsetMonth(r.thisMoon, dayOfMonth, r.newMoon - r.month, status); } } break; @@ -472,26 +511,28 @@ void ChineseCalendar::roll(EDateFields field, int32_t amount, UErrorCode& status // Support methods and constants //------------------------------------------------------------------ +namespace { /** * Convert local days to UTC epoch milliseconds. - * This is not an accurate conversion in that getTimezoneOffset - * takes the milliseconds in GMT (not local time). In theory, more - * accurate algorithm can be implemented but practically we do not need - * to go through that complication as long as the historical timezone - * changes did not happen around the 'tricky' new moon (new moon around - * midnight). - * + * This is not an accurate conversion in that getTimezoneOffset + * takes the milliseconds in GMT (not local time). In theory, more + * accurate algorithm can be implemented but practically we do not need + * to go through that complication as long as the historical timezone + * changes did not happen around the 'tricky' new moon (new moon around + * midnight). + * + * @param timeZone time zone for the Astro calculation. * @param days days after January 1, 1970 0:00 in the astronomical base zone * @return milliseconds after January 1, 1970 0:00 GMT */ -double ChineseCalendar::daysToMillis(double days) const { +double daysToMillis(const TimeZone* timeZone, double days) { double millis = days * (double)kOneDay; - if (fZoneAstroCalc != nullptr) { + if (timeZone != nullptr) { int32_t rawOffset, dstOffset; UErrorCode status = U_ZERO_ERROR; - fZoneAstroCalc->getOffset(millis, false, rawOffset, dstOffset, status); + timeZone->getOffset(millis, false, rawOffset, dstOffset, status); if (U_SUCCESS(status)) { - return millis - (double)(rawOffset + dstOffset); + return millis - (double)(rawOffset + dstOffset); } } return millis - (double)CHINA_OFFSET; @@ -499,16 +540,17 @@ double ChineseCalendar::daysToMillis(double days) const { /** * Convert UTC epoch milliseconds to local days. + * @param timeZone time zone for the Astro calculation. * @param millis milliseconds after January 1, 1970 0:00 GMT * @return days after January 1, 1970 0:00 in the astronomical base zone */ -double ChineseCalendar::millisToDays(double millis) const { - if (fZoneAstroCalc != nullptr) { +double millisToDays(const TimeZone* timeZone, double millis) { + if (timeZone != nullptr) { int32_t rawOffset, dstOffset; UErrorCode status = U_ZERO_ERROR; - fZoneAstroCalc->getOffset(millis, false, rawOffset, dstOffset, status); + timeZone->getOffset(millis, false, rawOffset, dstOffset, status); if (U_SUCCESS(status)) { - return ClockMath::floorDivide(millis + (double)(rawOffset + dstOffset), kOneDay); + return ClockMath::floorDivide(millis + (double)(rawOffset + dstOffset), kOneDay); } } return ClockMath::floorDivide(millis + (double)CHINA_OFFSET, kOneDay); @@ -523,34 +565,35 @@ double ChineseCalendar::millisToDays(double millis) const { * Return the major solar term on or after December 15 of the given * Gregorian year, that is, the winter solstice of the given year. * Computations are relative to Asia/Shanghai time zone. + * @param setting setting (time zone and caches) for the Astro calculation. * @param gyear a Gregorian year * @return days after January 1, 1970 0:00 Asia/Shanghai of the * winter solstice of the given year */ -int32_t ChineseCalendar::winterSolstice(int32_t gyear) const { +int32_t winterSolstice(const icu::ChineseCalendar::Setting& setting, + int32_t gyear) { + const TimeZone* timeZone = setting.zoneAstroCalc; UErrorCode status = U_ZERO_ERROR; - int32_t cacheValue = CalendarCache::get(&gChineseCalendarWinterSolsticeCache, gyear, status); + int32_t cacheValue = CalendarCache::get(setting.winterSolsticeCache, gyear, status); if (cacheValue == 0) { // In books December 15 is used, but it fails for some years // using our algorithms, e.g.: 1298 1391 1492 1553 1560. That // is, winterSolstice(1298) starts search at Dec 14 08:00:00 // PST 1298 with a final result of Dec 14 10:31:59 PST 1299. - double ms = daysToMillis(Grego::fieldsToDay(gyear, UCAL_DECEMBER, 1)); - - umtx_lock(&astroLock); - if(gChineseCalendarAstro == nullptr) { - gChineseCalendarAstro = new CalendarAstronomer(); - ucln_i18n_registerCleanup(UCLN_I18N_CHINESE_CALENDAR, calendar_chinese_cleanup); - } - gChineseCalendarAstro->setTime(ms); - UDate solarLong = gChineseCalendarAstro->getSunTime(CalendarAstronomer::WINTER_SOLSTICE(), true); - umtx_unlock(&astroLock); + double ms = daysToMillis(timeZone, Grego::fieldsToDay(gyear, UCAL_DECEMBER, 1)); // Winter solstice is 270 degrees solar longitude aka Dongzhi - cacheValue = (int32_t)millisToDays(solarLong); - CalendarCache::put(&gChineseCalendarWinterSolsticeCache, gyear, cacheValue, status); + double days = millisToDays(timeZone, + CalendarAstronomer(ms) + .getSunTime(CalendarAstronomer::WINTER_SOLSTICE(), true)); + if (days < INT32_MIN || days > INT32_MAX) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + cacheValue = (int32_t) days; + CalendarCache::put(setting.winterSolsticeCache, gyear, cacheValue, status); } if(U_FAILURE(status)) { cacheValue = 0; @@ -561,24 +604,18 @@ int32_t ChineseCalendar::winterSolstice(int32_t gyear) const { /** * Return the closest new moon to the given date, searching either * forward or backward in time. + * @param timeZone time zone for the Astro calculation. * @param days days after January 1, 1970 0:00 Asia/Shanghai * @param after if true, search for a new moon on or after the given * date; otherwise, search for a new moon before it * @return days after January 1, 1970 0:00 Asia/Shanghai of the nearest * new moon after or before <code>days</code> */ -int32_t ChineseCalendar::newMoonNear(double days, UBool after) const { - - umtx_lock(&astroLock); - if(gChineseCalendarAstro == nullptr) { - gChineseCalendarAstro = new CalendarAstronomer(); - ucln_i18n_registerCleanup(UCLN_I18N_CHINESE_CALENDAR, calendar_chinese_cleanup); - } - gChineseCalendarAstro->setTime(daysToMillis(days)); - UDate newMoon = gChineseCalendarAstro->getMoonTime(CalendarAstronomer::NEW_MOON(), after); - umtx_unlock(&astroLock); - - return (int32_t) millisToDays(newMoon); +int32_t newMoonNear(const TimeZone* timeZone, double days, UBool after) { + return (int32_t) millisToDays( + timeZone, + CalendarAstronomer(daysToMillis(timeZone, days)) + .getMoonTime(CalendarAstronomer::NEW_MOON(), after)); } /** @@ -588,7 +625,7 @@ int32_t ChineseCalendar::newMoonNear(double days, UBool after) const { * @param day2 days after January 1, 1970 0:00 Asia/Shanghai * @return the nearest integer number of months between day1 and day2 */ -int32_t ChineseCalendar::synodicMonthsBetween(int32_t day1, int32_t day2) const { +int32_t synodicMonthsBetween(int32_t day1, int32_t day2) { double roundme = ((day2 - day1) / CalendarAstronomer::SYNODIC_MONTH); return (int32_t) (roundme + (roundme >= 0 ? .5 : -.5)); } @@ -597,21 +634,13 @@ int32_t ChineseCalendar::synodicMonthsBetween(int32_t day1, int32_t day2) const * Return the major solar term on or before a given date. This * will be an integer from 1..12, with 1 corresponding to 330 degrees, * 2 to 0 degrees, 3 to 30 degrees,..., and 12 to 300 degrees. + * @param timeZone time zone for the Astro calculation. * @param days days after January 1, 1970 0:00 Asia/Shanghai */ -int32_t ChineseCalendar::majorSolarTerm(int32_t days) const { - - umtx_lock(&astroLock); - if(gChineseCalendarAstro == nullptr) { - gChineseCalendarAstro = new CalendarAstronomer(); - ucln_i18n_registerCleanup(UCLN_I18N_CHINESE_CALENDAR, calendar_chinese_cleanup); - } - gChineseCalendarAstro->setTime(daysToMillis(days)); - UDate solarLongitude = gChineseCalendarAstro->getSunLongitude(); - umtx_unlock(&astroLock); - +int32_t majorSolarTerm(const TimeZone* timeZone, int32_t days) { // Compute (floor(solarLongitude / (pi/6)) + 2) % 12 - int32_t term = ( ((int32_t)(6 * solarLongitude / CalendarAstronomer::PI)) + 2 ) % 12; + int32_t term = ( ((int32_t)(6 * CalendarAstronomer(daysToMillis(timeZone, days)) + .getSunLongitude() / CalendarAstronomer::PI)) + 2 ) % 12; if (term < 1) { term += 12; } @@ -620,12 +649,13 @@ int32_t ChineseCalendar::majorSolarTerm(int32_t days) const { /** * Return true if the given month lacks a major solar term. + * @param timeZone time zone for the Astro calculation. * @param newMoon days after January 1, 1970 0:00 Asia/Shanghai of a new * moon */ -UBool ChineseCalendar::hasNoMajorSolarTerm(int32_t newMoon) const { - return majorSolarTerm(newMoon) == - majorSolarTerm(newMoonNear(newMoon + SYNODIC_GAP, true)); +UBool hasNoMajorSolarTerm(const TimeZone* timeZone, int32_t newMoon) { + return majorSolarTerm(timeZone, newMoon) == + majorSolarTerm(timeZone, newMoonNear(timeZone, newMoon + SYNODIC_GAP, true)); } @@ -636,12 +666,13 @@ UBool ChineseCalendar::hasNoMajorSolarTerm(int32_t newMoon) const { /** * Return true if there is a leap month on or after month newMoon1 and * at or before month newMoon2. + * @param timeZone time zone for the Astro calculation. * @param newMoon1 days after January 1, 1970 0:00 astronomical base zone * of a new moon * @param newMoon2 days after January 1, 1970 0:00 astronomical base zone * of a new moon */ -UBool ChineseCalendar::isLeapMonthBetween(int32_t newMoon1, int32_t newMoon2) const { +UBool isLeapMonthBetween(const TimeZone* timeZone, int32_t newMoon1, int32_t newMoon2) { #ifdef U_DEBUG_CHNSECAL // This is only needed to debug the timeOfAngle divergence bug. @@ -653,141 +684,202 @@ UBool ChineseCalendar::isLeapMonthBetween(int32_t newMoon1, int32_t newMoon2) co } #endif - return (newMoon2 >= newMoon1) && - (isLeapMonthBetween(newMoon1, newMoonNear(newMoon2 - SYNODIC_GAP, false)) || - hasNoMajorSolarTerm(newMoon2)); + while (newMoon2 >= newMoon1) { + if (hasNoMajorSolarTerm(timeZone, newMoon2)) { + return true; + } + newMoon2 = newMoonNear(timeZone, newMoon2 - SYNODIC_GAP, false); + } + return false; } + /** - * Compute fields for the Chinese calendar system. This method can - * either set all relevant fields, as required by - * <code>handleComputeFields()</code>, or it can just set the MONTH and - * IS_LEAP_MONTH fields, as required by - * <code>handleComputeMonthStart()</code>. - * - * <p>As a side effect, this method sets {@link #hasLeapMonthBetweenWinterSolstices}. + * Compute the information about the year. + * @param setting setting (time zone and caches) for the Astro calculation. + * @param gyear the Gregorian year of the given date * @param days days after January 1, 1970 0:00 astronomical base zone * of the date to compute fields for - * @param gyear the Gregorian year of the given date - * @param gmonth the Gregorian month of the given date - * @param setAllFields if true, set the EXTENDED_YEAR, ERA, YEAR, - * DAY_OF_MONTH, and DAY_OF_YEAR fields. In either case set the MONTH - * and IS_LEAP_MONTH fields. + * @return The MonthInfo result. */ -void ChineseCalendar::computeChineseFields(int32_t days, int32_t gyear, int32_t gmonth, - UBool setAllFields) { +struct MonthInfo computeMonthInfo( + const icu::ChineseCalendar::Setting& setting, + int32_t gyear, int32_t days) { + struct MonthInfo output; // Find the winter solstices before and after the target date. // These define the boundaries of this Chinese year, specifically, // the position of month 11, which always contains the solstice. // We want solsticeBefore <= date < solsticeAfter. int32_t solsticeBefore; - int32_t solsticeAfter = winterSolstice(gyear); + int32_t solsticeAfter = winterSolstice(setting, gyear); if (days < solsticeAfter) { - solsticeBefore = winterSolstice(gyear - 1); + solsticeBefore = winterSolstice(setting, gyear - 1); } else { solsticeBefore = solsticeAfter; - solsticeAfter = winterSolstice(gyear + 1); + solsticeAfter = winterSolstice(setting, gyear + 1); } + const TimeZone* timeZone = setting.zoneAstroCalc; // Find the start of the month after month 11. This will be either // the prior month 12 or leap month 11 (very rare). Also find the // start of the following month 11. - int32_t firstMoon = newMoonNear(solsticeBefore + 1, true); - int32_t lastMoon = newMoonNear(solsticeAfter + 1, false); - int32_t thisMoon = newMoonNear(days + 1, false); // Start of this month - // Note: hasLeapMonthBetweenWinterSolstices is a member variable - hasLeapMonthBetweenWinterSolstices = synodicMonthsBetween(firstMoon, lastMoon) == 12; - - int32_t month = synodicMonthsBetween(firstMoon, thisMoon); - int32_t theNewYear = newYear(gyear); + int32_t firstMoon = newMoonNear(timeZone, solsticeBefore + 1, true); + int32_t lastMoon = newMoonNear(timeZone, solsticeAfter + 1, false); + output.thisMoon = newMoonNear(timeZone, days + 1, false); // Start of this month + output.hasLeapMonthBetweenWinterSolstices = synodicMonthsBetween(firstMoon, lastMoon) == 12; + + output.month = synodicMonthsBetween(firstMoon, output.thisMoon); + int32_t theNewYear = newYear(setting, gyear); if (days < theNewYear) { - theNewYear = newYear(gyear-1); + theNewYear = newYear(setting, gyear-1); } - if (hasLeapMonthBetweenWinterSolstices && isLeapMonthBetween(firstMoon, thisMoon)) { - month--; + if (output.hasLeapMonthBetweenWinterSolstices && + isLeapMonthBetween(timeZone, firstMoon, output.thisMoon)) { + output.month--; } - if (month < 1) { - month += 12; + if (output.month < 1) { + output.month += 12; } - int32_t ordinalMonth = synodicMonthsBetween(theNewYear, thisMoon); - if (ordinalMonth < 0) { - ordinalMonth += 12; + output.ordinalMonth = synodicMonthsBetween(theNewYear, output.thisMoon); + if (output.ordinalMonth < 0) { + output.ordinalMonth += 12; } - UBool isLeapMonth = hasLeapMonthBetweenWinterSolstices && - hasNoMajorSolarTerm(thisMoon) && - !isLeapMonthBetween(firstMoon, newMoonNear(thisMoon - SYNODIC_GAP, false)); - - internalSet(UCAL_MONTH, month-1); // Convert from 1-based to 0-based - internalSet(UCAL_ORDINAL_MONTH, ordinalMonth); // Convert from 1-based to 0-based - internalSet(UCAL_IS_LEAP_MONTH, isLeapMonth?1:0); - - - if (setAllFields) { + output.isLeapMonth = output.hasLeapMonthBetweenWinterSolstices && + hasNoMajorSolarTerm(timeZone, output.thisMoon) && + !isLeapMonthBetween(timeZone, firstMoon, + newMoonNear(timeZone, output.thisMoon - SYNODIC_GAP, false)); + return output; +} - // Extended year and cycle year is based on the epoch year - - int32_t extended_year = gyear - fEpochYear; - int cycle_year = gyear - CHINESE_EPOCH_YEAR; - if (month < 11 || - gmonth >= UCAL_JULY) { - extended_year++; - cycle_year++; - } - int32_t dayOfMonth = days - thisMoon + 1; +} // namespace - internalSet(UCAL_EXTENDED_YEAR, extended_year); +/** + * Override Calendar to compute several fields specific to the Chinese + * calendar system. These are: + * + * <ul><li>ERA + * <li>YEAR + * <li>MONTH + * <li>DAY_OF_MONTH + * <li>DAY_OF_YEAR + * <li>EXTENDED_YEAR</ul> + * + * The DAY_OF_WEEK and DOW_LOCAL fields are already set when this + * method is called. The getGregorianXxx() methods return Gregorian + * calendar equivalents for the given Julian day. + * + * <p>Compute the ChineseCalendar-specific field IS_LEAP_MONTH. + * @stable ICU 2.8 + */ +void ChineseCalendar::handleComputeFields(int32_t julianDay, UErrorCode & status) { + if (U_FAILURE(status)) { + return; + } + int32_t days; + if (uprv_add32_overflow(julianDay, -kEpochStartAsJulianDay, &days)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + int32_t gyear = getGregorianYear(); + int32_t gmonth = getGregorianMonth(); - // 0->0,60 1->1,1 60->1,60 61->2,1 etc. - int32_t yearOfCycle; - int32_t cycle = ClockMath::floorDivide(cycle_year - 1, 60, &yearOfCycle); - internalSet(UCAL_ERA, cycle + 1); - internalSet(UCAL_YEAR, yearOfCycle + 1); + const Setting setting = getSetting(status); + if (U_FAILURE(status)) { + return; + } + struct MonthInfo monthInfo = computeMonthInfo(setting, gyear, days); + hasLeapMonthBetweenWinterSolstices = monthInfo.hasLeapMonthBetweenWinterSolstices; + + // Extended year and cycle year is based on the epoch year + int32_t eyear = gyear - setting.epochYear; + int32_t cycle_year = gyear - CHINESE_EPOCH_YEAR; + if (monthInfo.month < 11 || + gmonth >= UCAL_JULY) { + eyear++; + cycle_year++; + } + int32_t dayOfMonth = days - monthInfo.thisMoon + 1; - internalSet(UCAL_DAY_OF_MONTH, dayOfMonth); + // 0->0,60 1->1,1 60->1,60 61->2,1 etc. + int32_t yearOfCycle; + int32_t cycle = ClockMath::floorDivide(cycle_year - 1, 60, &yearOfCycle); - // Days will be before the first new year we compute if this - // date is in month 11, leap 11, 12. There is never a leap 12. - // New year computations are cached so this should be cheap in - // the long run. - int32_t theNewYear = newYear(gyear); - if (days < theNewYear) { - theNewYear = newYear(gyear-1); + // Days will be before the first new year we compute if this + // date is in month 11, leap 11, 12. There is never a leap 12. + // New year computations are cached so this should be cheap in + // the long run. + int32_t theNewYear = newYear(setting, gyear); + if (days < theNewYear) { + theNewYear = newYear(setting, gyear-1); + } + cycle++; + yearOfCycle++; + int32_t dayOfYear = days - theNewYear + 1; + + int32_t minYear = this->handleGetLimit(UCAL_EXTENDED_YEAR, UCAL_LIMIT_MINIMUM); + if (eyear < minYear) { + if (!isLenient()) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; } - internalSet(UCAL_DAY_OF_YEAR, days - theNewYear + 1); + eyear = minYear; + } + int32_t maxYear = this->handleGetLimit(UCAL_EXTENDED_YEAR, UCAL_LIMIT_MAXIMUM); + if (maxYear < eyear) { + if (!isLenient()) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + eyear = maxYear; } -} + internalSet(UCAL_MONTH, monthInfo.month-1); // Convert from 1-based to 0-based + internalSet(UCAL_ORDINAL_MONTH, monthInfo.ordinalMonth); // Convert from 1-based to 0-based + internalSet(UCAL_IS_LEAP_MONTH, monthInfo.isLeapMonth?1:0); + + internalSet(UCAL_EXTENDED_YEAR, eyear); + internalSet(UCAL_ERA, cycle); + internalSet(UCAL_YEAR, yearOfCycle); + internalSet(UCAL_DAY_OF_MONTH, dayOfMonth); + internalSet(UCAL_DAY_OF_YEAR, dayOfYear); +} //------------------------------------------------------------------ // Fields to time //------------------------------------------------------------------ +namespace { + /** * Return the Chinese new year of the given Gregorian year. + * @param setting setting (time zone and caches) for the Astro calculation. * @param gyear a Gregorian year * @return days after January 1, 1970 0:00 astronomical base zone of the * Chinese new year of the given year (this will be a new moon) */ -int32_t ChineseCalendar::newYear(int32_t gyear) const { +int32_t newYear(const icu::ChineseCalendar::Setting& setting, + int32_t gyear) { + const TimeZone* timeZone = setting.zoneAstroCalc; UErrorCode status = U_ZERO_ERROR; - int32_t cacheValue = CalendarCache::get(&gChineseCalendarNewYearCache, gyear, status); + int32_t cacheValue = CalendarCache::get(setting.newYearCache, gyear, status); if (cacheValue == 0) { - int32_t solsticeBefore= winterSolstice(gyear - 1); - int32_t solsticeAfter = winterSolstice(gyear); - int32_t newMoon1 = newMoonNear(solsticeBefore + 1, true); - int32_t newMoon2 = newMoonNear(newMoon1 + SYNODIC_GAP, true); - int32_t newMoon11 = newMoonNear(solsticeAfter + 1, false); - + int32_t solsticeBefore= winterSolstice(setting, gyear - 1); + int32_t solsticeAfter = winterSolstice(setting, gyear); + int32_t newMoon1 = newMoonNear(timeZone, solsticeBefore + 1, true); + int32_t newMoon2 = newMoonNear(timeZone, newMoon1 + SYNODIC_GAP, true); + int32_t newMoon11 = newMoonNear(timeZone, solsticeAfter + 1, false); + if (synodicMonthsBetween(newMoon1, newMoon11) == 12 && - (hasNoMajorSolarTerm(newMoon1) || hasNoMajorSolarTerm(newMoon2))) { - cacheValue = newMoonNear(newMoon2 + SYNODIC_GAP, true); + (hasNoMajorSolarTerm(timeZone, newMoon1) || + hasNoMajorSolarTerm(timeZone, newMoon2))) { + cacheValue = newMoonNear(timeZone, newMoon2 + SYNODIC_GAP, true); } else { cacheValue = newMoon2; } - CalendarCache::put(&gChineseCalendarNewYearCache, gyear, cacheValue, status); + CalendarCache::put(setting.newYearCache, gyear, cacheValue, status); } if(U_FAILURE(status)) { cacheValue = 0; @@ -795,6 +887,8 @@ int32_t ChineseCalendar::newYear(int32_t gyear) const { return cacheValue; } +} // namespace + /** * Adjust this calendar to be delta months before or after a given * start position, pinning the day of month if necessary. The start @@ -802,25 +896,35 @@ int32_t ChineseCalendar::newYear(int32_t gyear) const { * and a day-of-month. Used by add() and roll(). * @param newMoon the local days of the first day of the month of the * start position (days after January 1, 1970 0:00 Asia/Shanghai) - * @param dom the 1-based day-of-month of the start position + * @param dayOfMonth the 1-based day-of-month of the start position * @param delta the number of months to move forward or backward from * the start position + * @param status The status. */ -void ChineseCalendar::offsetMonth(int32_t newMoon, int32_t dom, int32_t delta) { - UErrorCode status = U_ZERO_ERROR; +void ChineseCalendar::offsetMonth(int32_t newMoon, int32_t dayOfMonth, int32_t delta, + UErrorCode& status) { + const Setting setting = getSetting(status); + if (U_FAILURE(status)) { return; } // Move to the middle of the month before our target month. - newMoon += (int32_t) (CalendarAstronomer::SYNODIC_MONTH * (delta - 0.5)); + double value = newMoon; + value += (CalendarAstronomer::SYNODIC_MONTH * + (static_cast<double>(delta) - 0.5)); + if (value < INT32_MIN || value > INT32_MAX) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + newMoon = static_cast<int32_t>(value); // Search forward to the target month's new moon - newMoon = newMoonNear(newMoon, true); + newMoon = newMoonNear(setting.zoneAstroCalc, newMoon, true); - // Find the target dom - int32_t jd = newMoon + kEpochStartAsJulianDay - 1 + dom; + // Find the target dayOfMonth + int32_t jd = newMoon + kEpochStartAsJulianDay - 1 + dayOfMonth; - // Pin the dom. In this calendar all months are 29 or 30 days - // so pinning just means handling dom 30. - if (dom > 29) { + // Pin the dayOfMonth. In this calendar all months are 29 or 30 days + // so pinning just means handling dayOfMonth 30. + if (dayOfMonth > 29) { set(UCAL_JULIAN_DAY, jd-1); // TODO Fix this. We really shouldn't ever have to // explicitly call complete(). This is either a bug in @@ -828,7 +932,7 @@ void ChineseCalendar::offsetMonth(int32_t newMoon, int32_t dom, int32_t delta) { // Calendar.getActualMaximum(). I suspect the last. complete(status); if (U_FAILURE(status)) return; - if (getActualMaximum(UCAL_DAY_OF_MONTH, status) >= dom) { + if (getActualMaximum(UCAL_DAY_OF_MONTH, status) >= dayOfMonth) { if (U_FAILURE(status)) return; set(UCAL_JULIAN_DAY, jd); } @@ -845,7 +949,11 @@ int32_t ChineseCalendar::getRelatedYear(UErrorCode &status) const if (U_FAILURE(status)) { return 0; } - return year + kChineseRelatedYearDiff; + if (uprv_add32_overflow(year, kChineseRelatedYearDiff, &year)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + return year; } void ChineseCalendar::setRelatedYear(int32_t year) @@ -854,60 +962,7 @@ void ChineseCalendar::setRelatedYear(int32_t year) set(UCAL_EXTENDED_YEAR, year - kChineseRelatedYearDiff); } -// default century - -static UDate gSystemDefaultCenturyStart = DBL_MIN; -static int32_t gSystemDefaultCenturyStartYear = -1; -static icu::UInitOnce gSystemDefaultCenturyInitOnce {}; - - -UBool ChineseCalendar::haveDefaultCentury() const -{ - return true; -} - -UDate ChineseCalendar::defaultCenturyStart() const -{ - return internalGetDefaultCenturyStart(); -} - -int32_t ChineseCalendar::defaultCenturyStartYear() const -{ - return internalGetDefaultCenturyStartYear(); -} - -static void U_CALLCONV initializeSystemDefaultCentury() -{ - // initialize systemDefaultCentury and systemDefaultCenturyYear based - // on the current time. They'll be set to 80 years before - // the current time. - UErrorCode status = U_ZERO_ERROR; - ChineseCalendar calendar(Locale("@calendar=chinese"),status); - if (U_SUCCESS(status)) { - calendar.setTime(Calendar::getNow(), status); - calendar.add(UCAL_YEAR, -80, status); - gSystemDefaultCenturyStart = calendar.getTime(status); - gSystemDefaultCenturyStartYear = calendar.get(UCAL_YEAR, status); - } - // We have no recourse upon failure unless we want to propagate the failure - // out. -} - -UDate -ChineseCalendar::internalGetDefaultCenturyStart() const -{ - // lazy-evaluate systemDefaultCenturyStart - umtx_initOnce(gSystemDefaultCenturyInitOnce, &initializeSystemDefaultCentury); - return gSystemDefaultCenturyStart; -} - -int32_t -ChineseCalendar::internalGetDefaultCenturyStartYear() const -{ - // lazy-evaluate systemDefaultCenturyStartYear - umtx_initOnce(gSystemDefaultCenturyInitOnce, &initializeSystemDefaultCentury); - return gSystemDefaultCenturyStartYear; -} +IMPL_SYSTEM_DEFAULT_CENTURY(ChineseCalendar, "@calendar=chinese") bool ChineseCalendar::inTemporalLeapYear(UErrorCode &status) const @@ -957,7 +1012,10 @@ ChineseCalendar::setTemporalMonthCode(const char* code, UErrorCode& status ) status = U_ILLEGAL_ARGUMENT_ERROR; } -int32_t ChineseCalendar::internalGetMonth() const { +int32_t ChineseCalendar::internalGetMonth(UErrorCode& status) const { + if (U_FAILURE(status)) { + return 0; + } if (resolveFields(kMonthPrecedence) == UCAL_MONTH) { return internalGet(UCAL_MONTH); } @@ -967,23 +1025,38 @@ int32_t ChineseCalendar::internalGetMonth() const { temp->set(UCAL_DATE, 1); // Calculate the UCAL_MONTH and UCAL_IS_LEAP_MONTH by adding number of // months. - UErrorCode status = U_ZERO_ERROR; temp->roll(UCAL_MONTH, internalGet(UCAL_ORDINAL_MONTH), status); - + if (U_FAILURE(status)) { + return 0; + } ChineseCalendar *nonConstThis = (ChineseCalendar*)this; // cast away const nonConstThis->internalSet(UCAL_IS_LEAP_MONTH, temp->get(UCAL_IS_LEAP_MONTH, status)); int32_t month = temp->get(UCAL_MONTH, status); - U_ASSERT(U_SUCCESS(status)); + if (U_FAILURE(status)) { + return 0; + } nonConstThis->internalSet(UCAL_MONTH, month); return month; } -int32_t ChineseCalendar::internalGetMonth(int32_t defaultValue) const { +int32_t ChineseCalendar::internalGetMonth(int32_t defaultValue, UErrorCode& status) const { + if (U_FAILURE(status)) { + return 0; + } if (resolveFields(kMonthPrecedence) == UCAL_MONTH) { return internalGet(UCAL_MONTH, defaultValue); } - return internalGetMonth(); + return internalGetMonth(status); +} + +ChineseCalendar::Setting ChineseCalendar::getSetting(UErrorCode&) const { + return { + CHINESE_EPOCH_YEAR, + getAstronomerTimeZone(), + &gWinterSolsticeCache, + &gNewYearCache + }; } U_NAMESPACE_END diff --git a/contrib/libs/icu/i18n/chnsecal.h b/contrib/libs/icu/i18n/chnsecal.h index 9b5a629fad..41bd3557fc 100644 --- a/contrib/libs/icu/i18n/chnsecal.h +++ b/contrib/libs/icu/i18n/chnsecal.h @@ -27,6 +27,7 @@ U_NAMESPACE_BEGIN +class CalendarCache; /** * <code>ChineseCalendar</code> is a concrete subclass of {@link Calendar} * that implements a traditional Chinese calendar. The traditional Chinese @@ -75,10 +76,6 @@ U_NAMESPACE_BEGIN * <li>Dershowitz and Reingold, <i>Calendrical Calculations</i>, * Cambridge University Press, 1997</li> * - * <li>Helmer Aslaksen's - * <a href="http://www.math.nus.edu.sg/aslaksen/calendar/chinese.shtml"> - * Chinese Calendar page</a></li> - * * <li>The <a href="http://www.tondering.dk/claus/calendar.html"> * Calendar FAQ</a></li> * @@ -156,23 +153,6 @@ class U_I18N_API ChineseCalendar : public Calendar { */ virtual void setTemporalMonthCode(const char* code, UErrorCode& status) override; - protected: - - /** - * Constructs a ChineseCalendar based on the current time in the default time zone - * with the given locale, using the specified epoch year and time zone for - * astronomical calculations. - * - * @param aLocale The given locale. - * @param epochYear The epoch year to use for calculation. - * @param zoneAstroCalc The TimeZone to use for astronomical calculations. If null, - * will be set appropriately for Chinese calendar (UTC + 8:00). - * @param success Indicates the status of ChineseCalendar object construction; - * if successful, will not be changed to an error value. - * @internal - */ - ChineseCalendar(const Locale& aLocale, int32_t epochYear, const TimeZone* zoneAstroCalc, UErrorCode &success); - public: /** * Copy Constructor @@ -201,9 +181,6 @@ class U_I18N_API ChineseCalendar : public Calendar { // this value could be false for a date prior to the Winter Solstice of that // year but that year still has a leap month and therefor is a leap year. UBool hasLeapMonthBetweenWinterSolstices; - int32_t fEpochYear; // Start year of this Chinese calendar instance. - const TimeZone* fZoneAstroCalc; // Zone used for the astronomical calculation - // of this Chinese calendar instance. //---------------------------------------------------------------------- // Calendar framework @@ -211,9 +188,9 @@ class U_I18N_API ChineseCalendar : public Calendar { protected: virtual int32_t handleGetLimit(UCalendarDateFields field, ELimitType limitType) const override; - virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month) const override; - virtual int32_t handleComputeMonthStart(int32_t eyear, int32_t month, UBool useMonth) const override; - virtual int32_t handleGetExtendedYear() override; + virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month, UErrorCode& status) const override; + virtual int64_t handleComputeMonthStart(int32_t eyear, int32_t month, UBool useMonth, UErrorCode& status) const override; + virtual int32_t handleGetExtendedYear(UErrorCode& status) override; virtual void handleComputeFields(int32_t julianDay, UErrorCode &status) override; virtual const UFieldResolutionTable* getFieldResolutionTable() const override; @@ -245,19 +222,7 @@ class U_I18N_API ChineseCalendar : public Calendar { static const UFieldResolutionTable CHINESE_DATE_PRECEDENCE[]; - double daysToMillis(double days) const; - double millisToDays(double millis) const; - virtual int32_t winterSolstice(int32_t gyear) const; - virtual int32_t newMoonNear(double days, UBool after) const; - virtual int32_t synodicMonthsBetween(int32_t day1, int32_t day2) const; - virtual int32_t majorSolarTerm(int32_t days) const; - virtual UBool hasNoMajorSolarTerm(int32_t newMoon) const; - virtual UBool isLeapMonthBetween(int32_t newMoon1, int32_t newMoon2) const; - virtual void computeChineseFields(int32_t days, int32_t gyear, - int32_t gmonth, UBool setAllFields); - virtual int32_t newYear(int32_t gyear) const; - virtual void offsetMonth(int32_t newMoon, int32_t dom, int32_t delta); - const TimeZone* getChineseCalZoneAstroCalc() const; + virtual void offsetMonth(int32_t newMoon, int32_t dom, int32_t delta, UErrorCode& status); // UObject stuff public: @@ -289,46 +254,29 @@ class U_I18N_API ChineseCalendar : public Calendar { */ virtual const char * getType() const override; + struct Setting { + int32_t epochYear; + const TimeZone* zoneAstroCalc; + CalendarCache** winterSolsticeCache; + CalendarCache** newYearCache; + }; protected: - virtual int32_t internalGetMonth(int32_t defaultValue) const override; + virtual Setting getSetting(UErrorCode& status) const; + virtual int32_t internalGetMonth(int32_t defaultValue, UErrorCode& status) const override; - virtual int32_t internalGetMonth() const override; + virtual int32_t internalGetMonth(UErrorCode& status) const override; protected: - /** - * Returns true because the Islamic Calendar does have a default century - * @internal - */ - virtual UBool haveDefaultCentury() const override; - /** - * Returns the date of the start of the default century - * @return start of century - in milliseconds since epoch, 1970 - * @internal - */ - virtual UDate defaultCenturyStart() const override; - - /** - * Returns the year in which the default century begins - * @internal - */ - virtual int32_t defaultCenturyStartYear() const override; + DECLARE_OVERRIDE_SYSTEM_DEFAULT_CENTURY private: // default century stuff. - /** - * Returns the beginning date of the 100-year window that dates - * with 2-digit years are considered to fall within. - */ - UDate internalGetDefaultCenturyStart() const; - - /** - * Returns the first year of the 100-year window that dates with - * 2-digit years are considered to fall within. - */ - int32_t internalGetDefaultCenturyStartYear() const; - ChineseCalendar() = delete; // default constructor not implemented + +#ifdef __CalendarTest__ + friend void CalendarTest::TestChineseCalendarComputeMonthStart(); +#endif }; U_NAMESPACE_END diff --git a/contrib/libs/icu/i18n/coll.cpp b/contrib/libs/icu/i18n/coll.cpp index ced55c8dbf..c83b290436 100644 --- a/contrib/libs/icu/i18n/coll.cpp +++ b/contrib/libs/icu/i18n/coll.cpp @@ -261,7 +261,7 @@ static UBool isAvailableLocaleListInitialized(UErrorCode &status) { namespace { -static const struct { +const struct { const char *name; UColAttribute attr; } collAttributes[] = { @@ -274,7 +274,7 @@ static const struct { { "colNumeric", UCOL_NUMERIC_COLLATION } }; -static const struct { +const struct { const char *name; UColAttributeValue value; } collAttributeValues[] = { @@ -292,7 +292,7 @@ static const struct { { "upper", UCOL_UPPER_FIRST } }; -static const char *collReorderCodes[UCOL_REORDER_CODE_LIMIT - UCOL_REORDER_CODE_FIRST] = { +const char* collReorderCodes[UCOL_REORDER_CODE_LIMIT - UCOL_REORDER_CODE_FIRST] = { "space", "punct", "symbol", "currency", "digit" }; @@ -431,7 +431,7 @@ Collator* U_EXPORT2 Collator::createInstance(const Locale& desiredLocale, UErrorCode& status) { if (U_FAILURE(status)) - return 0; + return nullptr; if (desiredLocale.isBogus()) { // Locale constructed from malformed locale ID or language tag. status = U_ILLEGAL_ARGUMENT_ERROR; diff --git a/contrib/libs/icu/i18n/collationbuilder.cpp b/contrib/libs/icu/i18n/collationbuilder.cpp index d8fb89738c..b243992cc5 100644 --- a/contrib/libs/icu/i18n/collationbuilder.cpp +++ b/contrib/libs/icu/i18n/collationbuilder.cpp @@ -1113,12 +1113,23 @@ CollationBuilder::addWithClosure(const UnicodeString &nfdPrefix, const UnicodeSt return ce32; } +// ICU-22517 +// This constant defines a limit for the addOnlyClosure to return +// error, to avoid taking a long time for canonical closure expansion. +// Please let us know if you have a reasonable use case that needed +// for a practical Collation rule that needs to increase this limit. +// This value is needed for compiling a rule with eight Hangul syllables such as +// "&a=b쫊쫊쫊쫊쫊쫊쫊" without error, which should be more than realistic +// usage. +static constexpr int32_t kClosureLoopLimit = 3000; + uint32_t CollationBuilder::addOnlyClosure(const UnicodeString &nfdPrefix, const UnicodeString &nfdString, const int64_t newCEs[], int32_t newCEsLength, uint32_t ce32, UErrorCode &errorCode) { if(U_FAILURE(errorCode)) { return ce32; } + int32_t loop = 0; // Map from canonically equivalent input to the CEs. (But not from the all-NFD input.) if(nfdPrefix.isEmpty()) { CanonicalIterator stringIter(nfdString, errorCode); @@ -1128,6 +1139,11 @@ CollationBuilder::addOnlyClosure(const UnicodeString &nfdPrefix, const UnicodeSt UnicodeString str = stringIter.next(); if(str.isBogus()) { break; } if(ignoreString(str, errorCode) || str == nfdString) { continue; } + if (loop++ > kClosureLoopLimit) { + // To avoid hang as in ICU-22517, return with error. + errorCode = U_INPUT_TOO_LONG_ERROR; + return ce32; + } ce32 = addIfDifferent(prefix, str, newCEs, newCEsLength, ce32, errorCode); if(U_FAILURE(errorCode)) { return ce32; } } @@ -1144,6 +1160,11 @@ CollationBuilder::addOnlyClosure(const UnicodeString &nfdPrefix, const UnicodeSt UnicodeString str = stringIter.next(); if(str.isBogus()) { break; } if(ignoreString(str, errorCode) || (samePrefix && str == nfdString)) { continue; } + if (loop++ > kClosureLoopLimit) { + // To avoid hang as in ICU-22517, return with error. + errorCode = U_INPUT_TOO_LONG_ERROR; + return ce32; + } ce32 = addIfDifferent(prefix, str, newCEs, newCEsLength, ce32, errorCode); if(U_FAILURE(errorCode)) { return ce32; } } diff --git a/contrib/libs/icu/i18n/collationroot.cpp b/contrib/libs/icu/i18n/collationroot.cpp index 99686345f9..25243b34df 100644 --- a/contrib/libs/icu/i18n/collationroot.cpp +++ b/contrib/libs/icu/i18n/collationroot.cpp @@ -33,8 +33,8 @@ U_NAMESPACE_BEGIN namespace { -static const CollationCacheEntry *rootSingleton = nullptr; -static UInitOnce initOnce {}; +const CollationCacheEntry *rootSingleton = nullptr; +UInitOnce initOnce{}; } // namespace diff --git a/contrib/libs/icu/i18n/collationruleparser.cpp b/contrib/libs/icu/i18n/collationruleparser.cpp index 4cc25a1f5c..def5ea096d 100644 --- a/contrib/libs/icu/i18n/collationruleparser.cpp +++ b/contrib/libs/icu/i18n/collationruleparser.cpp @@ -34,13 +34,14 @@ #include "cstring.h" #include "patternprops.h" #include "uassert.h" +#include "ulocimp.h" #include "uvectr32.h" U_NAMESPACE_BEGIN namespace { -static const char16_t BEFORE[] = { 0x5b, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0 }; // "[before" +const char16_t BEFORE[] = { 0x5b, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0 }; // "[before" const int32_t BEFORE_LENGTH = 7; } // namespace @@ -437,7 +438,7 @@ CollationRuleParser::parseString(int32_t i, UnicodeString &raw, UErrorCode &erro namespace { -static const char *const positions[] = { +const char* const positions[] = { "first tertiary ignorable", "last tertiary ignorable", "first secondary ignorable", @@ -604,19 +605,16 @@ CollationRuleParser::parseSetting(UErrorCode &errorCode) { lang.appendInvariantChars(v, errorCode); if(errorCode == U_MEMORY_ALLOCATION_ERROR) { return; } // BCP 47 language tag -> ICU locale ID - char localeID[ULOC_FULLNAME_CAPACITY]; int32_t parsedLength; - int32_t length = uloc_forLanguageTag(lang.data(), localeID, ULOC_FULLNAME_CAPACITY, - &parsedLength, &errorCode); - if(U_FAILURE(errorCode) || - parsedLength != lang.length() || length >= ULOC_FULLNAME_CAPACITY) { + CharString localeID = ulocimp_forLanguageTag(lang.data(), -1, &parsedLength, errorCode); + if(U_FAILURE(errorCode) || parsedLength != lang.length()) { errorCode = U_ZERO_ERROR; setParseError("expected language tag in [import langTag]", errorCode); return; } // localeID minus all keywords char baseID[ULOC_FULLNAME_CAPACITY]; - length = uloc_getBaseName(localeID, baseID, ULOC_FULLNAME_CAPACITY, &errorCode); + int32_t length = uloc_getBaseName(localeID.data(), baseID, ULOC_FULLNAME_CAPACITY, &errorCode); if(U_FAILURE(errorCode) || length >= ULOC_KEYWORDS_CAPACITY) { errorCode = U_ZERO_ERROR; setParseError("expected language tag in [import langTag]", errorCode); @@ -629,11 +627,8 @@ CollationRuleParser::parseSetting(UErrorCode &errorCode) { uprv_memcpy(baseID, "und", 3); } // @collation=type, or length=0 if not specified - char collationType[ULOC_KEYWORDS_CAPACITY]; - length = uloc_getKeywordValue(localeID, "collation", - collationType, ULOC_KEYWORDS_CAPACITY, - &errorCode); - if(U_FAILURE(errorCode) || length >= ULOC_KEYWORDS_CAPACITY) { + CharString collationType = ulocimp_getKeywordValue(localeID.data(), "collation", errorCode); + if(U_FAILURE(errorCode)) { errorCode = U_ZERO_ERROR; setParseError("expected language tag in [import langTag]", errorCode); return; @@ -642,7 +637,8 @@ CollationRuleParser::parseSetting(UErrorCode &errorCode) { setParseError("[import langTag] is not supported", errorCode); } else { UnicodeString importedRules; - importer->getRules(baseID, length > 0 ? collationType : "standard", + importer->getRules(baseID, + !collationType.isEmpty() ? collationType.data() : "standard", importedRules, errorReason, errorCode); if(U_FAILURE(errorCode)) { if(errorReason == nullptr) { diff --git a/contrib/libs/icu/i18n/coptccal.cpp b/contrib/libs/icu/i18n/coptccal.cpp index a957f8f2c5..343bcbc329 100644 --- a/contrib/libs/icu/i18n/coptccal.cpp +++ b/contrib/libs/icu/i18n/coptccal.cpp @@ -11,6 +11,7 @@ #if !UCONFIG_NO_FORMATTING +#include "gregoimp.h" #include "umutex.h" #include "coptccal.h" #include "cecal.h" @@ -57,21 +58,24 @@ CopticCalendar::getType() const //------------------------------------------------------------------------- int32_t -CopticCalendar::handleGetExtendedYear() +CopticCalendar::handleGetExtendedYear(UErrorCode& status) { - int32_t eyear; + if (U_FAILURE(status)) { + return 0; + } if (newerField(UCAL_EXTENDED_YEAR, UCAL_YEAR) == UCAL_EXTENDED_YEAR) { - eyear = internalGet(UCAL_EXTENDED_YEAR, 1); // Default to year 1 - } else { - // The year defaults to the epoch start, the era to CE - int32_t era = internalGet(UCAL_ERA, CE); - if (era == BCE) { - eyear = 1 - internalGet(UCAL_YEAR, 1); // Convert to extended year - } else { - eyear = internalGet(UCAL_YEAR, 1); // Default to year 1 - } + return internalGet(UCAL_EXTENDED_YEAR, 1); // Default to year 1 + } + // The year defaults to the epoch start, the era to CE + int32_t era = internalGet(UCAL_ERA, CE); + if (era == BCE) { + return 1 - internalGet(UCAL_YEAR, 1); // Convert to extended year + } + if (era == CE){ + return internalGet(UCAL_YEAR, 1); // Default to year 1 } - return eyear; + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; } void @@ -114,45 +118,7 @@ void CopticCalendar::setRelatedYear(int32_t year) set(UCAL_EXTENDED_YEAR, year - kCopticRelatedYearDiff); } -/** - * The system maintains a static default century start date and Year. They are - * initialized the first time they are used. Once the system default century date - * and year are set, they do not change. - */ -static UDate gSystemDefaultCenturyStart = DBL_MIN; -static int32_t gSystemDefaultCenturyStartYear = -1; -static icu::UInitOnce gSystemDefaultCenturyInit {}; - - -static void U_CALLCONV initializeSystemDefaultCentury() { - UErrorCode status = U_ZERO_ERROR; - CopticCalendar calendar(Locale("@calendar=coptic"), status); - if (U_SUCCESS(status)) { - calendar.setTime(Calendar::getNow(), status); - calendar.add(UCAL_YEAR, -80, status); - gSystemDefaultCenturyStart = calendar.getTime(status); - gSystemDefaultCenturyStartYear = calendar.get(UCAL_YEAR, status); - } - // We have no recourse upon failure unless we want to propagate the failure - // out. -} - -UDate -CopticCalendar::defaultCenturyStart() const -{ - // lazy-evaluate systemDefaultCenturyStart - umtx_initOnce(gSystemDefaultCenturyInit, &initializeSystemDefaultCentury); - return gSystemDefaultCenturyStart; -} - -int32_t -CopticCalendar::defaultCenturyStartYear() const -{ - // lazy-evaluate systemDefaultCenturyStart - umtx_initOnce(gSystemDefaultCenturyInit, &initializeSystemDefaultCentury); - return gSystemDefaultCenturyStartYear; -} - +IMPL_SYSTEM_DEFAULT_CENTURY(CopticCalendar, "@calendar=coptic") int32_t CopticCalendar::getJDEpochOffset() const @@ -161,21 +127,6 @@ CopticCalendar::getJDEpochOffset() const } -#if 0 -// We do not want to introduce this API in ICU4C. -// It was accidentally introduced in ICU4J as a public API. - -//------------------------------------------------------------------------- -// Calendar system Conversion methods... -//------------------------------------------------------------------------- - -int32_t -CopticCalendar::copticToJD(int32_t year, int32_t month, int32_t day) -{ - return CECalendar::ceToJD(year, month, day, COPTIC_JD_EPOCH_OFFSET); -} -#endif - U_NAMESPACE_END #endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/contrib/libs/icu/i18n/coptccal.h b/contrib/libs/icu/i18n/coptccal.h index 396127e8ad..587bf37d0d 100644 --- a/contrib/libs/icu/i18n/coptccal.h +++ b/contrib/libs/icu/i18n/coptccal.h @@ -177,7 +177,7 @@ protected: * Return the extended year defined by the current fields. * @internal */ - virtual int32_t handleGetExtendedYear() override; + virtual int32_t handleGetExtendedYear(UErrorCode& status) override; /** * Compute fields from the JD @@ -185,18 +185,7 @@ protected: */ virtual void handleComputeFields(int32_t julianDay, UErrorCode &status) override; - /** - * Returns the date of the start of the default century - * @return start of century - in milliseconds since epoch, 1970 - * @internal - */ - virtual UDate defaultCenturyStart() const override; - - /** - * Returns the year in which the default century begins - * @internal - */ - virtual int32_t defaultCenturyStartYear() const override; + DECLARE_OVERRIDE_SYSTEM_DEFAULT_CENTURY /** * Return the date offset from Julian @@ -204,7 +193,7 @@ protected: */ virtual int32_t getJDEpochOffset() const override; - + virtual bool isEra0CountingBackward() const override { return true; } public: /** * Override Calendar Returns a unique class ID POLYMORPHICALLY. Pure virtual diff --git a/contrib/libs/icu/i18n/cpdtrans.cpp b/contrib/libs/icu/i18n/cpdtrans.cpp index 9b10364689..c419153e43 100644 --- a/contrib/libs/icu/i18n/cpdtrans.cpp +++ b/contrib/libs/icu/i18n/cpdtrans.cpp @@ -53,7 +53,7 @@ CompoundTransliterator::CompoundTransliterator( int32_t transliteratorCount, UnicodeFilter* adoptedFilter) : Transliterator(joinIDs(transliterators, transliteratorCount), adoptedFilter), - trans(0), count(0), numAnonymousRBTs(0) { + trans(nullptr), count(0), numAnonymousRBTs(0) { setTransliterators(transliterators, transliteratorCount); } @@ -70,7 +70,7 @@ CompoundTransliterator::CompoundTransliterator(const UnicodeString& id, UParseError& /*parseError*/, UErrorCode& status) : Transliterator(id, adoptedFilter), - trans(0), numAnonymousRBTs(0) { + trans(nullptr), numAnonymousRBTs(0) { // TODO add code for parseError...currently unused, but // later may be used by parsing code... init(id, direction, true, status); @@ -79,8 +79,8 @@ CompoundTransliterator::CompoundTransliterator(const UnicodeString& id, CompoundTransliterator::CompoundTransliterator(const UnicodeString& id, UParseError& /*parseError*/, UErrorCode& status) : - Transliterator(id, 0), // set filter to 0 here! - trans(0), numAnonymousRBTs(0) { + Transliterator(id, nullptr), // set filter to 0 here! + trans(nullptr), numAnonymousRBTs(0) { // TODO add code for parseError...currently unused, but // later may be used by parsing code... init(id, UTRANS_FORWARD, true, status); @@ -97,7 +97,7 @@ CompoundTransliterator::CompoundTransliterator(const UnicodeString& newID, UParseError& /*parseError*/, UErrorCode& status) : Transliterator(newID, adoptedFilter), - trans(0), numAnonymousRBTs(anonymousRBTs) + trans(nullptr), numAnonymousRBTs(anonymousRBTs) { init(list, UTRANS_FORWARD, false, status); } @@ -111,7 +111,7 @@ CompoundTransliterator::CompoundTransliterator(UVector& list, UParseError& /*parseError*/, UErrorCode& status) : Transliterator(UnicodeString(), nullptr), - trans(0), numAnonymousRBTs(0) + trans(nullptr), numAnonymousRBTs(0) { // TODO add code for parseError...currently unused, but // later may be used by parsing code... @@ -124,7 +124,7 @@ CompoundTransliterator::CompoundTransliterator(UVector& list, UParseError& /*parseError*/, UErrorCode& status) : Transliterator(UnicodeString(), nullptr), - trans(0), numAnonymousRBTs(anonymousRBTs) + trans(nullptr), numAnonymousRBTs(anonymousRBTs) { init(list, UTRANS_FORWARD, false, status); } @@ -198,13 +198,13 @@ void CompoundTransliterator::init(UVector& list, count = list.size(); trans = (Transliterator **)uprv_malloc(count * sizeof(Transliterator *)); /* test for nullptr */ - if (trans == 0) { + if (trans == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return; } } - if (U_FAILURE(status) || trans == 0) { + if (U_FAILURE(status) || trans == nullptr) { // assert(trans == 0); return; } @@ -254,7 +254,7 @@ UnicodeString CompoundTransliterator::joinIDs(Transliterator* const transliterat * Copy constructor. */ CompoundTransliterator::CompoundTransliterator(const CompoundTransliterator& t) : - Transliterator(t), trans(0), count(0), numAnonymousRBTs(-1) { + Transliterator(t), trans(nullptr), count(0), numAnonymousRBTs(-1) { *this = t; } @@ -266,13 +266,13 @@ CompoundTransliterator::~CompoundTransliterator() { } void CompoundTransliterator::freeTransliterators() { - if (trans != 0) { + if (trans != nullptr) { for (int32_t i=0; i<count; ++i) { delete trans[i]; } uprv_free(trans); } - trans = 0; + trans = nullptr; count = 0; } @@ -289,7 +289,7 @@ CompoundTransliterator& CompoundTransliterator::operator=( if (trans != nullptr) { for (i=0; i<count; ++i) { delete trans[i]; - trans[i] = 0; + trans[i] = nullptr; } } if (t.count > count) { diff --git a/contrib/libs/icu/i18n/cpdtrans.h b/contrib/libs/icu/i18n/cpdtrans.h index a27c617c95..b01c2df6ac 100644 --- a/contrib/libs/icu/i18n/cpdtrans.h +++ b/contrib/libs/icu/i18n/cpdtrans.h @@ -63,7 +63,7 @@ public: */ CompoundTransliterator(Transliterator* const transliterators[], int32_t transliteratorCount, - UnicodeFilter* adoptedFilter = 0); + UnicodeFilter* adoptedFilter = nullptr); /** * Constructs a new compound transliterator. diff --git a/contrib/libs/icu/i18n/csdetect.cpp b/contrib/libs/icu/i18n/csdetect.cpp index 16004f9f5d..1580143510 100644 --- a/contrib/libs/icu/i18n/csdetect.cpp +++ b/contrib/libs/icu/i18n/csdetect.cpp @@ -443,20 +443,20 @@ UEnumeration * CharsetDetector::getAllDetectableCharsets(UErrorCode &status) setRecognizers(status); if(U_FAILURE(status)) { - return 0; + return nullptr; } UEnumeration *en = NEW_ARRAY(UEnumeration, 1); if (en == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; - return 0; + return nullptr; } memcpy(en, &gCSDetEnumeration, sizeof(UEnumeration)); en->context = (void*)NEW_ARRAY(Context, 1); if (en->context == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; DELETE_ARRAY(en); - return 0; + return nullptr; } uprv_memset(en->context, 0, sizeof(Context)); ((Context*)en->context)->all = true; @@ -466,20 +466,20 @@ UEnumeration * CharsetDetector::getAllDetectableCharsets(UErrorCode &status) UEnumeration * CharsetDetector::getDetectableCharsets(UErrorCode &status) const { if(U_FAILURE(status)) { - return 0; + return nullptr; } UEnumeration *en = NEW_ARRAY(UEnumeration, 1); if (en == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; - return 0; + return nullptr; } memcpy(en, &gCSDetEnumeration, sizeof(UEnumeration)); en->context = (void*)NEW_ARRAY(Context, 1); if (en->context == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; DELETE_ARRAY(en); - return 0; + return nullptr; } uprv_memset(en->context, 0, sizeof(Context)); ((Context*)en->context)->all = false; diff --git a/contrib/libs/icu/i18n/csrmbcs.cpp b/contrib/libs/icu/i18n/csrmbcs.cpp index ec346b5fb3..a6bd1d3a1e 100644 --- a/contrib/libs/icu/i18n/csrmbcs.cpp +++ b/contrib/libs/icu/i18n/csrmbcs.cpp @@ -162,7 +162,7 @@ int32_t CharsetRecog_mbcs::match_mbcs(InputText *det, const uint16_t commonChars if (iter.charValue > 0xFF) { doubleByteCharCount++; - if (commonChars != 0) { + if (commonChars != nullptr) { if (binarySearch(commonChars, commonCharsLen, static_cast<uint16_t>(iter.charValue)) >= 0){ commonCharCount += 1; } @@ -205,7 +205,7 @@ int32_t CharsetRecog_mbcs::match_mbcs(InputText *det, const uint16_t commonChars return confidence; } - if (commonChars == 0) { + if (commonChars == nullptr) { // We have no statistics on frequently occurring characters. // Assess confidence purely on having a reasonable number of // multi-byte characters (the more the better) diff --git a/contrib/libs/icu/i18n/dangical.cpp b/contrib/libs/icu/i18n/dangical.cpp index 2b340ee4b4..e1cf629537 100644 --- a/contrib/libs/icu/i18n/dangical.cpp +++ b/contrib/libs/icu/i18n/dangical.cpp @@ -15,6 +15,7 @@ #if !UCONFIG_NO_FORMATTING +#include "astro.h" // CalendarCache #include "gregoimp.h" // Math #include "uassert.h" #include "ucln_in.h" @@ -23,8 +24,13 @@ #include "unicode/tzrule.h" // --- The cache -- -static icu::TimeZone *gDangiCalendarZoneAstroCalc = nullptr; -static icu::UInitOnce gDangiCalendarInitOnce {}; +// Lazy Creation & Access synchronized by class CalendarCache with a mutex. +static icu::CalendarCache *gWinterSolsticeCache = nullptr; +static icu::CalendarCache *gNewYearCache = nullptr; + +// gAstronomerTimeZone +static icu::TimeZone *gAstronomerTimeZone = nullptr; +static icu::UInitOnce gAstronomerTimeZoneInitOnce {}; /** * The start year of the Korean traditional calendar (Dan-gi) is the inaugural @@ -34,11 +40,20 @@ static const int32_t DANGI_EPOCH_YEAR = -2332; // Gregorian year U_CDECL_BEGIN static UBool calendar_dangi_cleanup() { - if (gDangiCalendarZoneAstroCalc) { - delete gDangiCalendarZoneAstroCalc; - gDangiCalendarZoneAstroCalc = nullptr; + if (gWinterSolsticeCache) { + delete gWinterSolsticeCache; + gWinterSolsticeCache = nullptr; + } + if (gNewYearCache) { + delete gNewYearCache; + gNewYearCache = nullptr; + } + + if (gAstronomerTimeZone) { + delete gAstronomerTimeZone; + gAstronomerTimeZone = nullptr; } - gDangiCalendarInitOnce.reset(); + gAstronomerTimeZoneInitOnce.reset(); return true; } U_CDECL_END @@ -51,8 +66,10 @@ U_NAMESPACE_BEGIN // Constructors... //------------------------------------------------------------------------- +const TimeZone* getAstronomerTimeZone(UErrorCode &status); + DangiCalendar::DangiCalendar(const Locale& aLocale, UErrorCode& success) -: ChineseCalendar(aLocale, DANGI_EPOCH_YEAR, getDangiCalZoneAstroCalc(success), success) +: ChineseCalendar(aLocale, success) { } @@ -103,8 +120,8 @@ const char *DangiCalendar::getType() const { * 1898-1911: GMT+8 * 1912- : GMT+9 */ -static void U_CALLCONV initDangiCalZoneAstroCalc(UErrorCode &status) { - U_ASSERT(gDangiCalendarZoneAstroCalc == nullptr); +static void U_CALLCONV initAstronomerTimeZone(UErrorCode &status) { + U_ASSERT(gAstronomerTimeZone == nullptr); const UDate millis1897[] = { (UDate)((1897 - 1970) * 365 * kOneDay) }; // some days of error is not a problem here const UDate millis1898[] = { (UDate)((1898 - 1970) * 365 * kOneDay) }; // some days of error is not a problem here const UDate millis1912[] = { (UDate)((1912 - 1970) * 365 * kOneDay) }; // this doesn't create an issue for 1911/12/20 @@ -120,25 +137,25 @@ static void U_CALLCONV initDangiCalZoneAstroCalc(UErrorCode &status) { LocalPointer<TimeZoneRule> ruleFrom1912(new TimeArrayTimeZoneRule( UnicodeString(u"Korean 1912-"), 9*kOneHour, 0, millis1912, 1, DateTimeRule::STANDARD_TIME), status); - LocalPointer<RuleBasedTimeZone> dangiCalZoneAstroCalc(new RuleBasedTimeZone( + LocalPointer<RuleBasedTimeZone> zone(new RuleBasedTimeZone( UnicodeString(u"KOREA_ZONE"), initialTimeZone.orphan()), status); // adopts initialTimeZone if (U_FAILURE(status)) { return; } - dangiCalZoneAstroCalc->addTransitionRule(rule1897.orphan(), status); // adopts rule1897 - dangiCalZoneAstroCalc->addTransitionRule(rule1898to1911.orphan(), status); - dangiCalZoneAstroCalc->addTransitionRule(ruleFrom1912.orphan(), status); - dangiCalZoneAstroCalc->complete(status); + zone->addTransitionRule(rule1897.orphan(), status); // adopts rule1897 + zone->addTransitionRule(rule1898to1911.orphan(), status); + zone->addTransitionRule(ruleFrom1912.orphan(), status); + zone->complete(status); if (U_SUCCESS(status)) { - gDangiCalendarZoneAstroCalc = dangiCalZoneAstroCalc.orphan(); + gAstronomerTimeZone = zone.orphan(); } ucln_i18n_registerCleanup(UCLN_I18N_DANGI_CALENDAR, calendar_dangi_cleanup); } -const TimeZone* DangiCalendar::getDangiCalZoneAstroCalc(UErrorCode &status) const { - umtx_initOnce(gDangiCalendarInitOnce, &initDangiCalZoneAstroCalc, status); - return gDangiCalendarZoneAstroCalc; +const TimeZone* getAstronomerTimeZone(UErrorCode &status) { + umtx_initOnce(gAstronomerTimeZoneInitOnce, &initAstronomerTimeZone, status); + return gAstronomerTimeZone; } constexpr uint32_t kDangiRelatedYearDiff = -2333; @@ -149,7 +166,11 @@ int32_t DangiCalendar::getRelatedYear(UErrorCode &status) const if (U_FAILURE(status)) { return 0; } - return year + kDangiRelatedYearDiff; + if (uprv_add32_overflow(year, kDangiRelatedYearDiff, &year)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + return year; } void DangiCalendar::setRelatedYear(int32_t year) @@ -158,6 +179,12 @@ void DangiCalendar::setRelatedYear(int32_t year) set(UCAL_EXTENDED_YEAR, year - kDangiRelatedYearDiff); } +ChineseCalendar::Setting DangiCalendar::getSetting(UErrorCode& status) const { + return { DANGI_EPOCH_YEAR, + getAstronomerTimeZone(status), + &gWinterSolsticeCache, &gNewYearCache + }; +} UOBJECT_DEFINE_RTTI_IMPLEMENTATION(DangiCalendar) diff --git a/contrib/libs/icu/i18n/dangical.h b/contrib/libs/icu/i18n/dangical.h index 3e5b0bb859..bc96be2a31 100644 --- a/contrib/libs/icu/i18n/dangical.h +++ b/contrib/libs/icu/i18n/dangical.h @@ -88,8 +88,6 @@ class DangiCalendar : public ChineseCalendar { private: - const TimeZone* getDangiCalZoneAstroCalc(UErrorCode &status) const; - // UObject stuff public: /** @@ -120,6 +118,8 @@ class DangiCalendar : public ChineseCalendar { */ const char * getType() const override; + protected: + virtual Setting getSetting(UErrorCode& status) const override; private: diff --git a/contrib/libs/icu/i18n/datefmt.cpp b/contrib/libs/icu/i18n/datefmt.cpp index 029634e3dc..c62201988f 100644 --- a/contrib/libs/icu/i18n/datefmt.cpp +++ b/contrib/libs/icu/i18n/datefmt.cpp @@ -28,6 +28,7 @@ #include "unicode/smpdtfmt.h" #include "unicode/dtptngen.h" #include "unicode/udisplaycontext.h" +#include "unicode/gregocal.h" #include "reldtfmt.h" #include "sharedobject.h" #include "unifiedcache.h" @@ -121,8 +122,8 @@ DateFmtBestPatternKey::~DateFmtBestPatternKey() { } DateFormat::DateFormat() -: fCalendar(0), - fNumberFormat(0), +: fCalendar(nullptr), + fNumberFormat(nullptr), fCapitalizationContext(UDISPCTX_CAPITALIZATION_NONE) { } @@ -131,8 +132,8 @@ DateFormat::DateFormat() DateFormat::DateFormat(const DateFormat& other) : Format(other), - fCalendar(0), - fNumberFormat(0), + fCalendar(nullptr), + fNumberFormat(nullptr), fCapitalizationContext(UDISPCTX_CAPITALIZATION_NONE) { *this = other; @@ -277,15 +278,25 @@ DateFormat::format(Calendar& /* unused cal */, UnicodeString& DateFormat::format(UDate date, UnicodeString& appendTo, FieldPosition& fieldPosition) const { if (fCalendar != nullptr) { - // Use a clone of our calendar instance - Calendar* calClone = fCalendar->clone(); - if (calClone != nullptr) { - UErrorCode ec = U_ZERO_ERROR; - calClone->setTime(date, ec); + UErrorCode ec = U_ZERO_ERROR; + const auto* calType = fCalendar->getType(); + // Avoid a heap allocation and corresponding free for the common case + if (uprv_strcmp(calType, "gregorian") == 0) { + GregorianCalendar cal(*static_cast<GregorianCalendar*>(fCalendar)); + cal.setTime(date, ec); if (U_SUCCESS(ec)) { - format(*calClone, appendTo, fieldPosition); + format(cal, appendTo, fieldPosition); + } + } else { + // Use a clone of our calendar instance + Calendar *calClone = fCalendar->clone(); + if (calClone != nullptr) { + calClone->setTime(date, ec); + if (U_SUCCESS(ec)) { + format(*calClone, appendTo, fieldPosition); + } + delete calClone; } - delete calClone; } } return appendTo; @@ -297,13 +308,24 @@ UnicodeString& DateFormat::format(UDate date, UnicodeString& appendTo, FieldPositionIterator* posIter, UErrorCode& status) const { if (fCalendar != nullptr) { - Calendar* calClone = fCalendar->clone(); - if (calClone != nullptr) { - calClone->setTime(date, status); - if (U_SUCCESS(status)) { - format(*calClone, appendTo, posIter, status); + UErrorCode ec = U_ZERO_ERROR; + const auto* calType = fCalendar->getType(); + // Avoid a heap allocation and corresponding free for the common case + if (uprv_strcmp(calType, "gregorian") == 0) { + GregorianCalendar cal(*static_cast<GregorianCalendar*>(fCalendar)); + cal.setTime(date, ec); + if (U_SUCCESS(ec)) { + format(cal, appendTo, posIter, status); + } + } else { + Calendar* calClone = fCalendar->clone(); + if (calClone != nullptr) { + calClone->setTime(date, status); + if (U_SUCCESS(status)) { + format(*calClone, appendTo, posIter, status); + } + delete calClone; } - delete calClone; } } return appendTo; @@ -430,13 +452,13 @@ DateFormat::getBestPattern( UErrorCode &status) { UnifiedCache *cache = UnifiedCache::getInstance(status); if (U_FAILURE(status)) { - return UnicodeString(); + return {}; } DateFmtBestPatternKey key(locale, skeleton, status); const DateFmtBestPattern *patternPtr = nullptr; cache->get(key, patternPtr, status); if (U_FAILURE(status)) { - return UnicodeString(); + return {}; } UnicodeString result(patternPtr->fPattern); patternPtr->removeRef(); @@ -539,7 +561,7 @@ DateFormat::create(EStyle timeStyle, EStyle dateStyle, const Locale& locale) // This should never really happen, because the preceding constructor // should always succeed. If the resource data is unavailable, a last // resort object should be returned. - return 0; + return nullptr; } //---------------------------------------------------------------------- diff --git a/contrib/libs/icu/i18n/dayperiodrules.cpp b/contrib/libs/icu/i18n/dayperiodrules.cpp index 3d9ab5bfac..ea5e51eb9d 100644 --- a/contrib/libs/icu/i18n/dayperiodrules.cpp +++ b/contrib/libs/icu/i18n/dayperiodrules.cpp @@ -18,6 +18,7 @@ #include "cstring.h" #include "ucln_in.h" #include "uhash.h" +#include "ulocimp.h" #include "umutex.h" #include "uresimp.h" @@ -342,7 +343,6 @@ const DayPeriodRules *DayPeriodRules::getInstance(const Locale &locale, UErrorCo const char *localeCode = locale.getBaseName(); char name[ULOC_FULLNAME_CAPACITY]; - char parentName[ULOC_FULLNAME_CAPACITY]; if (uprv_strlen(localeCode) < ULOC_FULLNAME_CAPACITY) { uprv_strcpy(name, localeCode); @@ -360,13 +360,12 @@ const DayPeriodRules *DayPeriodRules::getInstance(const Locale &locale, UErrorCo while (*name != '\0') { ruleSetNum = uhash_geti(data->localeToRuleSetNumMap, name); if (ruleSetNum == 0) { - // name and parentName can't be the same pointer, so fill in parent then copy to child. - uloc_getParent(name, parentName, ULOC_FULLNAME_CAPACITY, &errorCode); - if (*parentName == '\0') { + CharString parent = ulocimp_getParent(name, errorCode); + if (parent.isEmpty()) { // Saves a lookup in the hash table. break; } - uprv_strcpy(name, parentName); + parent.extract(name, UPRV_LENGTHOF(name), errorCode); } else { break; } diff --git a/contrib/libs/icu/i18n/decNumber.cpp b/contrib/libs/icu/i18n/decNumber.cpp index 42da36dc4b..e21ebfb04f 100644 --- a/contrib/libs/icu/i18n/decNumber.cpp +++ b/contrib/libs/icu/i18n/decNumber.cpp @@ -3795,7 +3795,6 @@ static void decToString(const decNumber *dn, char *string, Flag eng) { } /* cut */ } *c='\0'; /* terminate the string (all paths) */ - return; } /* decToString */ /* ------------------------------------------------------------------ */ @@ -6712,7 +6711,6 @@ static void decReverse(Unit *ulo, Unit *uhi) { *ulo=*uhi; *uhi=temp; } - return; } /* decReverse */ /* ------------------------------------------------------------------ */ @@ -7079,7 +7077,6 @@ static void decSetCoeff(decNumber *dn, decContext *set, const Unit *lsu, } /* not unit boundary */ if (*residue!=0) *status|=DEC_Inexact; /* record inexactitude */ - return; } /* decSetCoeff */ /* ------------------------------------------------------------------ */ @@ -7378,7 +7375,6 @@ static void decFinalize(decNumber *dn, decContext *set, Int *residue, } dn->exponent-=shift; /* adjust the exponent to match */ *status|=DEC_Clamped; /* and record the dirty deed */ - return; } /* decFinalize */ /* ------------------------------------------------------------------ */ @@ -7795,7 +7791,6 @@ static void decStatus(decNumber *dn, uInt status, decContext *set) { } } uprv_decContextSetStatus(set, status); /* [may not return] */ - return; } /* decStatus */ /* ------------------------------------------------------------------ */ diff --git a/contrib/libs/icu/i18n/decimfmt.cpp b/contrib/libs/icu/i18n/decimfmt.cpp index 75906991d7..36c44afe2c 100644 --- a/contrib/libs/icu/i18n/decimfmt.cpp +++ b/contrib/libs/icu/i18n/decimfmt.cpp @@ -498,7 +498,7 @@ DecimalFormat* DecimalFormat::clone() const { } bool DecimalFormat::operator==(const Format& other) const { - auto* otherDF = dynamic_cast<const DecimalFormat*>(&other); + const auto* otherDF = dynamic_cast<const DecimalFormat*>(&other); if (otherDF == nullptr) { return false; } diff --git a/contrib/libs/icu/i18n/displayoptions.cpp b/contrib/libs/icu/i18n/displayoptions.cpp index bb49e6033f..8c9dd1c478 100644 --- a/contrib/libs/icu/i18n/displayoptions.cpp +++ b/contrib/libs/icu/i18n/displayoptions.cpp @@ -11,7 +11,7 @@ U_NAMESPACE_BEGIN -DisplayOptions::Builder DisplayOptions::builder() { return DisplayOptions::Builder(); } +DisplayOptions::Builder DisplayOptions::builder() { return {}; } DisplayOptions::Builder DisplayOptions::copyToBuilder() const { return Builder(*this); } diff --git a/contrib/libs/icu/i18n/double-conversion-cached-powers.cpp b/contrib/libs/icu/i18n/double-conversion-cached-powers.cpp index 3bc35c8aaf..ad6ea92730 100644 --- a/contrib/libs/icu/i18n/double-conversion-cached-powers.cpp +++ b/contrib/libs/icu/i18n/double-conversion-cached-powers.cpp @@ -47,9 +47,7 @@ // ICU PATCH: Wrap in ICU namespace U_NAMESPACE_BEGIN -namespace double_conversion { - -namespace PowersOfTenCache { +namespace double_conversion::PowersOfTenCache { struct CachedPower { uint64_t significand; @@ -184,9 +182,7 @@ void GetCachedPowerForDecimalExponent(int requested_exponent, DOUBLE_CONVERSION_ASSERT(requested_exponent < *found_exponent + kDecimalExponentDistance); } -} // namespace PowersOfTenCache - -} // namespace double_conversion +} // namespace double_conversion::PowersOfTenCache // ICU PATCH: Close ICU namespace U_NAMESPACE_END diff --git a/contrib/libs/icu/i18n/double-conversion-cached-powers.h b/contrib/libs/icu/i18n/double-conversion-cached-powers.h index ade27baef8..78e70378d9 100644 --- a/contrib/libs/icu/i18n/double-conversion-cached-powers.h +++ b/contrib/libs/icu/i18n/double-conversion-cached-powers.h @@ -44,9 +44,7 @@ // ICU PATCH: Wrap in ICU namespace U_NAMESPACE_BEGIN -namespace double_conversion { - -namespace PowersOfTenCache { +namespace double_conversion::PowersOfTenCache { // Not all powers of ten are cached. The decimal exponent of two neighboring // cached numbers will differ by kDecimalExponentDistance. @@ -71,9 +69,7 @@ namespace PowersOfTenCache { DiyFp* power, int* found_exponent); -} // namespace PowersOfTenCache - -} // namespace double_conversion +} // namespace double_conversion::PowersOfTenCache // ICU PATCH: Close ICU namespace U_NAMESPACE_END diff --git a/contrib/libs/icu/i18n/double-conversion-double-to-string.cpp b/contrib/libs/icu/i18n/double-conversion-double-to-string.cpp index 5ee6d2b8e8..938484bca8 100644 --- a/contrib/libs/icu/i18n/double-conversion-double-to-string.cpp +++ b/contrib/libs/icu/i18n/double-conversion-double-to-string.cpp @@ -94,7 +94,14 @@ void DoubleToStringConverter::CreateExponentialRepresentation( StringBuilder* result_builder) const { DOUBLE_CONVERSION_ASSERT(length != 0); result_builder->AddCharacter(decimal_digits[0]); - if (length != 1) { + if (length == 1) { + if ((flags_ & EMIT_TRAILING_DECIMAL_POINT_IN_EXPONENTIAL) != 0) { + result_builder->AddCharacter('.'); + if ((flags_ & EMIT_TRAILING_ZERO_AFTER_POINT_IN_EXPONENTIAL) != 0) { + result_builder->AddCharacter('0'); + } + } + } else { result_builder->AddCharacter('.'); result_builder->AddSubstring(&decimal_digits[1], length-1); } diff --git a/contrib/libs/icu/i18n/double-conversion-double-to-string.h b/contrib/libs/icu/i18n/double-conversion-double-to-string.h index 9940052c64..b8cb06a8b2 100644 --- a/contrib/libs/icu/i18n/double-conversion-double-to-string.h +++ b/contrib/libs/icu/i18n/double-conversion-double-to-string.h @@ -93,7 +93,9 @@ class DoubleToStringConverter { EMIT_TRAILING_DECIMAL_POINT = 2, EMIT_TRAILING_ZERO_AFTER_POINT = 4, UNIQUE_ZERO = 8, - NO_TRAILING_ZERO = 16 + NO_TRAILING_ZERO = 16, + EMIT_TRAILING_DECIMAL_POINT_IN_EXPONENTIAL = 32, + EMIT_TRAILING_ZERO_AFTER_POINT_IN_EXPONENTIAL = 64 }; // Flags should be a bit-or combination of the possible Flags-enum. @@ -112,6 +114,13 @@ class DoubleToStringConverter { // of the result in precision mode. Matches printf's %g. // When EMIT_TRAILING_ZERO_AFTER_POINT is also given, one trailing zero is // preserved. + // - EMIT_TRAILING_DECIMAL_POINT_IN_EXPONENTIAL: when the input number has + // exactly one significant digit and is converted into exponent form then a + // trailing decimal point is appended to the significand in shortest mode + // or in precision mode with one requested digit. + // - EMIT_TRAILING_ZERO_AFTER_POINT_IN_EXPONENTIAL: in addition to a trailing + // decimal point emits a trailing '0'-character. This flag requires the + // EMIT_TRAILING_DECIMAL_POINT_IN_EXPONENTIAL flag. // // Infinity symbol and nan_symbol provide the string representation for these // special values. If the string is nullptr and the special value is encountered @@ -147,6 +156,22 @@ class DoubleToStringConverter { // ToPrecision(230.0, 2) -> "230." with EMIT_TRAILING_DECIMAL_POINT. // ToPrecision(230.0, 2) -> "2.3e2" with EMIT_TRAILING_ZERO_AFTER_POINT. // + // When converting numbers with exactly one significant digit to exponent + // form in shortest mode or in precision mode with one requested digit, the + // EMIT_TRAILING_DECIMAL_POINT and EMIT_TRAILING_ZERO_AFTER_POINT flags have + // no effect. Use the EMIT_TRAILING_DECIMAL_POINT_IN_EXPONENTIAL flag to + // append a decimal point in this case and the + // EMIT_TRAILING_ZERO_AFTER_POINT_IN_EXPONENTIAL flag to also append a + // '0'-character in this case. + // Example with decimal_in_shortest_low = 0: + // ToShortest(0.0009) -> "9e-4" + // with EMIT_TRAILING_DECIMAL_POINT_IN_EXPONENTIAL deactivated. + // ToShortest(0.0009) -> "9.e-4" + // with EMIT_TRAILING_DECIMAL_POINT_IN_EXPONENTIAL activated. + // ToShortest(0.0009) -> "9.0e-4" + // with EMIT_TRAILING_DECIMAL_POINT_IN_EXPONENTIAL activated and + // EMIT_TRAILING_ZERO_AFTER_POINT_IN_EXPONENTIAL activated. + // // The min_exponent_width is used for exponential representations. // The converter adds leading '0's to the exponent until the exponent // is at least min_exponent_width digits long. diff --git a/contrib/libs/icu/i18n/dtfmtsym.cpp b/contrib/libs/icu/i18n/dtfmtsym.cpp index 943f6e21d2..5d770eada4 100644 --- a/contrib/libs/icu/i18n/dtfmtsym.cpp +++ b/contrib/libs/icu/i18n/dtfmtsym.cpp @@ -86,6 +86,33 @@ static const char16_t gPatternChars[] = { 0 }; +/** + * Map of each ASCII character to its corresponding index in the table above if + * it is a pattern character and -1 otherwise. + */ +static const int8_t gLookupPatternChars[] = { + -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, +#if UDAT_HAS_PATTERN_CHAR_FOR_TIME_SEPARATOR + // 0 1 2 3 4 5 6 7 8 9 : ; < = > ? + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 37, -1, -1, -1, -1, -1, +#else + // 0 1 2 3 4 5 6 7 8 9 : ; < = > ? + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, +#endif + // @ A B C D E F G H I J K L M N O + -1, 22, 36, -1, 10, 9, 11, 0, 5, -1, -1, 16, 26, 2, -1, 31, + // P Q R S T U V W X Y Z [ \ ] ^ _ + -1, 27, -1, 8, -1, 30, 29, 13, 32, 18, 23, -1, -1, -1, -1, -1, + // ` a b c d e f g h i j k l m n o + -1, 14, 35, 25, 3, 19, -1, 21, 15, -1, -1, 4, -1, 6, -1, -1, + // p q r s t u v w x y z { | } ~ + -1, 28, 34, 7, -1, 20, 24, 12, 33, 1, 17, -1, -1, -1, -1, -1 +}; + //------------------------------------------------------ // Strings of last resort. These are only used if we have no resource // files. They aren't designed for actual use, just for backup. @@ -891,9 +918,7 @@ DateFormatSymbols::setYearNames(const UnicodeString* yearNames, int32_t count, DtContextType context, DtWidthType width) { if (context == FORMAT && width == ABBREVIATED) { - if (fShortYearNames) { - delete[] fShortYearNames; - } + delete[] fShortYearNames; fShortYearNames = newUnicodeStringArray(count); uprv_arrayCopy(yearNames, fShortYearNames, count); fShortYearNamesCount = count; @@ -913,9 +938,7 @@ DateFormatSymbols::setZodiacNames(const UnicodeString* zodiacNames, int32_t coun DtContextType context, DtWidthType width) { if (context == FORMAT && width == ABBREVIATED) { - if (fShortZodiacNames) { - delete[] fShortZodiacNames; - } + delete[] fShortZodiacNames; fShortZodiacNames = newUnicodeStringArray(count); uprv_arrayCopy(zodiacNames, fShortZodiacNames, count); fShortZodiacNamesCount = count; @@ -928,8 +951,7 @@ void DateFormatSymbols::setEras(const UnicodeString* erasArray, int32_t count) { // delete the old list if we own it - if (fEras) - delete[] fEras; + delete[] fEras; // we always own the new list, which we create here (we duplicate rather // than adopting the list passed in) @@ -942,8 +964,7 @@ void DateFormatSymbols::setEraNames(const UnicodeString* eraNamesArray, int32_t count) { // delete the old list if we own it - if (fEraNames) - delete[] fEraNames; + delete[] fEraNames; // we always own the new list, which we create here (we duplicate rather // than adopting the list passed in) @@ -956,8 +977,7 @@ void DateFormatSymbols::setNarrowEras(const UnicodeString* narrowErasArray, int32_t count) { // delete the old list if we own it - if (fNarrowEras) - delete[] fNarrowEras; + delete[] fNarrowEras; // we always own the new list, which we create here (we duplicate rather // than adopting the list passed in) @@ -970,8 +990,7 @@ void DateFormatSymbols::setMonths(const UnicodeString* monthsArray, int32_t count) { // delete the old list if we own it - if (fMonths) - delete[] fMonths; + delete[] fMonths; // we always own the new list, which we create here (we duplicate rather // than adopting the list passed in) @@ -984,8 +1003,7 @@ void DateFormatSymbols::setShortMonths(const UnicodeString* shortMonthsArray, int32_t count) { // delete the old list if we own it - if (fShortMonths) - delete[] fShortMonths; + delete[] fShortMonths; // we always own the new list, which we create here (we duplicate rather // than adopting the list passed in) @@ -1005,22 +1023,19 @@ DateFormatSymbols::setMonths(const UnicodeString* monthsArray, int32_t count, Dt case FORMAT : switch (width) { case WIDE : - if (fMonths) - delete[] fMonths; + delete[] fMonths; fMonths = newUnicodeStringArray(count); uprv_arrayCopy( monthsArray,fMonths,count); fMonthsCount = count; break; case ABBREVIATED : - if (fShortMonths) - delete[] fShortMonths; + delete[] fShortMonths; fShortMonths = newUnicodeStringArray(count); uprv_arrayCopy( monthsArray,fShortMonths,count); fShortMonthsCount = count; break; case NARROW : - if (fNarrowMonths) - delete[] fNarrowMonths; + delete[] fNarrowMonths; fNarrowMonths = newUnicodeStringArray(count); uprv_arrayCopy( monthsArray,fNarrowMonths,count); fNarrowMonthsCount = count; @@ -1032,22 +1047,19 @@ DateFormatSymbols::setMonths(const UnicodeString* monthsArray, int32_t count, Dt case STANDALONE : switch (width) { case WIDE : - if (fStandaloneMonths) - delete[] fStandaloneMonths; + delete[] fStandaloneMonths; fStandaloneMonths = newUnicodeStringArray(count); uprv_arrayCopy( monthsArray,fStandaloneMonths,count); fStandaloneMonthsCount = count; break; case ABBREVIATED : - if (fStandaloneShortMonths) - delete[] fStandaloneShortMonths; + delete[] fStandaloneShortMonths; fStandaloneShortMonths = newUnicodeStringArray(count); uprv_arrayCopy( monthsArray,fStandaloneShortMonths,count); fStandaloneShortMonthsCount = count; break; case NARROW : - if (fStandaloneNarrowMonths) - delete[] fStandaloneNarrowMonths; + delete[] fStandaloneNarrowMonths; fStandaloneNarrowMonths = newUnicodeStringArray(count); uprv_arrayCopy( monthsArray,fStandaloneNarrowMonths,count); fStandaloneNarrowMonthsCount = count; @@ -1064,8 +1076,7 @@ DateFormatSymbols::setMonths(const UnicodeString* monthsArray, int32_t count, Dt void DateFormatSymbols::setWeekdays(const UnicodeString* weekdaysArray, int32_t count) { // delete the old list if we own it - if (fWeekdays) - delete[] fWeekdays; + delete[] fWeekdays; // we always own the new list, which we create here (we duplicate rather // than adopting the list passed in) @@ -1078,8 +1089,7 @@ void DateFormatSymbols::setShortWeekdays(const UnicodeString* shortWeekdaysArray, int32_t count) { // delete the old list if we own it - if (fShortWeekdays) - delete[] fShortWeekdays; + delete[] fShortWeekdays; // we always own the new list, which we create here (we duplicate rather // than adopting the list passed in) @@ -1099,29 +1109,25 @@ DateFormatSymbols::setWeekdays(const UnicodeString* weekdaysArray, int32_t count case FORMAT : switch (width) { case WIDE : - if (fWeekdays) - delete[] fWeekdays; + delete[] fWeekdays; fWeekdays = newUnicodeStringArray(count); uprv_arrayCopy(weekdaysArray, fWeekdays, count); fWeekdaysCount = count; break; case ABBREVIATED : - if (fShortWeekdays) - delete[] fShortWeekdays; + delete[] fShortWeekdays; fShortWeekdays = newUnicodeStringArray(count); uprv_arrayCopy(weekdaysArray, fShortWeekdays, count); fShortWeekdaysCount = count; break; case SHORT : - if (fShorterWeekdays) - delete[] fShorterWeekdays; + delete[] fShorterWeekdays; fShorterWeekdays = newUnicodeStringArray(count); uprv_arrayCopy(weekdaysArray, fShorterWeekdays, count); fShorterWeekdaysCount = count; break; case NARROW : - if (fNarrowWeekdays) - delete[] fNarrowWeekdays; + delete[] fNarrowWeekdays; fNarrowWeekdays = newUnicodeStringArray(count); uprv_arrayCopy(weekdaysArray, fNarrowWeekdays, count); fNarrowWeekdaysCount = count; @@ -1133,29 +1139,25 @@ DateFormatSymbols::setWeekdays(const UnicodeString* weekdaysArray, int32_t count case STANDALONE : switch (width) { case WIDE : - if (fStandaloneWeekdays) - delete[] fStandaloneWeekdays; + delete[] fStandaloneWeekdays; fStandaloneWeekdays = newUnicodeStringArray(count); uprv_arrayCopy(weekdaysArray, fStandaloneWeekdays, count); fStandaloneWeekdaysCount = count; break; case ABBREVIATED : - if (fStandaloneShortWeekdays) - delete[] fStandaloneShortWeekdays; + delete[] fStandaloneShortWeekdays; fStandaloneShortWeekdays = newUnicodeStringArray(count); uprv_arrayCopy(weekdaysArray, fStandaloneShortWeekdays, count); fStandaloneShortWeekdaysCount = count; break; case SHORT : - if (fStandaloneShorterWeekdays) - delete[] fStandaloneShorterWeekdays; + delete[] fStandaloneShorterWeekdays; fStandaloneShorterWeekdays = newUnicodeStringArray(count); uprv_arrayCopy(weekdaysArray, fStandaloneShorterWeekdays, count); fStandaloneShorterWeekdaysCount = count; break; case NARROW : - if (fStandaloneNarrowWeekdays) - delete[] fStandaloneNarrowWeekdays; + delete[] fStandaloneNarrowWeekdays; fStandaloneNarrowWeekdays = newUnicodeStringArray(count); uprv_arrayCopy(weekdaysArray, fStandaloneNarrowWeekdays, count); fStandaloneNarrowWeekdaysCount = count; @@ -1180,22 +1182,19 @@ DateFormatSymbols::setQuarters(const UnicodeString* quartersArray, int32_t count case FORMAT : switch (width) { case WIDE : - if (fQuarters) - delete[] fQuarters; + delete[] fQuarters; fQuarters = newUnicodeStringArray(count); uprv_arrayCopy( quartersArray,fQuarters,count); fQuartersCount = count; break; case ABBREVIATED : - if (fShortQuarters) - delete[] fShortQuarters; + delete[] fShortQuarters; fShortQuarters = newUnicodeStringArray(count); uprv_arrayCopy( quartersArray,fShortQuarters,count); fShortQuartersCount = count; break; case NARROW : - if (fNarrowQuarters) - delete[] fNarrowQuarters; + delete[] fNarrowQuarters; fNarrowQuarters = newUnicodeStringArray(count); uprv_arrayCopy( quartersArray,fNarrowQuarters,count); fNarrowQuartersCount = count; @@ -1207,22 +1206,19 @@ DateFormatSymbols::setQuarters(const UnicodeString* quartersArray, int32_t count case STANDALONE : switch (width) { case WIDE : - if (fStandaloneQuarters) - delete[] fStandaloneQuarters; + delete[] fStandaloneQuarters; fStandaloneQuarters = newUnicodeStringArray(count); uprv_arrayCopy( quartersArray,fStandaloneQuarters,count); fStandaloneQuartersCount = count; break; case ABBREVIATED : - if (fStandaloneShortQuarters) - delete[] fStandaloneShortQuarters; + delete[] fStandaloneShortQuarters; fStandaloneShortQuarters = newUnicodeStringArray(count); uprv_arrayCopy( quartersArray,fStandaloneShortQuarters,count); fStandaloneShortQuartersCount = count; break; case NARROW : - if (fStandaloneNarrowQuarters) - delete[] fStandaloneNarrowQuarters; + delete[] fStandaloneNarrowQuarters; fStandaloneNarrowQuarters = newUnicodeStringArray(count); uprv_arrayCopy( quartersArray,fStandaloneNarrowQuarters,count); fStandaloneNarrowQuartersCount = count; @@ -1240,7 +1236,7 @@ void DateFormatSymbols::setAmPmStrings(const UnicodeString* amPmsArray, int32_t count) { // delete the old list if we own it - if (fAmPms) delete[] fAmPms; + delete[] fAmPms; // we always own the new list, which we create here (we duplicate rather // than adopting the list passed in) @@ -1326,7 +1322,7 @@ DateFormatSymbols::initZoneStringsArray() { UDate now = Calendar::getNow(); UnicodeString tzDispName; - while ((tzid = tzids->snext(status)) != 0) { + while ((tzid = tzids->snext(status)) != nullptr) { if (U_FAILURE(status)) { break; } @@ -1356,12 +1352,8 @@ DateFormatSymbols::initZoneStringsArray() { } } - if (tzNames) { - delete tzNames; - } - if (tzids) { - delete tzids; - } + delete tzNames; + delete tzids; fLocaleZoneStrings = zarray; fZoneStringsRowCount = rows; @@ -1391,12 +1383,11 @@ DateFormatSymbols::getPatternUChars() UDateFormatField U_EXPORT2 DateFormatSymbols::getPatternCharIndex(char16_t c) { - const char16_t *p = u_strchr(gPatternChars, c); - if (p == nullptr) { + if (c >= UPRV_LENGTHOF(gLookupPatternChars)) { return UDAT_FIELD_COUNT; - } else { - return static_cast<UDateFormatField>(p - gPatternChars); } + const auto idx = gLookupPatternChars[c]; + return idx == -1 ? UDAT_FIELD_COUNT : static_cast<UDateFormatField>(idx); } static const uint64_t kNumericFieldsAlways = @@ -1463,35 +1454,35 @@ DateFormatSymbols::setLocalPatternChars(const UnicodeString& newLocalPatternChar namespace { // Constants declarations -static const char16_t kCalendarAliasPrefixUChar[] = { +const char16_t kCalendarAliasPrefixUChar[] = { SOLIDUS, CAP_L, CAP_O, CAP_C, CAP_A, CAP_L, CAP_E, SOLIDUS, LOW_C, LOW_A, LOW_L, LOW_E, LOW_N, LOW_D, LOW_A, LOW_R, SOLIDUS }; -static const char16_t kGregorianTagUChar[] = { +const char16_t kGregorianTagUChar[] = { LOW_G, LOW_R, LOW_E, LOW_G, LOW_O, LOW_R, LOW_I, LOW_A, LOW_N }; -static const char16_t kVariantTagUChar[] = { +const char16_t kVariantTagUChar[] = { PERCENT, LOW_V, LOW_A, LOW_R, LOW_I, LOW_A, LOW_N, LOW_T }; -static const char16_t kLeapTagUChar[] = { +const char16_t kLeapTagUChar[] = { LOW_L, LOW_E, LOW_A, LOW_P }; -static const char16_t kCyclicNameSetsTagUChar[] = { +const char16_t kCyclicNameSetsTagUChar[] = { LOW_C, LOW_Y, LOW_C, LOW_L, LOW_I, LOW_C, CAP_N, LOW_A, LOW_M, LOW_E, CAP_S, LOW_E, LOW_T, LOW_S }; -static const char16_t kYearsTagUChar[] = { +const char16_t kYearsTagUChar[] = { SOLIDUS, LOW_Y, LOW_E, LOW_A, LOW_R, LOW_S }; -static const char16_t kZodiacsUChar[] = { +const char16_t kZodiacsUChar[] = { SOLIDUS, LOW_Z, LOW_O, LOW_D, LOW_I, LOW_A, LOW_C, LOW_S }; -static const char16_t kDayPartsTagUChar[] = { +const char16_t kDayPartsTagUChar[] = { SOLIDUS, LOW_D, LOW_A, LOW_Y, CAP_P, LOW_A, LOW_R, LOW_T, LOW_S }; -static const char16_t kFormatTagUChar[] = { +const char16_t kFormatTagUChar[] = { SOLIDUS, LOW_F, LOW_O, LOW_R, LOW_M, LOW_A, LOW_T }; -static const char16_t kAbbrTagUChar[] = { +const char16_t kAbbrTagUChar[] = { SOLIDUS, LOW_A, LOW_B, LOW_B, LOW_R, LOW_E, LOW_V, LOW_I, LOW_A, LOW_T, LOW_E, LOW_D }; @@ -2111,8 +2102,8 @@ DateFormatSymbols::initializeData(const Locale& locale, const char *type, UError // Create a CalendarDataSink to process this data and the resource bundles CalendarDataSink calendarSink(status); - UResourceBundle *rb = ures_open(nullptr, locale.getBaseName(), &status); - UResourceBundle *cb = ures_getByKey(rb, gCalendarTag, nullptr, &status); + LocalUResourceBundlePointer rb(ures_open(nullptr, locale.getBaseName(), &status)); + LocalUResourceBundlePointer cb(ures_getByKey(rb.getAlias(), gCalendarTag, nullptr, &status)); if (U_FAILURE(status)) return; @@ -2126,9 +2117,8 @@ DateFormatSymbols::initializeData(const Locale& locale, const char *type, UError // Enumerate this calendar type. If the calendar is not found fallback to gregorian UErrorCode oldStatus = status; - UResourceBundle *ctb = ures_getByKeyWithFallback(cb, calendarTypeCArray, nullptr, &status); + LocalUResourceBundlePointer ctb(ures_getByKeyWithFallback(cb.getAlias(), calendarTypeCArray, nullptr, &status)); if (status == U_MISSING_RESOURCE_ERROR) { - ures_close(ctb); if (uprv_strcmp(calendarTypeCArray, gGregorianTag) != 0) { calendarType.setTo(false, kGregorianTagUChar, UPRV_LENGTHOF(kGregorianTagUChar)); calendarSink.visitAllResources(); @@ -2139,8 +2129,7 @@ DateFormatSymbols::initializeData(const Locale& locale, const char *type, UError } calendarSink.preEnumerate(calendarType); - ures_getAllItemsWithFallback(ctb, "", calendarSink, status); - ures_close(ctb); + ures_getAllItemsWithFallback(ctb.getAlias(), "", calendarSink, status); if (U_FAILURE(status)) break; // Stop loading when gregorian was loaded @@ -2211,15 +2200,16 @@ DateFormatSymbols::initializeData(const Locale& locale, const char *type, UError // Load context transforms and capitalization tempStatus = U_ZERO_ERROR; - UResourceBundle *localeBundle = ures_open(nullptr, locale.getName(), &tempStatus); + LocalUResourceBundlePointer localeBundle(ures_open(nullptr, locale.getName(), &tempStatus)); if (U_SUCCESS(tempStatus)) { - UResourceBundle *contextTransforms = ures_getByKeyWithFallback(localeBundle, gContextTransformsTag, nullptr, &tempStatus); + LocalUResourceBundlePointer contextTransforms(ures_getByKeyWithFallback(localeBundle.getAlias(), gContextTransformsTag, nullptr, &tempStatus)); if (U_SUCCESS(tempStatus)) { - UResourceBundle *contextTransformUsage; - while ( (contextTransformUsage = ures_getNextResource(contextTransforms, nullptr, &tempStatus)) != nullptr ) { - const int32_t * intVector = ures_getIntVector(contextTransformUsage, &len, &status); + for (LocalUResourceBundlePointer contextTransformUsage; + contextTransformUsage.adoptInstead(ures_getNextResource(contextTransforms.getAlias(), nullptr, &tempStatus)), + contextTransformUsage.isValid();) { + const int32_t * intVector = ures_getIntVector(contextTransformUsage.getAlias(), &len, &status); if (U_SUCCESS(tempStatus) && intVector != nullptr && len >= 2) { - const char* usageType = ures_getKey(contextTransformUsage); + const char* usageType = ures_getKey(contextTransformUsage.getAlias()); if (usageType != nullptr) { const ContextUsageTypeNameToEnumValue * typeMapPtr = contextUsageTypeMap; int32_t compResult = 0; @@ -2234,9 +2224,7 @@ DateFormatSymbols::initializeData(const Locale& locale, const char *type, UError } } tempStatus = U_ZERO_ERROR; - ures_close(contextTransformUsage); } - ures_close(contextTransforms); } tempStatus = U_ZERO_ERROR; @@ -2247,7 +2235,7 @@ DateFormatSymbols::initializeData(const Locale& locale, const char *type, UError // do nothing unless U_SUCCESS(tempStatus), so it's only necessary // to check for errors once after all calls are made. const LocalUResourceBundlePointer numberElementsData(ures_getByKeyWithFallback( - localeBundle, gNumberElementsTag, nullptr, &tempStatus)); + localeBundle.getAlias(), gNumberElementsTag, nullptr, &tempStatus)); const LocalUResourceBundlePointer nsNameData(ures_getByKeyWithFallback( numberElementsData.getAlias(), numberingSystem->getName(), nullptr, &tempStatus)); const LocalUResourceBundlePointer symbolsData(ures_getByKeyWithFallback( @@ -2259,7 +2247,6 @@ DateFormatSymbols::initializeData(const Locale& locale, const char *type, UError } } - ures_close(localeBundle); } if (fTimeSeparator.isBogus()) { @@ -2314,8 +2301,8 @@ DateFormatSymbols::initializeData(const Locale& locale, const char *type, UError // if we make it to here, the resource data is cool, and we can get everything out // of it that we need except for the time-zone and localized-pattern data, which // are stored in a separate file - locBased.setLocaleIDs(ures_getLocaleByType(cb, ULOC_VALID_LOCALE, &status), - ures_getLocaleByType(cb, ULOC_ACTUAL_LOCALE, &status)); + locBased.setLocaleIDs(ures_getLocaleByType(cb.getAlias(), ULOC_VALID_LOCALE, &status), + ures_getLocaleByType(cb.getAlias(), ULOC_ACTUAL_LOCALE, &status)); // Load eras initField(&fEras, fErasCount, calendarSink, buildResourcePath(path, gErasTag, gNamesAbbrTag, status), status); @@ -2537,10 +2524,6 @@ DateFormatSymbols::initializeData(const Locale& locale, const char *type, UError fLocalPatternChars.setTo(true, gPatternChars, PATTERN_CHARS_LEN); } } - - // Close resources - ures_close(cb); - ures_close(rb); } Locale diff --git a/contrib/libs/icu/i18n/dtitvfmt.cpp b/contrib/libs/icu/i18n/dtitvfmt.cpp index 6087014668..a8aefe064f 100644 --- a/contrib/libs/icu/i18n/dtitvfmt.cpp +++ b/contrib/libs/icu/i18n/dtitvfmt.cpp @@ -706,7 +706,7 @@ DateIntervalFormat::create(const Locale& locale, } else if ( U_FAILURE(status) ) { // safe to delete f, although nothing actually is saved delete f; - f = 0; + f = nullptr; } return f; } @@ -1477,7 +1477,7 @@ DateIntervalFormat::setIntervalPattern(UCalendarDateFields field, // look for the best match skeleton, for example: "yMMM" const UnicodeString* tmpBest = fInfo->getBestSkeleton( *extendedBestSkeleton, differenceInfo); - if ( tmpBest != 0 && differenceInfo != -1 ) { + if (tmpBest != nullptr && differenceInfo != -1) { fInfo->getIntervalPattern(*tmpBest, field, pattern, status); bestSkeleton = tmpBest; } diff --git a/contrib/libs/icu/i18n/dtitvinf.cpp b/contrib/libs/icu/i18n/dtitvinf.cpp index 3733d04518..8ebb2f70d8 100644 --- a/contrib/libs/icu/i18n/dtitvinf.cpp +++ b/contrib/libs/icu/i18n/dtitvinf.cpp @@ -35,6 +35,7 @@ #include "uresimp.h" #include "hash.h" #include "gregoimp.h" +#include "ulocimp.h" #include "uresimp.h" @@ -397,17 +398,15 @@ DateIntervalInfo::initializeData(const Locale& locale, UErrorCode& status) // Get the correct calendar type const char * calendarTypeToUse = gGregorianTag; // initial default - char calendarType[ULOC_KEYWORDS_CAPACITY]; // to be filled in with the type to use, if all goes well char localeWithCalendarKey[ULOC_LOCALE_IDENTIFIER_CAPACITY]; // obtain a locale that always has the calendar key value that should be used (void)ures_getFunctionalEquivalent(localeWithCalendarKey, ULOC_LOCALE_IDENTIFIER_CAPACITY, nullptr, "calendar", "calendar", locName, nullptr, false, &status); localeWithCalendarKey[ULOC_LOCALE_IDENTIFIER_CAPACITY-1] = 0; // ensure null termination // now get the calendar key value from that locale - int32_t calendarTypeLen = uloc_getKeywordValue(localeWithCalendarKey, "calendar", calendarType, - ULOC_KEYWORDS_CAPACITY, &status); - if (U_SUCCESS(status) && calendarTypeLen < ULOC_KEYWORDS_CAPACITY) { - calendarTypeToUse = calendarType; + CharString calendarType = ulocimp_getKeywordValue(localeWithCalendarKey, "calendar", status); + if (U_SUCCESS(status)) { + calendarTypeToUse = calendarType.data(); } status = U_ZERO_ERROR; diff --git a/contrib/libs/icu/i18n/dtptngen.cpp b/contrib/libs/icu/i18n/dtptngen.cpp index 1f74540fbd..4fe00a23e1 100644 --- a/contrib/libs/icu/i18n/dtptngen.cpp +++ b/contrib/libs/icu/i18n/dtptngen.cpp @@ -37,7 +37,9 @@ #include "locbased.h" #include "hash.h" #include "uhash.h" +#include "ulocimp.h" #include "uresimp.h" +#include "ulocimp.h" #include "dtptngen_impl.h" #include "ucln_in.h" #include "charstr.h" @@ -461,15 +463,12 @@ DateTimePatternGenerator::operator!=(const DateTimePatternGenerator& other) cons } DateTimePatternGenerator::~DateTimePatternGenerator() { - if (fAvailableFormatKeyHash!=nullptr) { - delete fAvailableFormatKeyHash; - } - - if (fp != nullptr) delete fp; - if (dtMatcher != nullptr) delete dtMatcher; - if (distanceInfo != nullptr) delete distanceInfo; - if (patternMap != nullptr) delete patternMap; - if (skipMatcher != nullptr) delete skipMatcher; + delete fAvailableFormatKeyHash; + delete fp; + delete dtMatcher; + delete distanceInfo; + delete patternMap; + delete skipMatcher; } namespace { @@ -508,6 +507,11 @@ enum AllowedHourFormat{ void DateTimePatternGenerator::initData(const Locale& locale, UErrorCode &status, UBool skipStdPatterns) { //const char *baseLangName = locale.getBaseName(); // unused + if (U_FAILURE(status)) { return; } + if (locale.isBogus()) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } skipMatcher = nullptr; fAvailableFormatKeyHash=nullptr; @@ -655,18 +659,9 @@ void DateTimePatternGenerator::getAllowedHourFormats(const Locale &locale, UErro if (U_FAILURE(status)) { return; } const char *language = locale.getLanguage(); - const char *country = locale.getCountry(); - - char regionOverride[8]; - int32_t regionOverrideLength = locale.getKeywordValue("rg", regionOverride, sizeof(regionOverride), status); - if (U_SUCCESS(status) && regionOverrideLength > 0) { - country = regionOverride; - if (regionOverrideLength > 2) { - // chop off any subdivision codes that may have been included - regionOverride[2] = '\0'; - } - } - + CharString baseCountry = ulocimp_getRegionForSupplementalData(locale.getName(), false, status); + const char* country = baseCountry.data(); + Locale maxLocale; // must be here for correct lifetime if (*language == '\0' || *country == '\0') { maxLocale = locale; @@ -910,22 +905,11 @@ DateTimePatternGenerator::getCalendarTypeToUse(const Locale& locale, CharString& &localStatus); localeWithCalendarKey[ULOC_LOCALE_IDENTIFIER_CAPACITY-1] = 0; // ensure null termination // now get the calendar key value from that locale - char calendarType[ULOC_KEYWORDS_CAPACITY]; - int32_t calendarTypeLen = uloc_getKeywordValue( - localeWithCalendarKey, - "calendar", - calendarType, - ULOC_KEYWORDS_CAPACITY, - &localStatus); + destination = ulocimp_getKeywordValue(localeWithCalendarKey, "calendar", localStatus); // If the input locale was invalid, don't fail with missing resource error, instead // continue with default of Gregorian. if (U_FAILURE(localStatus) && localStatus != U_MISSING_RESOURCE_ERROR) { err = localStatus; - return; - } - if (calendarTypeLen > 0 && calendarTypeLen < ULOC_KEYWORDS_CAPACITY) { - destination.clear().append(calendarType, -1, err); - if (U_FAILURE(err)) { return; } } } } @@ -1031,7 +1015,7 @@ struct DateTimePatternGenerator::AvailableFormatsSink : public ResourceSink { AvailableFormatsSink(DateTimePatternGenerator& _dtpg) : dtpg(_dtpg) {} virtual ~AvailableFormatsSink(); - virtual void put(const char *key, ResourceValue &value, UBool isRoot, + virtual void put(const char *key, ResourceValue &value, UBool /*isRoot*/, UErrorCode &errorCode) override { const UnicodeString formatKey(key, -1, US_INV); if (!dtpg.isAvailableFormatSet(formatKey) ) { @@ -1040,7 +1024,7 @@ struct DateTimePatternGenerator::AvailableFormatsSink : public ResourceSink { // derived from std patterns, but not a previous availableFormats entry: const UnicodeString& formatValue = value.getUnicodeString(errorCode); conflictingPattern.remove(); - dtpg.addPatternWithSkeleton(formatValue, &formatKey, !isRoot, conflictingPattern, errorCode); + dtpg.addPatternWithSkeleton(formatValue, &formatKey, true, conflictingPattern, errorCode); } } }; @@ -1165,11 +1149,11 @@ DateTimePatternGenerator::getBestPattern(const UnicodeString& patternForm, UErro UnicodeString DateTimePatternGenerator::getBestPattern(const UnicodeString& patternForm, UDateTimePatternMatchOptions options, UErrorCode& status) { if (U_FAILURE(status)) { - return UnicodeString(); + return {}; } if (U_FAILURE(internalErrorCode)) { status = internalErrorCode; - return UnicodeString(); + return {}; } const UnicodeString *bestPattern = nullptr; UnicodeString dtFormat; @@ -1182,7 +1166,7 @@ DateTimePatternGenerator::getBestPattern(const UnicodeString& patternForm, UDate // Replace hour metacharacters 'j', 'C' and 'J', set flags as necessary UnicodeString patternFormMapped = mapSkeletonMetacharacters(patternForm, &flags, status); if (U_FAILURE(status)) { - return UnicodeString(); + return {}; } resultPattern.remove(); @@ -1190,7 +1174,7 @@ DateTimePatternGenerator::getBestPattern(const UnicodeString& patternForm, UDate const PtnSkeleton* specifiedSkeleton = nullptr; bestPattern=getBestRaw(*dtMatcher, -1, distanceInfo, status, &specifiedSkeleton); if (U_FAILURE(status)) { - return UnicodeString(); + return {}; } if ( distanceInfo->missingFieldMask==0 && distanceInfo->extraFieldMask==0 ) { @@ -1202,7 +1186,7 @@ DateTimePatternGenerator::getBestPattern(const UnicodeString& patternForm, UDate UnicodeString datePattern=getBestAppending(neededFields & dateMask, flags, status, options); UnicodeString timePattern=getBestAppending(neededFields & timeMask, flags, status, options); if (U_FAILURE(status)) { - return UnicodeString(); + return {}; } if (datePattern.length()==0) { if (timePattern.length()==0) { @@ -1278,7 +1262,7 @@ DateTimePatternGenerator::mapSkeletonMetacharacters(const UnicodeString& pattern bestAllowed = (AllowedHourFormat)fAllowedHourFormats[0]; } else { status = U_INVALID_FORMAT_ERROR; - return UnicodeString(); + return {}; } if (bestAllowed == ALLOWED_HOUR_FORMAT_H || bestAllowed == ALLOWED_HOUR_FORMAT_HB || bestAllowed == ALLOWED_HOUR_FORMAT_Hb) { hourChar = CAP_H; @@ -1329,11 +1313,11 @@ DateTimePatternGenerator::replaceFieldTypes(const UnicodeString& pattern, UDateTimePatternMatchOptions options, UErrorCode& status) { if (U_FAILURE(status)) { - return UnicodeString(); + return {}; } if (U_FAILURE(internalErrorCode)) { status = internalErrorCode; - return UnicodeString(); + return {}; } dtMatcher->set(skeleton, fp); UnicodeString result = adjustFieldTypes(pattern, nullptr, kDTPGNoFlags, options); @@ -1786,7 +1770,7 @@ DateTimePatternGenerator::adjustFieldTypes(const UnicodeString& pattern, UnicodeString DateTimePatternGenerator::getBestAppending(int32_t missingFields, int32_t flags, UErrorCode &status, UDateTimePatternMatchOptions options) { if (U_FAILURE(status)) { - return UnicodeString(); + return {}; } UnicodeString resultPattern, tempPattern; const UnicodeString* tempPatternPtr; @@ -1796,7 +1780,7 @@ DateTimePatternGenerator::getBestAppending(int32_t missingFields, int32_t flags, const PtnSkeleton* specifiedSkeleton=nullptr; tempPatternPtr = getBestRaw(*dtMatcher, missingFields, distanceInfo, status, &specifiedSkeleton); if (U_FAILURE(status)) { - return UnicodeString(); + return {}; } tempPattern = *tempPatternPtr; resultPattern = adjustFieldTypes(tempPattern, specifiedSkeleton, flags, options); @@ -1816,7 +1800,7 @@ DateTimePatternGenerator::getBestAppending(int32_t missingFields, int32_t flags, int32_t startingMask = distanceInfo->missingFieldMask; tempPatternPtr = getBestRaw(*dtMatcher, distanceInfo->missingFieldMask, distanceInfo, status, &specifiedSkeleton); if (U_FAILURE(status)) { - return UnicodeString(); + return {}; } tempPattern = *tempPatternPtr; tempPattern = adjustFieldTypes(tempPattern, specifiedSkeleton, flags, options); diff --git a/contrib/libs/icu/i18n/dtptngen_impl.h b/contrib/libs/icu/i18n/dtptngen_impl.h index 74fe925b2f..b6eb5f6373 100644 --- a/contrib/libs/icu/i18n/dtptngen_impl.h +++ b/contrib/libs/icu/i18n/dtptngen_impl.h @@ -250,7 +250,7 @@ public: virtual ~PatternMap(); void add(const UnicodeString& basePattern, const PtnSkeleton& skeleton, const UnicodeString& value, UBool skeletonWasSpecified, UErrorCode& status); const UnicodeString* getPatternFromBasePattern(const UnicodeString& basePattern, UBool& skeletonWasSpecified) const; - const UnicodeString* getPatternFromSkeleton(const PtnSkeleton& skeleton, const PtnSkeleton** specifiedSkeletonPtr = 0) const; + const UnicodeString* getPatternFromSkeleton(const PtnSkeleton& skeleton, const PtnSkeleton** specifiedSkeletonPtr = nullptr) const; void copyFrom(const PatternMap& other, UErrorCode& status); PtnElem* getHeader(char16_t baseChar) const; UBool equals(const PatternMap& other) const; diff --git a/contrib/libs/icu/i18n/esctrn.cpp b/contrib/libs/icu/i18n/esctrn.cpp index 24fa6f58e4..60f8731101 100644 --- a/contrib/libs/icu/i18n/esctrn.cpp +++ b/contrib/libs/icu/i18n/esctrn.cpp @@ -111,7 +111,7 @@ EscapeTransliterator::EscapeTransliterator(const EscapeTransliterator& o) : radix(o.radix), minDigits(o.minDigits), grokSupplementals(o.grokSupplementals) { - supplementalHandler = (o.supplementalHandler != 0) ? + supplementalHandler = o.supplementalHandler != nullptr ? new EscapeTransliterator(*o.supplementalHandler) : nullptr; } diff --git a/contrib/libs/icu/i18n/ethpccal.cpp b/contrib/libs/icu/i18n/ethpccal.cpp index be4010843a..41b7076704 100644 --- a/contrib/libs/icu/i18n/ethpccal.cpp +++ b/contrib/libs/icu/i18n/ethpccal.cpp @@ -11,6 +11,7 @@ #if !UCONFIG_NO_FORMATTING +#include "gregoimp.h" #include "umutex.h" #include "ethpccal.h" #include "cecal.h" @@ -56,8 +57,11 @@ EthiopicCalendar::getType() const //------------------------------------------------------------------------- int32_t -EthiopicCalendar::handleGetExtendedYear() +EthiopicCalendar::handleGetExtendedYear(UErrorCode& status) { + if (U_FAILURE(status)) { + return 0; + } // Ethiopic calendar uses EXTENDED_YEAR aligned to // Amelete Hihret year always. if (newerField(UCAL_EXTENDED_YEAR, UCAL_YEAR) == UCAL_EXTENDED_YEAR) { @@ -67,7 +71,12 @@ EthiopicCalendar::handleGetExtendedYear() if (internalGet(UCAL_ERA, AMETE_MIHRET) == AMETE_MIHRET) { return internalGet(UCAL_YEAR, 1); // Default to year 1 } - return internalGet(UCAL_YEAR, 1) - AMETE_MIHRET_DELTA; + int32_t year = internalGet(UCAL_YEAR, 1); + if (uprv_add32_overflow(year, -AMETE_MIHRET_DELTA, &year)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + return year; } void @@ -102,46 +111,7 @@ void EthiopicCalendar::setRelatedYear(int32_t year) set(UCAL_EXTENDED_YEAR, year - kEthiopicRelatedYearDiff); } -/** - * The system maintains a static default century start date and Year. They are - * initialized the first time they are used. Once the system default century date - * and year are set, they do not change. - */ -static UDate gSystemDefaultCenturyStart = DBL_MIN; -static int32_t gSystemDefaultCenturyStartYear = -1; -static icu::UInitOnce gSystemDefaultCenturyInit {}; - -static void U_CALLCONV initializeSystemDefaultCentury() -{ - UErrorCode status = U_ZERO_ERROR; - EthiopicCalendar calendar(Locale("@calendar=ethiopic"), status); - if (U_SUCCESS(status)) { - calendar.setTime(Calendar::getNow(), status); - calendar.add(UCAL_YEAR, -80, status); - - gSystemDefaultCenturyStart = calendar.getTime(status); - gSystemDefaultCenturyStartYear = calendar.get(UCAL_YEAR, status); - } - // We have no recourse upon failure unless we want to propagate the failure - // out. -} - -UDate -EthiopicCalendar::defaultCenturyStart() const -{ - // lazy-evaluate systemDefaultCenturyStart - umtx_initOnce(gSystemDefaultCenturyInit, &initializeSystemDefaultCentury); - return gSystemDefaultCenturyStart; -} - -int32_t -EthiopicCalendar::defaultCenturyStartYear() const -{ - // lazy-evaluate systemDefaultCenturyStartYear - umtx_initOnce(gSystemDefaultCenturyInit, &initializeSystemDefaultCentury); - return gSystemDefaultCenturyStartYear; -} - +IMPL_SYSTEM_DEFAULT_CENTURY(EthiopicCalendar, "@calendar=ethiopic") int32_t EthiopicCalendar::getJDEpochOffset() const @@ -150,21 +120,6 @@ EthiopicCalendar::getJDEpochOffset() const } -#if 0 -// We do not want to introduce this API in ICU4C. -// It was accidentally introduced in ICU4J as a public API. - -//------------------------------------------------------------------------- -// Calendar system Conversion methods... -//------------------------------------------------------------------------- - -int32_t -EthiopicCalendar::ethiopicToJD(int32_t year, int32_t month, int32_t date) -{ - return ceToJD(year, month, date, JD_EPOCH_OFFSET_AMETE_MIHRET); -} -#endif - //------------------------------------------------------------------------- // Constructors... //------------------------------------------------------------------------- @@ -196,15 +151,23 @@ EthiopicAmeteAlemCalendar::getType() const } int32_t -EthiopicAmeteAlemCalendar::handleGetExtendedYear() +EthiopicAmeteAlemCalendar::handleGetExtendedYear(UErrorCode& status) { + if (U_FAILURE(status)) { + return 0; + } // Ethiopic calendar uses EXTENDED_YEAR aligned to // Amelete Hihret year always. if (newerField(UCAL_EXTENDED_YEAR, UCAL_YEAR) == UCAL_EXTENDED_YEAR) { return internalGet(UCAL_EXTENDED_YEAR, 1); // Default to year 1 } - return internalGet(UCAL_YEAR, 1 + AMETE_MIHRET_DELTA) - - AMETE_MIHRET_DELTA; // Default to year 1 of Amelete Mihret + // Default to year 1 of Amelete Mihret + int32_t year = internalGet(UCAL_YEAR, 1 + AMETE_MIHRET_DELTA); + if (uprv_add32_overflow(year, -AMETE_MIHRET_DELTA, &year)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + return year; } void diff --git a/contrib/libs/icu/i18n/ethpccal.h b/contrib/libs/icu/i18n/ethpccal.h index 1a5cd4f41a..36a3561186 100644 --- a/contrib/libs/icu/i18n/ethpccal.h +++ b/contrib/libs/icu/i18n/ethpccal.h @@ -89,7 +89,7 @@ public: /** * Constant for ነሐሴ, the 12th month of the Ethiopic year. */ - NEHASSA, + NEHASSE, /** * Constant for ጳጉሜን, the 13th month of the Ethiopic year. @@ -169,7 +169,7 @@ protected: * 1 AMETE_MIHRET 1 * @internal */ - virtual int32_t handleGetExtendedYear() override; + virtual int32_t handleGetExtendedYear(UErrorCode& status) override; /** * Compute fields from the JD @@ -177,18 +177,7 @@ protected: */ virtual void handleComputeFields(int32_t julianDay, UErrorCode &status) override; - /** - * Returns the date of the start of the default century - * @return start of century - in milliseconds since epoch, 1970 - * @internal - */ - virtual UDate defaultCenturyStart() const override; - - /** - * Returns the year in which the default century begins - * @internal - */ - virtual int32_t defaultCenturyStartYear() const override; + DECLARE_OVERRIDE_SYSTEM_DEFAULT_CENTURY /** * Return the date offset from Julian @@ -341,7 +330,7 @@ protected: * 1 AMETE_ALEM 5501 * @internal */ - virtual int32_t handleGetExtendedYear() override; + virtual int32_t handleGetExtendedYear(UErrorCode& status) override; /** * Compute fields from the JD diff --git a/contrib/libs/icu/i18n/fmtable.cpp b/contrib/libs/icu/i18n/fmtable.cpp index 618868c0a2..01d7bad1ba 100644 --- a/contrib/libs/icu/i18n/fmtable.cpp +++ b/contrib/libs/icu/i18n/fmtable.cpp @@ -56,7 +56,7 @@ using number::impl::DecimalQuantity; // Return true if *a == *b. static inline UBool objectEquals(const UObject* a, const UObject* b) { // LATER: return *a == *b; - return *((const Measure*) a) == *((const Measure*) b); + return *((const Measure*) a) == *b; } // Return a clone of *a. @@ -775,9 +775,7 @@ Formattable::populateDecimalQuantity(number::impl::DecimalQuantity& output, UErr // --------------------------------------- void Formattable::adoptDecimalQuantity(DecimalQuantity *dq) { - if (fDecimalQuantity != nullptr) { - delete fDecimalQuantity; - } + delete fDecimalQuantity; fDecimalQuantity = dq; if (dq == nullptr) { // allow adoptDigitList(nullptr) to clear return; diff --git a/contrib/libs/icu/i18n/formatted_string_builder.cpp b/contrib/libs/icu/i18n/formatted_string_builder.cpp index 8dbf954af9..6481f73dcf 100644 --- a/contrib/libs/icu/i18n/formatted_string_builder.cpp +++ b/contrib/libs/icu/i18n/formatted_string_builder.cpp @@ -72,8 +72,8 @@ FormattedStringBuilder &FormattedStringBuilder::operator=(const FormattedStringB if (capacity > DEFAULT_CAPACITY) { // FIXME: uprv_malloc // C++ note: malloc appears in two places: here and in prepareForInsertHelper. - auto newChars = static_cast<char16_t *> (uprv_malloc(sizeof(char16_t) * capacity)); - auto newFields = static_cast<Field *>(uprv_malloc(sizeof(Field) * capacity)); + auto* newChars = static_cast<char16_t*>(uprv_malloc(sizeof(char16_t) * capacity)); + auto* newFields = static_cast<Field*>(uprv_malloc(sizeof(Field) * capacity)); if (newChars == nullptr || newFields == nullptr) { // UErrorCode is not available; fail silently. uprv_free(newChars); @@ -153,13 +153,15 @@ FormattedStringBuilder::insertCodePoint(int32_t index, UChar32 codePoint, Field if (U_FAILURE(status)) { return count; } + auto* charPtr = getCharPtr(); + auto* fieldPtr = getFieldPtr(); if (count == 1) { - getCharPtr()[position] = (char16_t) codePoint; - getFieldPtr()[position] = field; + charPtr[position] = (char16_t) codePoint; + fieldPtr[position] = field; } else { - getCharPtr()[position] = U16_LEAD(codePoint); - getCharPtr()[position + 1] = U16_TRAIL(codePoint); - getFieldPtr()[position] = getFieldPtr()[position + 1] = field; + charPtr[position] = U16_LEAD(codePoint); + charPtr[position + 1] = U16_TRAIL(codePoint); + fieldPtr[position] = fieldPtr[position + 1] = field; } return count; } @@ -306,8 +308,10 @@ int32_t FormattedStringBuilder::prepareForInsertHelper(int32_t index, int32_t co newZero = (newCapacity - newLength) / 2; // C++ note: malloc appears in two places: here and in the assignment operator. - auto newChars = static_cast<char16_t *> (uprv_malloc(sizeof(char16_t) * static_cast<size_t>(newCapacity))); - auto newFields = static_cast<Field *>(uprv_malloc(sizeof(Field) * static_cast<size_t>(newCapacity))); + auto* newChars = + static_cast<char16_t*>(uprv_malloc(sizeof(char16_t) * static_cast<size_t>(newCapacity))); + auto* newFields = + static_cast<Field*>(uprv_malloc(sizeof(Field) * static_cast<size_t>(newCapacity))); if (newChars == nullptr || newFields == nullptr) { uprv_free(newChars); uprv_free(newFields); @@ -378,7 +382,7 @@ UnicodeString FormattedStringBuilder::toUnicodeString() const { return UnicodeString(getCharPtr() + fZero, fLength); } -const UnicodeString FormattedStringBuilder::toTempUnicodeString() const { +UnicodeString FormattedStringBuilder::toTempUnicodeString() const { // Readonly-alias constructor: return UnicodeString(false, getCharPtr() + fZero, fLength); } diff --git a/contrib/libs/icu/i18n/formatted_string_builder.h b/contrib/libs/icu/i18n/formatted_string_builder.h index 32e0900ae2..2ea7ac4f1b 100644 --- a/contrib/libs/icu/i18n/formatted_string_builder.h +++ b/contrib/libs/icu/i18n/formatted_string_builder.h @@ -171,7 +171,7 @@ class U_I18N_API FormattedStringBuilder : public UMemory { * Gets an "unsafe" UnicodeString that is valid only as long as the FormattedStringBuilder is alive and * unchanged. Slightly faster than toUnicodeString(). */ - const UnicodeString toTempUnicodeString() const; + UnicodeString toTempUnicodeString() const; UnicodeString toDebugString() const; @@ -219,8 +219,8 @@ class U_I18N_API FormattedStringBuilder : public UMemory { static_assert( // std::is_pod<> is deprecated. - std::is_standard_layout<FormattedStringBuilder::Field>::value && - std::is_trivial<FormattedStringBuilder::Field>::value, + std::is_standard_layout_v<FormattedStringBuilder::Field> && + std::is_trivial_v<FormattedStringBuilder::Field>, "Field should be a POD type for efficient initialization"); constexpr FormattedStringBuilder::Field::Field(uint8_t category, uint8_t field) diff --git a/contrib/libs/icu/i18n/gender.cpp b/contrib/libs/icu/i18n/gender.cpp index 97d161de32..ab76dab121 100644 --- a/contrib/libs/icu/i18n/gender.cpp +++ b/contrib/libs/icu/i18n/gender.cpp @@ -19,15 +19,19 @@ #if !UCONFIG_NO_FORMATTING +#include <utility> + #include "unicode/gender.h" #include "unicode/ugender.h" #include "unicode/ures.h" +#include "charstr.h" #include "cmemory.h" #include "cstring.h" #include "mutex.h" #include "uassert.h" #include "ucln_in.h" +#include "ulocimp.h" #include "umutex.h" #include "uhash.h" @@ -148,12 +152,16 @@ const GenderInfo* GenderInfo::loadInstance(const Locale& locale, UErrorCode& sta const char16_t* s = ures_getStringByKey(locRes.getAlias(), curLocaleName, &resLen, &key_status); if (s == nullptr) { key_status = U_ZERO_ERROR; - char parentLocaleName[ULOC_FULLNAME_CAPACITY]; - uprv_strcpy(parentLocaleName, curLocaleName); - while (s == nullptr && uloc_getParent(parentLocaleName, parentLocaleName, ULOC_FULLNAME_CAPACITY, &key_status) > 0) { + CharString parentLocaleName(curLocaleName, key_status); + while (s == nullptr) { + { + CharString tmp = ulocimp_getParent(parentLocaleName.data(), status); + if (tmp.isEmpty()) break; + parentLocaleName = std::move(tmp); + } key_status = U_ZERO_ERROR; resLen = 0; - s = ures_getStringByKey(locRes.getAlias(), parentLocaleName, &resLen, &key_status); + s = ures_getStringByKey(locRes.getAlias(), parentLocaleName.data(), &resLen, &key_status); key_status = U_ZERO_ERROR; } } diff --git a/contrib/libs/icu/i18n/gregocal.cpp b/contrib/libs/icu/i18n/gregocal.cpp index 5fd71d496c..dfd64faa50 100644 --- a/contrib/libs/icu/i18n/gregocal.cpp +++ b/contrib/libs/icu/i18n/gregocal.cpp @@ -351,27 +351,27 @@ GregorianCalendar::setGregorianChange(UDate date, UErrorCode& status) // values. GregorianCalendar *cal = new GregorianCalendar(getTimeZone(), status); /* test for nullptr */ - if (cal == 0) { + if (cal == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return; } - if(U_FAILURE(status)) + if(U_FAILURE(status)) { return; + } cal->setTime(date, status); fGregorianCutoverYear = cal->get(UCAL_YEAR, status); - if (cal->get(UCAL_ERA, status) == BC) + if (cal->get(UCAL_ERA, status) == BC) { fGregorianCutoverYear = 1 - fGregorianCutoverYear; + } fCutoverJulianDay = (int32_t)cutoverDay; delete cal; } - void GregorianCalendar::handleComputeFields(int32_t julianDay, UErrorCode& status) { int32_t eyear, month, dayOfMonth, dayOfYear, unusedRemainder; - - if(U_FAILURE(status)) { - return; + if(U_FAILURE(status)) { + return; } #if defined (U_DEBUG_CAL) @@ -379,7 +379,6 @@ void GregorianCalendar::handleComputeFields(int32_t julianDay, UErrorCode& statu __FILE__, __LINE__, julianDay, getGregorianDayOfYear(), fCutoverJulianDay); #endif - if (julianDay >= fCutoverJulianDay) { month = getGregorianMonth(); dayOfMonth = getGregorianDayOfMonth(); @@ -472,17 +471,20 @@ GregorianCalendar::isLeapYear(int32_t year) const // ------------------------------------- -int32_t GregorianCalendar::handleComputeJulianDay(UCalendarDateFields bestField) +int32_t GregorianCalendar::handleComputeJulianDay(UCalendarDateFields bestField, UErrorCode& status) { fInvertGregorian = false; - int32_t jd = Calendar::handleComputeJulianDay(bestField); + int32_t jd = Calendar::handleComputeJulianDay(bestField, status); + if (U_FAILURE(status)) { + return 0; + } if((bestField == UCAL_WEEK_OF_YEAR) && // if we are doing WOY calculations, we are counting relative to Jan 1 *julian* (internalGet(UCAL_EXTENDED_YEAR)==fGregorianCutoverYear) && jd >= fCutoverJulianDay) { fInvertGregorian = true; // So that the Julian Jan 1 will be used in handleComputeMonthStart - return Calendar::handleComputeJulianDay(bestField); + return Calendar::handleComputeJulianDay(bestField, status); } @@ -495,7 +497,10 @@ int32_t GregorianCalendar::handleComputeJulianDay(UCalendarDateFields bestField) __FILE__, __LINE__, jd); #endif fInvertGregorian = true; - jd = Calendar::handleComputeJulianDay(bestField); + jd = Calendar::handleComputeJulianDay(bestField, status); + if (U_FAILURE(status)) { + return 0; + } #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: fIsGregorian %s, fInvertGregorian %s - ", __FILE__, __LINE__,fIsGregorian?"T":"F", fInvertGregorian?"T":"F"); @@ -530,21 +535,29 @@ int32_t GregorianCalendar::handleComputeJulianDay(UCalendarDateFields bestField) return jd; } -int32_t GregorianCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, +int64_t GregorianCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, - UBool /* useMonth */) const + UBool /* useMonth */, UErrorCode& status) const { + if (U_FAILURE(status)) { + return 0; + } GregorianCalendar *nonConstThis = (GregorianCalendar*)this; // cast away const // If the month is out of range, adjust it into range, and // modify the extended year value accordingly. if (month < 0 || month > 11) { - eyear += ClockMath::floorDivide(month, 12, &month); + if (uprv_add32_overflow(ClockMath::floorDivide(month, 12, &month), + eyear, &eyear)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } } UBool isLeap = eyear%4 == 0; int64_t y = (int64_t)eyear-1; - int64_t julianDay = 365*y + ClockMath::floorDivide(y, (int64_t)4) + (kJan1_1JulianDay - 3); + int64_t julianDay = 365LL * y + + ClockMath::floorDivideInt64(y, 4LL) + kJan1_1JulianDay - 3LL; nonConstThis->fIsGregorian = (eyear >= fGregorianCutoverYear); #if defined (U_DEBUG_CAL) @@ -574,10 +587,10 @@ int32_t GregorianCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, julianDay += isLeap?kLeapNumDays[month]:kNumDays[month]; } - return static_cast<int32_t>(julianDay); + return julianDay; } -int32_t GregorianCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month) const +int32_t GregorianCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month, UErrorCode& /* status */) const { // If the month is out of range, adjust it into range, and // modify the extended year value accordingly. @@ -594,10 +607,10 @@ int32_t GregorianCalendar::handleGetYearLength(int32_t eyear) const { int32_t -GregorianCalendar::monthLength(int32_t month) const +GregorianCalendar::monthLength(int32_t month, UErrorCode& status) const { int32_t year = internalGet(UCAL_EXTENDED_YEAR); - return handleGetMonthLength(year, month); + return handleGetMonthLength(year, month, status); } // ------------------------------------- @@ -611,14 +624,6 @@ GregorianCalendar::monthLength(int32_t month, int32_t year) const // ------------------------------------- int32_t -GregorianCalendar::yearLength(int32_t year) const -{ - return isLeapYear(year) ? 366 : 365; -} - -// ------------------------------------- - -int32_t GregorianCalendar::yearLength() const { return isLeapYear(internalGet(UCAL_YEAR)) ? 366 : 365; @@ -626,24 +631,6 @@ GregorianCalendar::yearLength() const // ------------------------------------- -/** -* After adjustments such as add(MONTH), add(YEAR), we don't want the -* month to jump around. E.g., we don't want Jan 31 + 1 month to go to Mar -* 3, we want it to go to Feb 28. Adjustments which might run into this -* problem call this method to retain the proper month. -*/ -void -GregorianCalendar::pinDayOfMonth() -{ - int32_t monthLen = monthLength(internalGetMonth()); - int32_t dom = internalGet(UCAL_DATE); - if(dom > monthLen) - set(UCAL_DATE, monthLen); -} - -// ------------------------------------- - - UBool GregorianCalendar::validateFields() const { @@ -660,10 +647,12 @@ GregorianCalendar::validateFields() const // specially. if (isSet(UCAL_DATE)) { int32_t date = internalGet(UCAL_DATE); + UErrorCode internalStatus = U_ZERO_ERROR; if (date < getMinimum(UCAL_DATE) || - date > monthLength(internalGetMonth())) { + date > monthLength(internalGetMonth(internalStatus), internalStatus) || + U_FAILURE(internalStatus)) { return false; - } + } } if (isSet(UCAL_DAY_OF_YEAR)) { @@ -786,7 +775,7 @@ double GregorianCalendar::computeJulianDayOfYear(UBool isGregorian, // ------------------------------------- -double +double GregorianCalendar::millisToJulianDay(UDate millis) { return (double)kEpochStartAsJulianDay + ClockMath::floorDivide(millis, (double)kOneDay); @@ -803,9 +792,9 @@ GregorianCalendar::julianDayToMillis(double julian) // ------------------------------------- int32_t -GregorianCalendar::aggregateStamp(int32_t stamp_a, int32_t stamp_b) +GregorianCalendar::aggregateStamp(int32_t stamp_a, int32_t stamp_b) { - return (((stamp_a != kUnset && stamp_b != kUnset) + return (((stamp_a != kUnset && stamp_b != kUnset) ? uprv_max(stamp_a, stamp_b) : (int32_t)kUnset)); } @@ -817,9 +806,9 @@ GregorianCalendar::aggregateStamp(int32_t stamp_a, int32_t stamp_b) * Note: This will be made public later. [LIU] */ -void +void GregorianCalendar::roll(EDateFields field, int32_t amount, UErrorCode& status) { - roll((UCalendarDateFields) field, amount, status); + roll((UCalendarDateFields) field, amount, status); } void @@ -840,7 +829,10 @@ GregorianCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& s case UCAL_DAY_OF_MONTH: case UCAL_WEEK_OF_MONTH: { - int32_t max = monthLength(internalGetMonth()); + int32_t max = monthLength(internalGetMonth(status), status); + if (U_FAILURE(status)) { + return; + } UDate t = internalGetTime(); // We subtract 1 from the DAY_OF_MONTH to make it zero-based, and an // additional 10 if we are after the cutover. Thus the monthStart @@ -851,7 +843,7 @@ GregorianCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& s if ((cMonthStart < fGregorianCutover) && (cMonthStart + (cMonthLen=(max-10))*kOneDay >= fGregorianCutover)) { inCutoverMonth = true; - } + } } break; default: @@ -873,7 +865,11 @@ GregorianCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& s // may be one year before or after the calendar year. int32_t isoYear = get(UCAL_YEAR_WOY, status); int32_t isoDoy = internalGet(UCAL_DAY_OF_YEAR); - if (internalGetMonth() == UCAL_JANUARY) { + int32_t month = internalGetMonth(status); + if (U_FAILURE(status)) { + return; + } + if (month == UCAL_JANUARY) { if (woy >= 52) { isoDoy += handleGetYearLength(isoYear); } @@ -882,7 +878,10 @@ GregorianCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& s isoDoy -= handleGetYearLength(isoYear - 1); } } - woy += amount; + if (uprv_add32_overflow(woy, amount, &woy)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } // Do fast checks to avoid unnecessary computation: if (woy < 1 || woy > 52) { // Determine the last week of the ISO year. @@ -908,7 +907,8 @@ GregorianCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& s if( !inCutoverMonth ) { Calendar::roll(field, amount, status); return; - } else { + } + { // [j81] 1582 special case for DOM // The default computation works except when the current month // contains the Gregorian cutover. We handle this special case @@ -931,7 +931,8 @@ GregorianCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& s if( !inCutoverMonth ) { Calendar::roll(field, amount, status); return; - } else { + } + { #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: roll WOM %d ??????????????????? \n", __FILE__, __LINE__,amount); @@ -1177,7 +1178,10 @@ int32_t GregorianCalendar::getActualMaximum(UCalendarDateFields field, UErrorCod } -int32_t GregorianCalendar::handleGetExtendedYear() { +int32_t GregorianCalendar::handleGetExtendedYear(UErrorCode& status) { + if (U_FAILURE(status)) { + return 0; + } // the year to return int32_t year = kEpochYear; @@ -1203,14 +1207,21 @@ int32_t GregorianCalendar::handleGetExtendedYear() { int32_t era = internalGet(UCAL_ERA, AD); if (era == BC) { year = 1 - internalGet(UCAL_YEAR, 1); // Convert to extended year - } else { + } else if (era == AD) { year = internalGet(UCAL_YEAR, kEpochYear); + } else { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; } } break; case UCAL_YEAR_WOY: - year = handleGetExtendedYearFromWeekFields(internalGet(UCAL_YEAR_WOY), internalGet(UCAL_WEEK_OF_YEAR)); + year = handleGetExtendedYearFromWeekFields( + internalGet(UCAL_YEAR_WOY), internalGet(UCAL_WEEK_OF_YEAR), status); + if (U_FAILURE(status)) { + return 0; + } #if defined (U_DEBUG_CAL) // if(internalGet(UCAL_YEAR_WOY) != year) { fprintf(stderr, "%s:%d: hGEYFWF[%d,%d] -> %d\n", @@ -1225,14 +1236,17 @@ int32_t GregorianCalendar::handleGetExtendedYear() { return year; } -int32_t GregorianCalendar::handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t woy) +int32_t GregorianCalendar::handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t woy, UErrorCode& status) { + if (U_FAILURE(status)) { + return 0; + } // convert year to extended form int32_t era = internalGet(UCAL_ERA, AD); if(era == BC) { yearWoy = 1 - yearWoy; } - return Calendar::handleGetExtendedYearFromWeekFields(yearWoy, woy); + return Calendar::handleGetExtendedYearFromWeekFields(yearWoy, woy, status); } @@ -1254,51 +1268,7 @@ GregorianCalendar::getType() const { return "gregorian"; } -/** - * The system maintains a static default century start date and Year. They are - * initialized the first time they are used. Once the system default century date - * and year are set, they do not change. - */ -static UDate gSystemDefaultCenturyStart = DBL_MIN; -static int32_t gSystemDefaultCenturyStartYear = -1; -static icu::UInitOnce gSystemDefaultCenturyInit {}; - - -UBool GregorianCalendar::haveDefaultCentury() const -{ - return true; -} - -static void U_CALLCONV -initializeSystemDefaultCentury() -{ - // initialize systemDefaultCentury and systemDefaultCenturyYear based - // on the current time. They'll be set to 80 years before - // the current time. - UErrorCode status = U_ZERO_ERROR; - GregorianCalendar calendar(status); - if (U_SUCCESS(status)) { - calendar.setTime(Calendar::getNow(), status); - calendar.add(UCAL_YEAR, -80, status); - - gSystemDefaultCenturyStart = calendar.getTime(status); - gSystemDefaultCenturyStartYear = calendar.get(UCAL_YEAR, status); - } - // We have no recourse upon failure unless we want to propagate the failure - // out. -} - -UDate GregorianCalendar::defaultCenturyStart() const { - // lazy-evaluate systemDefaultCenturyStart - umtx_initOnce(gSystemDefaultCenturyInit, &initializeSystemDefaultCentury); - return gSystemDefaultCenturyStart; -} - -int32_t GregorianCalendar::defaultCenturyStartYear() const { - // lazy-evaluate systemDefaultCenturyStartYear - umtx_initOnce(gSystemDefaultCenturyInit, &initializeSystemDefaultCentury); - return gSystemDefaultCenturyStartYear; -} +IMPL_SYSTEM_DEFAULT_CENTURY(GregorianCalendar, "@calendar=gregory") U_NAMESPACE_END diff --git a/contrib/libs/icu/i18n/gregoimp.cpp b/contrib/libs/icu/i18n/gregoimp.cpp index 31b5aeed83..57499bd308 100644 --- a/contrib/libs/icu/i18n/gregoimp.cpp +++ b/contrib/libs/icu/i18n/gregoimp.cpp @@ -27,12 +27,21 @@ int32_t ClockMath::floorDivide(int32_t numerator, int32_t denominator) { numerator / denominator : ((numerator + 1) / denominator) - 1; } -int64_t ClockMath::floorDivide(int64_t numerator, int64_t denominator) { +int64_t ClockMath::floorDivideInt64(int64_t numerator, int64_t denominator) { return (numerator >= 0) ? numerator / denominator : ((numerator + 1) / denominator) - 1; } -int32_t ClockMath::floorDivide(double numerator, int32_t denominator, +int32_t ClockMath::floorDivide(int32_t numerator, int32_t denominator, + int32_t* remainder) { + int64_t quotient = floorDivide(numerator, denominator); + if (remainder != nullptr) { + *remainder = numerator - (quotient * denominator); + } + return quotient; +} + +double ClockMath::floorDivide(double numerator, int32_t denominator, int32_t* remainder) { // For an integer n and representable ⌊x/n⌋, ⌊RN(x/n)⌋=⌊x/n⌋, where RN is // rounding to nearest. @@ -44,7 +53,7 @@ int32_t ClockMath::floorDivide(double numerator, int32_t denominator, // n+⌈x⌉ = ⌊x+n⌋ + 1. Rewriting it as ⌊x⌋+n makes the addition exact. *remainder = (int32_t) (uprv_floor(numerator) - (quotient * denominator)); } - return (int32_t) quotient; + return quotient; } double ClockMath::floorDivide(double dividend, double divisor, @@ -95,18 +104,20 @@ const int8_t Grego::MONTH_LENGTH[24] = {31,28,31,30,31,30,31,31,30,31,30,31, 31,29,31,30,31,30,31,31,30,31,30,31}; -double Grego::fieldsToDay(int32_t year, int32_t month, int32_t dom) { +int64_t Grego::fieldsToDay(int32_t year, int32_t month, int32_t dom) { - int32_t y = year - 1; + int64_t y = year - 1; - double julian = 365 * y + ClockMath::floorDivide(y, 4) + (JULIAN_1_CE - 3) + // Julian cal - ClockMath::floorDivide(y, 400) - ClockMath::floorDivide(y, 100) + 2 + // => Gregorian cal + int64_t julian = 365LL * y + + ClockMath::floorDivideInt64(y, 4LL) + (JULIAN_1_CE - 3) + // Julian cal + ClockMath::floorDivideInt64(y, 400LL) - + ClockMath::floorDivideInt64(y, 100LL) + 2 + // => Gregorian cal DAYS_BEFORE[month + (isLeapYear(year) ? 12 : 0)] + dom; // => month/dom return julian - JULIAN_1970_CE; // JD => epoch day } -void Grego::dayToFields(double day, int32_t& year, int32_t& month, +void Grego::dayToFields(int32_t day, int32_t& year, int32_t& month, int32_t& dom, int32_t& dow, int32_t& doy) { // Convert from 1970 CE epoch to 1 CE epoch (Gregorian calendar) @@ -130,7 +141,7 @@ void Grego::dayToFields(double day, int32_t& year, int32_t& month, UBool isLeap = isLeapYear(year); // Gregorian day zero is a Monday. - dow = (int32_t) uprv_fmod(day + 1, 7); + dow = (day + 1) % 7; dow += (dow < 0) ? (UCAL_SUNDAY + 7) : UCAL_SUNDAY; // Common Julian/Gregorian calculation @@ -152,7 +163,7 @@ void Grego::timeToFields(UDate time, int32_t& year, int32_t& month, dayToFields(day, year, month, dom, dow, doy); } -int32_t Grego::dayOfWeek(double day) { +int32_t Grego::dayOfWeek(int32_t day) { int32_t dow; ClockMath::floorDivide(day + int{UCAL_THURSDAY}, 7, &dow); return (dow == 0) ? UCAL_SATURDAY : dow; diff --git a/contrib/libs/icu/i18n/gregoimp.h b/contrib/libs/icu/i18n/gregoimp.h index d65d6a4f88..cd7694040d 100644 --- a/contrib/libs/icu/i18n/gregoimp.h +++ b/contrib/libs/icu/i18n/gregoimp.h @@ -14,6 +14,7 @@ #ifndef GREGOIMP_H #define GREGOIMP_H #include "unicode/utypes.h" +#include "unicode/calendar.h" #if !UCONFIG_NO_FORMATTING #include "unicode/ures.h" @@ -49,7 +50,7 @@ class ClockMath { * @param denominator a divisor which must be != 0 * @return the floor of the quotient */ - static int64_t floorDivide(int64_t numerator, int64_t denominator); + static int64_t floorDivideInt64(int64_t numerator, int64_t denominator); /** * Divide two numbers, returning the floor of the quotient. @@ -77,7 +78,25 @@ class ClockMath { * |denominator|)</code>. * @return the floor of the quotient */ - static int32_t floorDivide(double numerator, int32_t denominator, + static int32_t floorDivide(int32_t numerator, int32_t denominator, + int32_t* remainder); + + /** + * Divide two numbers, returning the floor of the quotient and + * the modulus remainder. Unlike the built-in division, this is + * mathematically well-behaved. E.g., <code>-1/4</code> => 0 and + * <code>-1%4</code> => -1, but <code>floorDivide(-1,4)</code> => + * -1 with <code>remainder</code> => 3. NOTE: If numerator is + * too large, the returned quotient may overflow. + * @param numerator the numerator + * @param denominator a divisor which must be != 0 + * @param remainder output parameter to receive the + * remainder. Unlike <code>numerator % denominator</code>, this + * will always be non-negative, in the half-open range <code>[0, + * |denominator|)</code>. + * @return the floor of the quotient + */ + static double floorDivide(double numerator, int32_t denominator, int32_t* remainder); /** @@ -178,31 +197,31 @@ class Grego { * @param dom 1-based day of month * @return the day number, with day 0 == Jan 1 1970 */ - static double fieldsToDay(int32_t year, int32_t month, int32_t dom); + static int64_t fieldsToDay(int32_t year, int32_t month, int32_t dom); /** * Convert a 1970-epoch day number to proleptic Gregorian year, * month, day-of-month, and day-of-week. - * @param day 1970-epoch day (integral value) + * @param day 1970-epoch day * @param year output parameter to receive year * @param month output parameter to receive month (0-based, 0==Jan) * @param dom output parameter to receive day-of-month (1-based) * @param dow output parameter to receive day-of-week (1-based, 1==Sun) * @param doy output parameter to receive day-of-year (1-based) */ - static void dayToFields(double day, int32_t& year, int32_t& month, + static void dayToFields(int32_t day, int32_t& year, int32_t& month, int32_t& dom, int32_t& dow, int32_t& doy); /** * Convert a 1970-epoch day number to proleptic Gregorian year, * month, day-of-month, and day-of-week. - * @param day 1970-epoch day (integral value) + * @param day 1970-epoch day * @param year output parameter to receive year * @param month output parameter to receive month (0-based, 0==Jan) * @param dom output parameter to receive day-of-month (1-based) * @param dow output parameter to receive day-of-week (1-based, 1==Sun) */ - static inline void dayToFields(double day, int32_t& year, int32_t& month, + static inline void dayToFields(int32_t day, int32_t& year, int32_t& month, int32_t& dom, int32_t& dow); /** @@ -221,10 +240,10 @@ class Grego { /** * Return the day of week on the 1970-epoch day - * @param day the 1970-epoch day (integral value) + * @param day the 1970-epoch day * @return the day of week */ - static int32_t dayOfWeek(double day); + static int32_t dayOfWeek(int32_t day); /** * Returns the ordinal number for the specified day of week within the month. @@ -283,7 +302,7 @@ Grego::previousMonthLength(int y, int m) { return (m > 0) ? monthLength(y, m-1) : 31; } -inline void Grego::dayToFields(double day, int32_t& year, int32_t& month, +inline void Grego::dayToFields(int32_t day, int32_t& year, int32_t& month, int32_t& dom, int32_t& dow) { int32_t doy_unused; dayToFields(day,year,month,dom,dow,doy_unused); @@ -291,7 +310,7 @@ inline void Grego::dayToFields(double day, int32_t& year, int32_t& month, inline double Grego::julianDayToMillis(int32_t julian) { - return (julian - kEpochStartAsJulianDay) * kOneDay; + return (static_cast<double>(julian) - kEpochStartAsJulianDay) * kOneDay; } inline int32_t Grego::millisToJulianDay(double millis) { @@ -300,10 +319,50 @@ inline int32_t Grego::millisToJulianDay(double millis) { inline int32_t Grego::gregorianShift(int32_t eyear) { int64_t y = (int64_t)eyear-1; - int32_t gregShift = static_cast<int32_t>(ClockMath::floorDivide(y, (int64_t)400) - ClockMath::floorDivide(y, (int64_t)100) + 2); - return gregShift; + int64_t gregShift = ClockMath::floorDivideInt64(y, 400LL) - ClockMath::floorDivideInt64(y, 100LL) + 2; + return static_cast<int32_t>(gregShift); } +#define IMPL_SYSTEM_DEFAULT_CENTURY(T, U) \ + /** \ + * The system maintains a static default century start date and Year. They \ + * are initialized the first time they are used. Once the system default \ + * century date and year are set, they do not change \ + */ \ + namespace { \ + static UDate gSystemDefaultCenturyStart = DBL_MIN; \ + static int32_t gSystemDefaultCenturyStartYear = -1; \ + static icu::UInitOnce gSystemDefaultCenturyInit {}; \ + static void U_CALLCONV \ + initializeSystemDefaultCentury() { \ + UErrorCode status = U_ZERO_ERROR; \ + T calendar(U, status); \ + /* initialize systemDefaultCentury and systemDefaultCenturyYear based */ \ + /* on the current time. They'll be set to 80 years before */ \ + /* the current time. */ \ + if (U_FAILURE(status)) { \ + return; \ + } \ + calendar.setTime(Calendar::getNow(), status); \ + calendar.add(UCAL_YEAR, -80, status); \ + gSystemDefaultCenturyStart = calendar.getTime(status); \ + gSystemDefaultCenturyStartYear = calendar.get(UCAL_YEAR, status); \ + /* We have no recourse upon failure unless we want to propagate the */ \ + /* failure out. */ \ + } \ + } /* namespace */ \ + UDate T::defaultCenturyStart() const { \ + /* lazy-evaluate systemDefaultCenturyStart */ \ + umtx_initOnce(gSystemDefaultCenturyInit, &initializeSystemDefaultCentury); \ + return gSystemDefaultCenturyStart; \ + } \ + int32_t T::defaultCenturyStartYear() const { \ + /* lazy-evaluate systemDefaultCenturyStart */ \ + umtx_initOnce(gSystemDefaultCenturyInit, &initializeSystemDefaultCentury); \ + return gSystemDefaultCenturyStartYear; \ + } \ + UBool T::haveDefaultCentury() const { return true; } + U_NAMESPACE_END #endif // !UCONFIG_NO_FORMATTING diff --git a/contrib/libs/icu/i18n/hebrwcal.cpp b/contrib/libs/icu/i18n/hebrwcal.cpp index efd0d8fd4a..d74ab2d3e7 100644 --- a/contrib/libs/icu/i18n/hebrwcal.cpp +++ b/contrib/libs/icu/i18n/hebrwcal.cpp @@ -136,6 +136,10 @@ static const int16_t LEAP_MONTH_START[][3] = { { 383, 384, 385 }, // Elul }; +// There are 235 months in 19 years cycle. +static const int32_t MONTHS_IN_CYCLE = 235; +static const int32_t YEARS_IN_CYCLE = 19; + static icu::CalendarCache *gCache = nullptr; U_CDECL_BEGIN @@ -227,12 +231,23 @@ void HebrewCalendar::add(UCalendarDateFields field, int32_t amount, UErrorCode& // ADAR_1 -- then we have to bump to ADAR_2 aka ADAR. But // if amount is -2 and we land in ADAR_1, then we have to // bump the other way -- down to SHEVAT. - Alan 11/00 - int32_t month = get(UCAL_MONTH, status); + int64_t month = get(UCAL_MONTH, status); int32_t year = get(UCAL_YEAR, status); UBool acrossAdar1; if (amount > 0) { acrossAdar1 = (month < ADAR_1); // started before ADAR_1? month += amount; + // We know there are total 235 months in every 19 years. To speed + // up the iteration, we first fast forward in the multiple of 235 + // months for 19 years before the iteration which check the leap year. + if (month >= MONTHS_IN_CYCLE) { + if (uprv_add32_overflow(year, (month / MONTHS_IN_CYCLE) * YEARS_IN_CYCLE, &year)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + month %= MONTHS_IN_CYCLE; + } + for (;;) { if (acrossAdar1 && month>=ADAR_1 && !isLeapYear(year)) { ++month; @@ -247,6 +262,16 @@ void HebrewCalendar::add(UCalendarDateFields field, int32_t amount, UErrorCode& } else { acrossAdar1 = (month > ADAR_1); // started after ADAR_1? month += amount; + // We know there are total 235 months in every 19 years. To speed + // up the iteration, we first fast forward in the multiple of 235 + // months for 19 years before the iteration which check the leap year. + if (month <= -MONTHS_IN_CYCLE) { + if (uprv_add32_overflow(year, (month / MONTHS_IN_CYCLE) * YEARS_IN_CYCLE, &year)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + month %= MONTHS_IN_CYCLE; + } for (;;) { if (acrossAdar1 && month<=ADAR_1 && !isLeapYear(year)) { --month; @@ -394,14 +419,18 @@ static const int32_t BAHARAD = 11*HOUR_PARTS + 204; int32_t HebrewCalendar::startOfYear(int32_t year, UErrorCode &status) { ucln_i18n_registerCleanup(UCLN_I18N_HEBREW_CALENDAR, calendar_hebrew_cleanup); - int32_t day = CalendarCache::get(&gCache, year, status); + int64_t day = CalendarCache::get(&gCache, year, status); + if(U_FAILURE(status)) { + return 0; + } if (day == 0) { // # of months before year - int32_t months = (int32_t)ClockMath::floorDivide((235 * (int64_t)year - 234), (int64_t)19); + int64_t months = ClockMath::floorDivideInt64( + (235LL * (int64_t)year - 234LL), 19LL); - int64_t frac = (int64_t)months * MONTH_FRACT + BAHARAD; // Fractional part of day # - day = months * 29 + (int32_t)(frac / DAY_PARTS); // Whole # part of calculation + int64_t frac = months * MONTH_FRACT + BAHARAD; // Fractional part of day # + day = months * 29LL + frac / DAY_PARTS; // Whole # part of calculation frac = frac % DAY_PARTS; // Time of day int32_t wd = (day % 7); // Day of week (0 == Monday) @@ -423,8 +452,14 @@ int32_t HebrewCalendar::startOfYear(int32_t year, UErrorCode &status) // Prevents 382-day years. day += 1; } - CalendarCache::put(&gCache, year, day, status); + if (day > INT32_MAX || day < INT32_MIN) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + CalendarCache::put(&gCache, year, static_cast<int32_t>(day), status); } + // Out of range value is alread rejected before putting into cache. + U_ASSERT(INT32_MIN <= day && day <= INT32_MAX); return day; } @@ -478,7 +513,7 @@ int32_t HebrewCalendar::yearType(int32_t year) const */ UBool HebrewCalendar::isLeapYear(int32_t year) { //return (year * 12 + 17) % 19 >= 12; - int32_t x = (year*12 + 17) % 19; + int64_t x = (year*12LL + 17) % YEARS_IN_CYCLE; return x >= ((x < 0) ? -7 : 12); } @@ -501,7 +536,10 @@ int32_t HebrewCalendar::handleGetLimit(UCalendarDateFields field, ELimitType lim * Returns the length of the given month in the given year * @internal */ -int32_t HebrewCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month) const { +int32_t HebrewCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month, UErrorCode& status) const { + if(U_FAILURE(status)) { + return 0; + } // Resolve out-of-range months. This is necessary in order to // obtain the correct year. We correct to // a 12- or 13-month year (add/subtract 12 or 13, depending @@ -539,7 +577,10 @@ int32_t HebrewCalendar::handleGetYearLength(int32_t eyear) const { void HebrewCalendar::validateField(UCalendarDateFields field, UErrorCode &status) { if ((field == UCAL_MONTH || field == UCAL_ORDINAL_MONTH) - && !isLeapYear(handleGetExtendedYear()) && internalGetMonth() == ADAR_1) { + && !isLeapYear(handleGetExtendedYear(status)) && internalGetMonth(status) == ADAR_1) { + if (U_FAILURE(status)) { + return; + } status = U_ILLEGAL_ARGUMENT_ERROR; return; } @@ -571,16 +612,25 @@ void HebrewCalendar::validateField(UCalendarDateFields field, UErrorCode &status * @internal */ void HebrewCalendar::handleComputeFields(int32_t julianDay, UErrorCode &status) { + if (U_FAILURE(status)) { + return; + } int32_t d = julianDay - 347997; double m = ClockMath::floorDivide((d * (double)DAY_PARTS), (double) MONTH_PARTS); // Months (approx) int32_t year = (int32_t)(ClockMath::floorDivide((19. * m + 234.), 235.) + 1.); // Years (approx) int32_t ys = startOfYear(year, status); // 1st day of year + if (U_FAILURE(status)) { + return; + } int32_t dayOfYear = (d - ys); // Because of the postponement rules, it's possible to guess wrong. Fix it. while (dayOfYear < 1) { year--; ys = startOfYear(year, status); + if (U_FAILURE(status)) { + return; + } dayOfYear = (d - ys); } @@ -610,6 +660,23 @@ void HebrewCalendar::handleComputeFields(int32_t julianDay, UErrorCode &status) int dayOfMonth = dayOfYear - (isLeap ? LEAP_MONTH_START[month][type] : MONTH_START[month][type]); internalSet(UCAL_ERA, 0); + // Check out of bound year + int32_t min_year = handleGetLimit(UCAL_EXTENDED_YEAR, UCAL_LIMIT_MINIMUM); + if (year < min_year) { + if (!isLenient()) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + year = min_year; + } + int32_t max_year = handleGetLimit(UCAL_EXTENDED_YEAR, UCAL_LIMIT_MAXIMUM); + if (max_year < year) { + if (!isLenient()) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + year = max_year; + } internalSet(UCAL_YEAR, year); internalSet(UCAL_EXTENDED_YEAR, year); int32_t ordinal_month = month; @@ -619,7 +686,7 @@ void HebrewCalendar::handleComputeFields(int32_t julianDay, UErrorCode &status) internalSet(UCAL_ORDINAL_MONTH, ordinal_month); internalSet(UCAL_MONTH, month); internalSet(UCAL_DAY_OF_MONTH, dayOfMonth); - internalSet(UCAL_DAY_OF_YEAR, dayOfYear); + internalSet(UCAL_DAY_OF_YEAR, dayOfYear); } //------------------------------------------------------------------------- @@ -629,37 +696,58 @@ void HebrewCalendar::handleComputeFields(int32_t julianDay, UErrorCode &status) /** * @internal */ -int32_t HebrewCalendar::handleGetExtendedYear() { - int32_t year; +int32_t HebrewCalendar::handleGetExtendedYear(UErrorCode& status ) { + if (U_FAILURE(status)) { + return 0; + } if (newerField(UCAL_EXTENDED_YEAR, UCAL_YEAR) == UCAL_EXTENDED_YEAR) { - year = internalGet(UCAL_EXTENDED_YEAR, 1); // Default to year 1 - } else { - year = internalGet(UCAL_YEAR, 1); // Default to year 1 + return internalGet(UCAL_EXTENDED_YEAR, 1); // Default to year 1 } - return year; + return internalGet(UCAL_YEAR, 1); // Default to year 1 } /** * Return JD of start of given month/year. * @internal */ -int32_t HebrewCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, UBool /*useMonth*/) const { - UErrorCode status = U_ZERO_ERROR; +int64_t HebrewCalendar::handleComputeMonthStart( + int32_t eyear, int32_t month, UBool /*useMonth*/, UErrorCode& status) const { + if (U_FAILURE(status)) { + return 0; + } // Resolve out-of-range months. This is necessary in order to // obtain the correct year. We correct to // a 12- or 13-month year (add/subtract 12 or 13, depending // on the year) but since we _always_ number from 0..12, and // the leap year determines whether or not month 5 (Adar 1) // is present, we allow 0..12 in any given year. + + // The month could be in large value, we first roll 235 months to 19 years + // before the while loop. + if (month <= -MONTHS_IN_CYCLE || month >= MONTHS_IN_CYCLE) { + if (uprv_add32_overflow(eyear, (month / MONTHS_IN_CYCLE) * YEARS_IN_CYCLE, &eyear)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + month %= MONTHS_IN_CYCLE; + } while (month < 0) { - month += monthsInYear(--eyear); + if (uprv_add32_overflow(eyear, -1, &eyear) || + uprv_add32_overflow(month, monthsInYear(eyear), &month)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } } // Careful: allow 0..12 in all years while (month > 12) { - month -= monthsInYear(eyear++); + if (uprv_add32_overflow(month, -monthsInYear(eyear), &month) || + uprv_add32_overflow(eyear, 1, &eyear)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } } - int32_t day = startOfYear(eyear, status); + int64_t day = startOfYear(eyear, status); if(U_FAILURE(status)) { return 0; @@ -673,7 +761,7 @@ int32_t HebrewCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, UB } } - return (int) (day + 347997); + return day + 347997LL; } constexpr uint32_t kHebrewRelatedYearDiff = -3760; @@ -693,55 +781,16 @@ void HebrewCalendar::setRelatedYear(int32_t year) set(UCAL_EXTENDED_YEAR, year - kHebrewRelatedYearDiff); } -/** - * The system maintains a static default century start date and Year. They are - * initialized the first time they are used. Once the system default century date - * and year are set, they do not change. - */ -static UDate gSystemDefaultCenturyStart = DBL_MIN; -static int32_t gSystemDefaultCenturyStartYear = -1; -static icu::UInitOnce gSystemDefaultCenturyInit {}; - -UBool HebrewCalendar::haveDefaultCentury() const -{ - return true; -} - -static void U_CALLCONV initializeSystemDefaultCentury() -{ - // initialize systemDefaultCentury and systemDefaultCenturyYear based - // on the current time. They'll be set to 80 years before - // the current time. - UErrorCode status = U_ZERO_ERROR; - HebrewCalendar calendar(Locale("@calendar=hebrew"),status); - if (U_SUCCESS(status)) { - calendar.setTime(Calendar::getNow(), status); - calendar.add(UCAL_YEAR, -80, status); - - gSystemDefaultCenturyStart = calendar.getTime(status); - gSystemDefaultCenturyStartYear = calendar.get(UCAL_YEAR, status); - } - // We have no recourse upon failure unless we want to propagate the failure - // out. -} - - -UDate HebrewCalendar::defaultCenturyStart() const { - // lazy-evaluate systemDefaultCenturyStart - umtx_initOnce(gSystemDefaultCenturyInit, &initializeSystemDefaultCentury); - return gSystemDefaultCenturyStart; -} - -int32_t HebrewCalendar::defaultCenturyStartYear() const { - // lazy-evaluate systemDefaultCenturyStartYear - umtx_initOnce(gSystemDefaultCenturyInit, &initializeSystemDefaultCentury); - return gSystemDefaultCenturyStartYear; -} +IMPL_SYSTEM_DEFAULT_CENTURY(HebrewCalendar, "@calendar=hebrew") bool HebrewCalendar::inTemporalLeapYear(UErrorCode& status) const { - if (U_FAILURE(status)) return false; + if (U_FAILURE(status)) { + return false; + } int32_t eyear = get(UCAL_EXTENDED_YEAR, status); - if (U_FAILURE(status)) return false; + if (U_FAILURE(status)) { + return false; + } return isLeapYear(eyear); } @@ -752,13 +801,17 @@ static const char * const gTemporalMonthCodesForHebrew[] = { const char* HebrewCalendar::getTemporalMonthCode(UErrorCode& status) const { int32_t month = get(UCAL_MONTH, status); - if (U_FAILURE(status)) return nullptr; + if (U_FAILURE(status)) { + return nullptr; + } return gTemporalMonthCodesForHebrew[month]; } void HebrewCalendar::setTemporalMonthCode(const char* code, UErrorCode& status ) { - if (U_FAILURE(status)) return; + if (U_FAILURE(status)) { + return; + } int32_t len = static_cast<int32_t>(uprv_strlen(code)); if (len == 3 || len == 4) { for (int m = 0; gTemporalMonthCodesForHebrew[m] != nullptr; m++) { @@ -771,15 +824,26 @@ void HebrewCalendar::setTemporalMonthCode(const char* code, UErrorCode& status ) status = U_ILLEGAL_ARGUMENT_ERROR; } -int32_t HebrewCalendar::internalGetMonth() const { +int32_t HebrewCalendar::internalGetMonth(UErrorCode& status) const { + if (U_FAILURE(status)) { + return 0; + } if (resolveFields(kMonthPrecedence) == UCAL_ORDINAL_MONTH) { int32_t ordinalMonth = internalGet(UCAL_ORDINAL_MONTH); HebrewCalendar *nonConstThis = (HebrewCalendar*)this; // cast away const - int32_t year = nonConstThis->handleGetExtendedYear(); - return ordinalMonth + ((isLeapYear(year) && (ordinalMonth > ADAR_1)) ? 1: 0); + int32_t year = nonConstThis->handleGetExtendedYear(status); + if (U_FAILURE(status)) { + return 0; + } + if (isLeapYear(year) || ordinalMonth <= ADAR_1) { + return ordinalMonth; + } + if (!uprv_add32_overflow(ordinalMonth, 1, &ordinalMonth)) { + return ordinalMonth; + } } - return Calendar::internalGetMonth(); + return Calendar::internalGetMonth(status); } UOBJECT_DEFINE_RTTI_IMPLEMENTATION(HebrewCalendar) diff --git a/contrib/libs/icu/i18n/hebrwcal.h b/contrib/libs/icu/i18n/hebrwcal.h index 829a642211..342fdb0efa 100644 --- a/contrib/libs/icu/i18n/hebrwcal.h +++ b/contrib/libs/icu/i18n/hebrwcal.h @@ -319,7 +319,7 @@ public: * implementation than the default implementation in Calendar. * @internal */ - virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month) const override; + virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month, UErrorCode& status) const override; /** * Return the number of days in the given extended year of this @@ -350,10 +350,11 @@ public: * use the UCAL_EXTENDED_YEAR field or the UCAL_YEAR and supra-year fields (such * as UCAL_ERA) specific to the calendar system, depending on which set of * fields is newer. + * @param status * @return the extended year * @internal */ - virtual int32_t handleGetExtendedYear() override; + virtual int32_t handleGetExtendedYear(UErrorCode& status) override; /** * Return the Julian day number of day before the first day of the * given month in the given extended year. Subclasses should override @@ -367,8 +368,8 @@ public: * day of the given month and year * @internal */ - virtual int32_t handleComputeMonthStart(int32_t eyear, int32_t month, - UBool useMonth) const override; + virtual int64_t handleComputeMonthStart(int32_t eyear, int32_t month, + UBool useMonth, UErrorCode& status) const override; /** @@ -380,24 +381,7 @@ public: virtual void validateField(UCalendarDateFields field, UErrorCode &status) override; protected: - /** - * Returns true because the Hebrew Calendar does have a default century - * @internal - */ - virtual UBool haveDefaultCentury() const override; - - /** - * Returns the date of the start of the default century - * @return start of century - in milliseconds since epoch, 1970 - * @internal - */ - virtual UDate defaultCenturyStart() const override; - - /** - * Returns the year in which the default century begins - * @internal - */ - virtual int32_t defaultCenturyStartYear() const override; + DECLARE_OVERRIDE_SYSTEM_DEFAULT_CENTURY public: /** @@ -442,7 +426,7 @@ public: virtual void setTemporalMonthCode(const char* code, UErrorCode& status ) override; protected: - virtual int32_t internalGetMonth() const override; + virtual int32_t internalGetMonth(UErrorCode& status) const override; private: // Calendar-specific implementation /** diff --git a/contrib/libs/icu/i18n/indiancal.cpp b/contrib/libs/icu/i18n/indiancal.cpp index 29c2749f48..1cca8e5f84 100644 --- a/contrib/libs/icu/i18n/indiancal.cpp +++ b/contrib/libs/icu/i18n/indiancal.cpp @@ -108,7 +108,7 @@ static UBool isGregorianLeap(int32_t year) * @param eyear The year in Saka Era * @param month The month(0-based) in Indian calendar */ -int32_t IndianCalendar::handleGetMonthLength(int32_t eyear, int32_t month) const { +int32_t IndianCalendar::handleGetMonthLength(int32_t eyear, int32_t month, UErrorCode& /* status */) const { if (month < 0 || month > 11) { eyear += ClockMath::floorDivide(month, 12, &month); } @@ -203,14 +203,20 @@ static double IndianToJD(int32_t year, int32_t month, int32_t date) { * @param eyear The year in Indian Calendar measured from Saka Era (78 AD). * @param month The month in Indian calendar */ -int32_t IndianCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, UBool /* useMonth */ ) const { +int64_t IndianCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, UBool /* useMonth */, UErrorCode& status) const { + if (U_FAILURE(status)) { + return 0; + } //month is 0 based; converting it to 1-based int32_t imonth; // If the month is out of range, adjust it into range, and adjust the extended year accordingly if (month < 0 || month > 11) { - eyear += (int32_t)ClockMath::floorDivide(month, 12, &month); + if (uprv_add32_overflow(eyear, ClockMath::floorDivide(month, 12, &month), &eyear)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } } if(month == 12){ @@ -219,16 +225,19 @@ int32_t IndianCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, UB imonth = month + 1; } - double jd = IndianToJD(eyear ,imonth, 1); + int64_t jd = IndianToJD(eyear ,imonth, 1); - return (int32_t)jd; + return jd; } //------------------------------------------------------------------------- // Functions for converting from milliseconds to field values //------------------------------------------------------------------------- -int32_t IndianCalendar::handleGetExtendedYear() { +int32_t IndianCalendar::handleGetExtendedYear(UErrorCode& status) { + if (U_FAILURE(status)) { + return 0; + } int32_t year; if (newerField(UCAL_EXTENDED_YEAR, UCAL_YEAR) == UCAL_EXTENDED_YEAR) { @@ -307,7 +316,11 @@ int32_t IndianCalendar::getRelatedYear(UErrorCode &status) const if (U_FAILURE(status)) { return 0; } - return year + kIndianRelatedYearDiff; + if (uprv_add32_overflow(year, kIndianRelatedYearDiff, &year)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + return year; } void IndianCalendar::setRelatedYear(int32_t year) @@ -316,60 +329,7 @@ void IndianCalendar::setRelatedYear(int32_t year) set(UCAL_EXTENDED_YEAR, year - kIndianRelatedYearDiff); } -/** - * The system maintains a static default century start date and Year. They are - * initialized the first time they are used. Once the system default century date - * and year are set, they do not change. - */ -static UDate gSystemDefaultCenturyStart = DBL_MIN; -static int32_t gSystemDefaultCenturyStartYear = -1; -static icu::UInitOnce gSystemDefaultCenturyInit {}; - - -UBool IndianCalendar::haveDefaultCentury() const -{ - return true; -} - -static void U_CALLCONV -initializeSystemDefaultCentury() -{ - // initialize systemDefaultCentury and systemDefaultCenturyYear based - // on the current time. They'll be set to 80 years before - // the current time. - UErrorCode status = U_ZERO_ERROR; - - IndianCalendar calendar ( Locale ( "@calendar=Indian" ), status); - if ( U_SUCCESS ( status ) ) { - calendar.setTime ( Calendar::getNow(), status ); - calendar.add ( UCAL_YEAR, -80, status ); - - UDate newStart = calendar.getTime ( status ); - int32_t newYear = calendar.get ( UCAL_YEAR, status ); - - gSystemDefaultCenturyStart = newStart; - gSystemDefaultCenturyStartYear = newYear; - } - // We have no recourse upon failure. -} - - -UDate -IndianCalendar::defaultCenturyStart() const -{ - // lazy-evaluate systemDefaultCenturyStart - umtx_initOnce(gSystemDefaultCenturyInit, &initializeSystemDefaultCentury); - return gSystemDefaultCenturyStart; -} - -int32_t -IndianCalendar::defaultCenturyStartYear() const -{ - // lazy-evaluate systemDefaultCenturyStartYear - umtx_initOnce(gSystemDefaultCenturyInit, &initializeSystemDefaultCentury); - return gSystemDefaultCenturyStartYear; -} - +IMPL_SYSTEM_DEFAULT_CENTURY(IndianCalendar, "@calendar=indian") UOBJECT_DEFINE_RTTI_IMPLEMENTATION(IndianCalendar) diff --git a/contrib/libs/icu/i18n/indiancal.h b/contrib/libs/icu/i18n/indiancal.h index 5ef9113a85..2062bcec91 100644 --- a/contrib/libs/icu/i18n/indiancal.h +++ b/contrib/libs/icu/i18n/indiancal.h @@ -209,7 +209,7 @@ public: * @param year The month(0-based) in Indian year * @internal */ - virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month) const override; + virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month, UErrorCode& status) const override; /** * Return the number of days in the given Indian year @@ -225,7 +225,7 @@ public: /** * @internal */ - virtual int32_t handleComputeMonthStart(int32_t eyear, int32_t month, UBool useMonth) const override; + virtual int64_t handleComputeMonthStart(int32_t eyear, int32_t month, UBool useMonth, UErrorCode& status) const override; //------------------------------------------------------------------------- // Functions for converting from milliseconds to field values @@ -234,7 +234,7 @@ public: /** * @internal */ - virtual int32_t handleGetExtendedYear() override; + virtual int32_t handleGetExtendedYear(UErrorCode& status) override; /** * Override Calendar to compute several fields specific to the Indian @@ -304,24 +304,8 @@ private: // Default century. protected: - /** - * Returns true because the Indian Calendar does have a default century - * @internal - */ - virtual UBool haveDefaultCentury() const override; - - /** - * Returns the date of the start of the default century - * @return start of century - in milliseconds since epoch, 1970 - * @internal - */ - virtual UDate defaultCenturyStart() const override; - /** - * Returns the year in which the default century begins - * @internal - */ - virtual int32_t defaultCenturyStartYear() const override; + DECLARE_OVERRIDE_SYSTEM_DEFAULT_CENTURY }; U_NAMESPACE_END diff --git a/contrib/libs/icu/i18n/inputext.cpp b/contrib/libs/icu/i18n/inputext.cpp index bce9862c0f..0351518b70 100644 --- a/contrib/libs/icu/i18n/inputext.cpp +++ b/contrib/libs/icu/i18n/inputext.cpp @@ -30,8 +30,8 @@ InputText::InputText(UErrorCode &status) // removed if appropriate. fByteStats(NEW_ARRAY(int16_t, 256)), // byte frequency statistics for the input text. // Value is percent, not absolute. - fDeclaredEncoding(0), - fRawInput(0), + fDeclaredEncoding(nullptr), + fRawInput(nullptr), fRawLength(0) { if (fInputBytes == nullptr || fByteStats == nullptr) { diff --git a/contrib/libs/icu/i18n/islamcal.cpp b/contrib/libs/icu/i18n/islamcal.cpp index c21530a736..d299358a5f 100644 --- a/contrib/libs/icu/i18n/islamcal.cpp +++ b/contrib/libs/icu/i18n/islamcal.cpp @@ -55,7 +55,6 @@ static void debug_islamcal_msg(const char *pat, ...) // --- The cache -- // cache of months static icu::CalendarCache *gMonthCache = nullptr; -static icu::CalendarAstronomer *gIslamicCalendarAstro = nullptr; U_CDECL_BEGIN static UBool calendar_islamic_cleanup() { @@ -63,10 +62,6 @@ static UBool calendar_islamic_cleanup() { delete gMonthCache; gMonthCache = nullptr; } - if (gIslamicCalendarAstro) { - delete gIslamicCalendarAstro; - gIslamicCalendarAstro = nullptr; - } return true; } U_CDECL_END @@ -192,15 +187,6 @@ static const int UMALQURA_MONTHLENGTH[] = { 0x06AA, 0x0AD6, 0x055D, 0x029D }; -int32_t getUmalqura_MonthLength(int32_t y, int32_t m) { - int32_t mask = (int32_t) (0x01 << (11 - m)); // set mask for bit corresponding to month - if((UMALQURA_MONTHLENGTH[y] & mask) == 0 ) - return 29; - else - return 30; - -} - //------------------------------------------------------------------------- // Constructors... //------------------------------------------------------------------------- @@ -273,6 +259,8 @@ int32_t IslamicCalendar::handleGetLimit(UCalendarDateFields field, ELimitType li // Assorted calculation utilities // +namespace { + // we could compress this down more if we need to static const int8_t umAlQuraYrStartEstimateFix[] = { 0, 0, -1, 0, -1, 0, 0, 0, 0, 0, // 1300.. @@ -311,16 +299,19 @@ static const int8_t umAlQuraYrStartEstimateFix[] = { /** * Determine whether a year is a leap year in the Islamic civil calendar */ -UBool IslamicCalendar::civilLeapYear(int32_t year) -{ +inline bool civilLeapYear(int32_t year) { return (14 + 11 * year) % 30 < 11; } +int32_t trueMonthStart(int32_t month); + +} // namespace + /** * Return the day # on which the given year starts. Days are counted * from the Hijri epoch, origin 0. */ -int32_t IslamicCalendar::yearStart(int32_t year) const{ +int64_t IslamicCalendar::yearStart(int32_t year) const{ return trueMonthStart(12*(year-1)); } @@ -331,10 +322,33 @@ int32_t IslamicCalendar::yearStart(int32_t year) const{ * @param year The hijri year * @param month The hijri month, 0-based (assumed to be in range 0..11) */ -int32_t IslamicCalendar::monthStart(int32_t year, int32_t month) const { - return trueMonthStart(12*(year-1) + month); +int64_t IslamicCalendar::monthStart(int32_t year, int32_t month, UErrorCode& status) const { + if (U_FAILURE(status)) { + return 0; + } + int32_t temp; + if (uprv_add32_overflow(year, -1, &temp) || + uprv_mul32_overflow(temp, 12, &temp) || + uprv_add32_overflow(temp, month, &month)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + + return trueMonthStart(month); } +namespace { +/** + * Return the "age" of the moon at the given time; this is the difference + * in ecliptic latitude between the moon and the sun. This method simply + * calls CalendarAstronomer.moonAge, converts to degrees, + * and adjusts the resultto be in the range [-180, 180]. + * + * @param time The time at which the moon's age is desired, + * in millis since 1/1/1970. + */ +double moonAge(UDate time); + /** * Find the day number on which a particular month of the true/lunar * Islamic calendar starts. @@ -343,82 +357,46 @@ int32_t IslamicCalendar::monthStart(int32_t year, int32_t month) const { * * @return The day number on which the given month starts. */ -int32_t IslamicCalendar::trueMonthStart(int32_t month) const -{ +int32_t trueMonthStart(int32_t month) { + ucln_i18n_registerCleanup(UCLN_I18N_ISLAMIC_CALENDAR, calendar_islamic_cleanup); UErrorCode status = U_ZERO_ERROR; - int32_t start = CalendarCache::get(&gMonthCache, month, status); + int64_t start = CalendarCache::get(&gMonthCache, month, status); - if (start==0) { + if (U_SUCCESS(status) && start==0) { // Make a guess at when the month started, using the average length UDate origin = HIJRA_MILLIS + uprv_floor(month * CalendarAstronomer::SYNODIC_MONTH) * kOneDay; // moonAge will fail due to memory allocation error - double age = moonAge(origin, status); - if (U_FAILURE(status)) { - goto trueMonthStartEnd; - } + double age = moonAge(origin); if (age >= 0) { // The month has already started do { origin -= kOneDay; - age = moonAge(origin, status); - if (U_FAILURE(status)) { - goto trueMonthStartEnd; - } + age = moonAge(origin); } while (age >= 0); } else { // Preceding month has not ended yet. do { origin += kOneDay; - age = moonAge(origin, status); - if (U_FAILURE(status)) { - goto trueMonthStartEnd; - } + age = moonAge(origin); } while (age < 0); } - start = (int32_t)(ClockMath::floorDivide( - (int64_t)((int64_t)origin - HIJRA_MILLIS), (int64_t)kOneDay) + 1); + start = ClockMath::floorDivideInt64( + (int64_t)((int64_t)origin - HIJRA_MILLIS), (int64_t)kOneDay) + 1; CalendarCache::put(&gMonthCache, month, start, status); } -trueMonthStartEnd : if(U_FAILURE(status)) { start = 0; } return start; } -/** -* Return the "age" of the moon at the given time; this is the difference -* in ecliptic latitude between the moon and the sun. This method simply -* calls CalendarAstronomer.moonAge, converts to degrees, -* and adjusts the result to be in the range [-180, 180]. -* -* @param time The time at which the moon's age is desired, -* in millis since 1/1/1970. -*/ -double IslamicCalendar::moonAge(UDate time, UErrorCode &status) -{ - double age = 0; - - static UMutex astroLock; // pod bay door lock - umtx_lock(&astroLock); - if(gIslamicCalendarAstro == nullptr) { - gIslamicCalendarAstro = new CalendarAstronomer(); - if (gIslamicCalendarAstro == nullptr) { - status = U_MEMORY_ALLOCATION_ERROR; - return age; - } - ucln_i18n_registerCleanup(UCLN_I18N_ISLAMIC_CALENDAR, calendar_islamic_cleanup); - } - gIslamicCalendarAstro->setTime(time); - age = gIslamicCalendarAstro->getMoonAge(); - umtx_unlock(&astroLock); - +double moonAge(UDate time) { // Convert to degrees and normalize... - age = age * 180 / CalendarAstronomer::PI; + double age = CalendarAstronomer(time).getMoonAge() * 180 / CalendarAstronomer::PI; if (age > 180) { age = age - 360; } @@ -426,6 +404,7 @@ double IslamicCalendar::moonAge(UDate time, UErrorCode &status) return age; } +} // namespace //---------------------------------------------------------------------- // Calendar framework //---------------------------------------------------------------------- @@ -437,7 +416,8 @@ double IslamicCalendar::moonAge(UDate time, UErrorCode &status) * @param year The hijri month, 0-based * @draft ICU 2.4 */ -int32_t IslamicCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month) const { +int32_t IslamicCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month, + UErrorCode& /* status */) const { month = 12*(extendedYear-1) + month; return trueMonthStart(month+1) - trueMonthStart(month) ; } @@ -463,18 +443,30 @@ int32_t IslamicCalendar::handleGetYearLength(int32_t extendedYear) const { /** * @draft ICU 2.4 */ -int32_t IslamicCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, UBool /* useMonth */) const { +int64_t IslamicCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, + UBool /* useMonth */, + UErrorCode& status) const { + if (U_FAILURE(status)) { + return 0; + } // This may be called by Calendar::handleComputeJulianDay with months out of the range // 0..11. Need to handle that here since monthStart requires months in the range 0.11. if (month > 11) { eyear += (month / 12); + if (uprv_add32_overflow(eyear, (month / 12), &eyear)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } month %= 12; } else if (month < 0) { month++; - eyear += (month / 12) - 1; + if (uprv_add32_overflow(eyear, (month / 12) - 1, &eyear)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } month = (month % 12) + 11; } - return monthStart(eyear, month) + getEpoc() - 1; + return monthStart(eyear, month, status) + getEpoc() - 1; } //------------------------------------------------------------------------- @@ -484,14 +476,11 @@ int32_t IslamicCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, U /** * @draft ICU 2.4 */ -int32_t IslamicCalendar::handleGetExtendedYear() { - int32_t year; +int32_t IslamicCalendar::handleGetExtendedYear(UErrorCode& /* status */) { if (newerField(UCAL_EXTENDED_YEAR, UCAL_YEAR) == UCAL_EXTENDED_YEAR) { - year = internalGet(UCAL_EXTENDED_YEAR, 1); // Default to year 1 - } else { - year = internalGet(UCAL_YEAR, 1); // Default to year 1 + return internalGet(UCAL_EXTENDED_YEAR, 1); // Default to year 1 } - return year; + return internalGet(UCAL_YEAR, 1); // Default to year 1 } /** @@ -519,11 +508,7 @@ void IslamicCalendar::handleComputeFields(int32_t julianDay, UErrorCode &status) int32_t startDate = (int32_t)uprv_floor(month * CalendarAstronomer::SYNODIC_MONTH); - double age = moonAge(internalGetTime(), status); - if (U_FAILURE(status)) { - status = U_MEMORY_ALLOCATION_ERROR; - return; - } + double age = moonAge(internalGetTime()); if ( days - startDate >= 25 && age > 0) { // If we're near the end of the month, assume next month and search backwards month++; @@ -538,10 +523,24 @@ void IslamicCalendar::handleComputeFields(int32_t julianDay, UErrorCode &status) int32_t year = month >= 0 ? ((month / 12) + 1) : ((month + 1 ) / 12); month = ((month % 12) + 12 ) % 12; - int32_t dayOfMonth = (days - monthStart(year, month)) + 1; + int64_t dayOfMonth = (days - monthStart(year, month, status)) + 1; + if (U_FAILURE(status)) { + return; + } + if (dayOfMonth > INT32_MAX || dayOfMonth < INT32_MIN) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } // Now figure out the day of the year. - int32_t dayOfYear = (days - monthStart(year, 0)) + 1; + int64_t dayOfYear = (days - monthStart(year, 0, status)) + 1; + if (U_FAILURE(status)) { + return; + } + if (dayOfYear > INT32_MAX || dayOfYear < INT32_MIN) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } internalSet(UCAL_ERA, 0); internalSet(UCAL_YEAR, year); @@ -582,7 +581,8 @@ int32_t IslamicCalendar::getRelatedYear(UErrorCode &status) const return gregoYearFromIslamicStart(year); } -static int32_t firstIslamicStartYearFromGrego(int32_t year) { +void IslamicCalendar::setRelatedYear(int32_t year) +{ // ad hoc conversion, improve under #10752 // rough est for now, ok for grego 1846-2138, // otherwise occasionally wrong (for 3% of years) @@ -596,69 +596,20 @@ static int32_t firstIslamicStartYearFromGrego(int32_t year) { offset = -(year - 1976) % 65; shift = 2*cycle + ((offset <= 32)? 1: 0); } - return year - 579 + shift; -} - -void IslamicCalendar::setRelatedYear(int32_t year) -{ - set(UCAL_EXTENDED_YEAR, firstIslamicStartYearFromGrego(year)); -} - -/** - * The system maintains a static default century start date and Year. They are - * initialized the first time they are used. Once the system default century date - * and year are set, they do not change. - */ -static UDate gSystemDefaultCenturyStart = DBL_MIN; -static int32_t gSystemDefaultCenturyStartYear = -1; -static icu::UInitOnce gSystemDefaultCenturyInit {}; - - -UBool IslamicCalendar::haveDefaultCentury() const -{ - return true; + year = year - 579 + shift; + set(UCAL_EXTENDED_YEAR, year); } -UDate IslamicCalendar::defaultCenturyStart() const -{ - // lazy-evaluate systemDefaultCenturyStart - umtx_initOnce(gSystemDefaultCenturyInit, &initializeSystemDefaultCentury); - return gSystemDefaultCenturyStart; -} - -int32_t IslamicCalendar::defaultCenturyStartYear() const -{ - // lazy-evaluate systemDefaultCenturyStartYear - umtx_initOnce(gSystemDefaultCenturyInit, &initializeSystemDefaultCentury); - return gSystemDefaultCenturyStartYear; -} +IMPL_SYSTEM_DEFAULT_CENTURY(IslamicCalendar, "@calendar=islamic-civil") bool IslamicCalendar::inTemporalLeapYear(UErrorCode &status) const { int32_t days = getActualMaximum(UCAL_DAY_OF_YEAR, status); - if (U_FAILURE(status)) return false; - return days == 355; -} - - -U_CFUNC void U_CALLCONV -IslamicCalendar::initializeSystemDefaultCentury() -{ - // initialize systemDefaultCentury and systemDefaultCenturyYear based - // on the current time. They'll be set to 80 years before - // the current time. - UErrorCode status = U_ZERO_ERROR; - IslamicCalendar calendar(Locale("@calendar=islamic-civil"),status); - if (U_SUCCESS(status)) { - calendar.setTime(Calendar::getNow(), status); - calendar.add(UCAL_YEAR, -80, status); - - gSystemDefaultCenturyStart = calendar.getTime(status); - gSystemDefaultCenturyStartYear = calendar.get(UCAL_YEAR, status); + if (U_FAILURE(status)) { + return false; } - // We have no recourse upon failure unless we want to propagate the failure - // out. + return days == 355; } /***************************************************************************** @@ -685,10 +636,8 @@ IslamicCivilCalendar* IslamicCivilCalendar::clone() const { * Return the day # on which the given year starts. Days are counted * from the Hijri epoch, origin 0. */ -int32_t IslamicCivilCalendar::yearStart(int32_t year) const{ - return static_cast<int32_t>( - (year-1)*354 + ClockMath::floorDivide((3+11*static_cast<int64_t>(year)), - static_cast<int64_t>(30))); +int64_t IslamicCivilCalendar::yearStart(int32_t year) const{ + return 354LL * (year-1LL) + ClockMath::floorDivideInt64(3 + 11LL * year, 30LL); } /** @@ -698,13 +647,12 @@ int32_t IslamicCivilCalendar::yearStart(int32_t year) const{ * @param year The hijri year * @param month The hijri month, 0-based (assumed to be in range 0..11) */ -int32_t IslamicCivilCalendar::monthStart(int32_t year, int32_t month) const { +int64_t IslamicCivilCalendar::monthStart(int32_t year, int32_t month, UErrorCode& /*status*/) const { // This does not handle months out of the range 0..11 - return static_cast<int32_t>( - uprv_ceil(29.5*month) + (year-1)*354 + - static_cast<int32_t>(ClockMath::floorDivide( - 3+11*static_cast<int64_t>(year), - static_cast<int64_t>(30)))); + return static_cast<int64_t>( + uprv_ceil(29.5*month) + 354LL*(year-1LL) + + ClockMath::floorDivideInt64( + 11LL*static_cast<int64_t>(year) + 3LL, 30LL)); } /** @@ -714,7 +662,8 @@ int32_t IslamicCivilCalendar::monthStart(int32_t year, int32_t month) const { * @param year The hijri month, 0-based * @draft ICU 2.4 */ -int32_t IslamicCivilCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month) const { +int32_t IslamicCivilCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month, + UErrorCode& /* status */) const { int32_t length = 29 + (month+1) % 2; if (month == DHU_AL_HIJJAH && civilLeapYear(extendedYear)) { length++; @@ -751,17 +700,30 @@ void IslamicCivilCalendar::handleComputeFields(int32_t julianDay, UErrorCode &st int32_t days = julianDay - getEpoc(); // Use the civil calendar approximation, which is just arithmetic - int32_t year = static_cast<int32_t>( - ClockMath::floorDivide(30 * static_cast<int64_t>(days) + 10646, - static_cast<int64_t>(10631))); + int64_t year = + ClockMath::floorDivideInt64(30LL * days + 10646LL, 10631LL); int32_t month = static_cast<int32_t>( uprv_ceil((days - 29 - yearStart(year)) / 29.5 )); month = month<11?month:11; - int32_t dayOfMonth = (days - monthStart(year, month)) + 1; + int64_t dayOfMonth = (days - monthStart(year, month, status)) + 1; + if (U_FAILURE(status)) { + return; + } + if (dayOfMonth > INT32_MAX || dayOfMonth < INT32_MIN) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } // Now figure out the day of the year. - int32_t dayOfYear = (days - monthStart(year, 0)) + 1; + int64_t dayOfYear = (days - monthStart(year, 0, status)) + 1; + if (U_FAILURE(status)) { + return; + } + if (dayOfYear > INT32_MAX || dayOfYear < INT32_MIN) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } internalSet(UCAL_ERA, 0); internalSet(UCAL_YEAR, year); @@ -799,7 +761,7 @@ int32_t IslamicTBLACalendar::getEpoc() const { * IslamicUmalquraCalendar *****************************************************************************/ IslamicUmalquraCalendar::IslamicUmalquraCalendar(const Locale& aLocale, UErrorCode& success) - : IslamicCalendar(aLocale, success) + : IslamicCivilCalendar(aLocale, success) { } @@ -819,15 +781,13 @@ IslamicUmalquraCalendar* IslamicUmalquraCalendar::clone() const { * Return the day # on which the given year starts. Days are counted * from the Hijri epoch, origin 0. */ -int32_t IslamicUmalquraCalendar::yearStart(int32_t year) const { +int64_t IslamicUmalquraCalendar::yearStart(int32_t year) const { if (year < UMALQURA_YEAR_START || year > UMALQURA_YEAR_END) { - return static_cast<int32_t>( - (year-1)*354 + ClockMath::floorDivide((3+11*static_cast<int64_t>(year)), - static_cast<int64_t>(30))); + return IslamicCivilCalendar::yearStart(year); } year -= UMALQURA_YEAR_START; // rounded least-squares fit of the dates previously calculated from UMALQURA_MONTHLENGTH iteration - int32_t yrStartLinearEstimate = static_cast<int32_t>( + int64_t yrStartLinearEstimate = static_cast<int64_t>( (354.36720 * (double)year) + 460322.05 + 0.5); // need a slight correction to some return yrStartLinearEstimate + umAlQuraYrStartEstimateFix[year]; @@ -840,10 +800,16 @@ int32_t IslamicUmalquraCalendar::yearStart(int32_t year) const { * @param year The hijri year * @param month The hijri month, 0-based (assumed to be in range 0..11) */ -int32_t IslamicUmalquraCalendar::monthStart(int32_t year, int32_t month) const { - int32_t ms = yearStart(year); +int64_t IslamicUmalquraCalendar::monthStart(int32_t year, int32_t month, UErrorCode& status) const { + if (U_FAILURE(status)) { + return 0; + } + int64_t ms = yearStart(year); for(int i=0; i< month; i++){ - ms+= handleGetMonthLength(year, i); + ms+= handleGetMonthLength(year, i, status); + if (U_FAILURE(status)) { + return 0; + } } return ms; } @@ -854,16 +820,18 @@ int32_t IslamicUmalquraCalendar::monthStart(int32_t year, int32_t month) const { * @param year The hijri year * @param year The hijri month, 0-based */ -int32_t IslamicUmalquraCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month) const { - int32_t length = 0; +int32_t IslamicUmalquraCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month, + UErrorCode& status) const { if (extendedYear<UMALQURA_YEAR_START || extendedYear>UMALQURA_YEAR_END) { - length = 29 + (month+1) % 2; - if (month == DHU_AL_HIJJAH && civilLeapYear(extendedYear)) { - length++; - } - return length; + return IslamicCivilCalendar::handleGetMonthLength(extendedYear, month, status); } - return getUmalqura_MonthLength(extendedYear - UMALQURA_YEAR_START, month); + int32_t length = 29; + int32_t mask = (int32_t) (0x01 << (11 - month)); // set mask for bit corresponding to month + int32_t index = extendedYear - UMALQURA_YEAR_START; + if ((UMALQURA_MONTHLENGTH[index] & mask) != 0) { + length++; + } + return length; } /** @@ -872,13 +840,15 @@ int32_t IslamicUmalquraCalendar::handleGetMonthLength(int32_t extendedYear, int3 */ int32_t IslamicUmalquraCalendar::handleGetYearLength(int32_t extendedYear) const { if (extendedYear<UMALQURA_YEAR_START || extendedYear>UMALQURA_YEAR_END) { - return 354 + (civilLeapYear(extendedYear) ? 1 : 0); + return IslamicCivilCalendar::handleGetYearLength(extendedYear); } - int len = 0; + int length = 0; + UErrorCode internalStatus = U_ZERO_ERROR; for(int i=0; i<12; i++) { - len += handleGetMonthLength(extendedYear, i); + length += handleGetMonthLength(extendedYear, i, internalStatus); } - return len; + U_ASSERT(U_SUCCESS(internalStatus)); + return length; } /** @@ -899,45 +869,58 @@ int32_t IslamicUmalquraCalendar::handleGetYearLength(int32_t extendedYear) const */ void IslamicUmalquraCalendar::handleComputeFields(int32_t julianDay, UErrorCode &status) { if (U_FAILURE(status)) return; - int32_t year, month, dayOfMonth, dayOfYear; + int64_t year; + int32_t month; int32_t days = julianDay - getEpoc(); - int32_t umalquraStartdays = yearStart(UMALQURA_YEAR_START) ; - if (days < umalquraStartdays) { - //Use Civil calculation - year = (int32_t)ClockMath::floorDivide( - (30 * (int64_t)days + 10646) , (int64_t)10631.0 ); - month = (int32_t)uprv_ceil((days - 29 - yearStart(year)) / 29.5 ); - month = month < 11 ? month : 11; - } else { - int y =UMALQURA_YEAR_START-1, m =0; - long d = 1; - while (d > 0) { - y++; - d = days - yearStart(y) +1; - if (d == handleGetYearLength(y)) { - m=11; - break; - } - if (d < handleGetYearLength(y)){ - int monthLen = handleGetMonthLength(y, m); - m=0; - while(d > monthLen){ - d -= monthLen; - m++; - monthLen = handleGetMonthLength(y, m); + static int64_t kUmalquraStart = yearStart(UMALQURA_YEAR_START); + if (days < kUmalquraStart) { + IslamicCivilCalendar::handleComputeFields(julianDay, status); + return; + } + // Estimate a value y which is closer to but not greater than the year. + // It is the inverse function of the logic inside + // IslamicUmalquraCalendar::yearStart(). + year = ((double(days) - (460322.05 + 0.5)) / 354.36720) + UMALQURA_YEAR_START - 1; + month = 0; + int32_t d = 1; + // need a slight correction to some + while (d > 0) { + d = days - yearStart(++year) + 1; + int32_t yearLength = handleGetYearLength(year); + if (d == yearLength) { + month = 11; + break; + } + if (d < yearLength){ + int32_t monthLen = handleGetMonthLength(year, month, status); + for (month = 0; + d > monthLen; + monthLen = handleGetMonthLength(year, ++month, status)) { + if (U_FAILURE(status)) { + return; } - break; + d -= monthLen; } + break; } - year = y; - month = m; } - dayOfMonth = (days - monthStart(year, month)) + 1; - - // Now figure out the day of the year. - dayOfYear = (days - monthStart(year, 0)) + 1; + int32_t dayOfMonth = monthStart(year, month, status); + int32_t dayOfYear = monthStart(year, 0, status); + if (U_FAILURE(status)) { + return; + } + if (uprv_mul32_overflow(dayOfMonth, -1, &dayOfMonth) || + uprv_add32_overflow(dayOfMonth, days, &dayOfMonth) || + uprv_add32_overflow(dayOfMonth, 1, &dayOfMonth) || + // Now figure out the day of the year. + uprv_mul32_overflow(dayOfYear, -1, &dayOfYear) || + uprv_add32_overflow(dayOfYear, days, &dayOfYear) || + uprv_add32_overflow(dayOfYear, 1, &dayOfYear)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } internalSet(UCAL_ERA, 0); internalSet(UCAL_YEAR, year); diff --git a/contrib/libs/icu/i18n/islamcal.h b/contrib/libs/icu/i18n/islamcal.h index 8469269bcc..1fb9ecd506 100644 --- a/contrib/libs/icu/i18n/islamcal.h +++ b/contrib/libs/icu/i18n/islamcal.h @@ -198,15 +198,10 @@ class U_I18N_API IslamicCalendar : public Calendar { protected: /** - * Determine whether a year is a leap year in the Islamic civil calendar - */ - static UBool civilLeapYear(int32_t year); - - /** * Return the day # on which the given year starts. Days are counted * from the Hijri epoch, origin 0. */ - virtual int32_t yearStart(int32_t year) const; + virtual int64_t yearStart(int32_t year) const; /** * Return the day # on which the given month starts. Days are counted @@ -215,29 +210,8 @@ class U_I18N_API IslamicCalendar : public Calendar { * @param year The hijri year * @param year The hijri month, 0-based */ - virtual int32_t monthStart(int32_t year, int32_t month) const; - - /** - * Find the day number on which a particular month of the true/lunar - * Islamic calendar starts. - * - * @param month The month in question, origin 0 from the Hijri epoch - * - * @return The day number on which the given month starts. - */ - int32_t trueMonthStart(int32_t month) const; + virtual int64_t monthStart(int32_t year, int32_t month, UErrorCode& status) const; - private: - /** - * Return the "age" of the moon at the given time; this is the difference - * in ecliptic latitude between the moon and the sun. This method simply - * calls CalendarAstronomer.moonAge, converts to degrees, - * and adjusts the resultto be in the range [-180, 180]. - * - * @param time The time at which the moon's age is desired, - * in millis since 1/1/1970. - */ - static double moonAge(UDate time, UErrorCode &status); //---------------------------------------------------------------------- // Calendar framework @@ -255,7 +229,7 @@ class U_I18N_API IslamicCalendar : public Calendar { * @param year The hijri month, 0-based * @internal */ - virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month) const override; + virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month, UErrorCode& status) const override; /** * Return the number of days in the given Islamic year @@ -271,7 +245,7 @@ class U_I18N_API IslamicCalendar : public Calendar { /** * @internal */ - virtual int32_t handleComputeMonthStart(int32_t eyear, int32_t month, UBool useMonth) const override; + virtual int64_t handleComputeMonthStart(int32_t eyear, int32_t month, UBool useMonth, UErrorCode& status) const override; //------------------------------------------------------------------------- // Functions for converting from milliseconds to field values @@ -280,7 +254,7 @@ class U_I18N_API IslamicCalendar : public Calendar { /** * @internal */ - virtual int32_t handleGetExtendedYear() override; + virtual int32_t handleGetExtendedYear(UErrorCode& status) override; /** * Override Calendar to compute several fields specific to the Islamic @@ -364,32 +338,8 @@ class U_I18N_API IslamicCalendar : public Calendar { // Default century. protected: - /** - * Returns true because the Islamic Calendar does have a default century - * @internal - */ - virtual UBool haveDefaultCentury() const override; - /** - * Returns the date of the start of the default century - * @return start of century - in milliseconds since epoch, 1970 - * @internal - */ - virtual UDate defaultCenturyStart() const override; - - /** - * Returns the year in which the default century begins - * @internal - */ - virtual int32_t defaultCenturyStartYear() const override; - - private: - /** - * Initializes the 100-year window that dates with 2-digit years - * are considered to fall within so that its start date is 80 years - * before the current time. - */ - static void U_CALLCONV initializeSystemDefaultCentury(); + DECLARE_OVERRIDE_SYSTEM_DEFAULT_CENTURY }; /* @@ -463,7 +413,7 @@ class U_I18N_API IslamicCivilCalendar : public IslamicCalendar { * from the Hijri epoch, origin 0. * @internal */ - virtual int32_t yearStart(int32_t year) const override; + virtual int64_t yearStart(int32_t year) const override; /** * Return the day # on which the given month starts. Days are counted @@ -473,7 +423,7 @@ class U_I18N_API IslamicCivilCalendar : public IslamicCalendar { * @param year The hijri month, 0-based * @internal */ - virtual int32_t monthStart(int32_t year, int32_t month) const override; + virtual int64_t monthStart(int32_t year, int32_t month, UErrorCode& status) const override; /** * Return the length (in days) of the given month. @@ -482,7 +432,7 @@ class U_I18N_API IslamicCivilCalendar : public IslamicCalendar { * @param year The hijri month, 0-based * @internal */ - virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month) const override; + virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month, UErrorCode& status) const override; /** * Return the number of days in the given Islamic year @@ -584,7 +534,7 @@ class U_I18N_API IslamicTBLACalendar : public IslamicCivilCalendar { * IslamicUmalquraCalendar * This calendar is referred as "Islamic calendar, Umm al-Qura" in CLDR. */ -class U_I18N_API IslamicUmalquraCalendar : public IslamicCalendar { +class U_I18N_API IslamicUmalquraCalendar : public IslamicCivilCalendar { public: /** * Constructs an IslamicUmalquraCalendar based on the current time in the default time zone @@ -646,7 +596,7 @@ class U_I18N_API IslamicUmalquraCalendar : public IslamicCalendar { * from the Hijri epoch, origin 0. * @internal */ - virtual int32_t yearStart(int32_t year) const override; + virtual int64_t yearStart(int32_t year) const override; /** * Return the day # on which the given month starts. Days are counted @@ -656,7 +606,7 @@ class U_I18N_API IslamicUmalquraCalendar : public IslamicCalendar { * @param year The hijri month, 0-based * @internal */ - virtual int32_t monthStart(int32_t year, int32_t month) const override; + virtual int64_t monthStart(int32_t year, int32_t month, UErrorCode& status) const override; /** * Return the length (in days) of the given month. @@ -665,7 +615,7 @@ class U_I18N_API IslamicUmalquraCalendar : public IslamicCalendar { * @param year The hijri month, 0-based * @internal */ - virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month) const override; + virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month, UErrorCode& status) const override; /** * Return the number of days in the given Islamic year diff --git a/contrib/libs/icu/i18n/iso8601cal.cpp b/contrib/libs/icu/i18n/iso8601cal.cpp index 1bc81fac15..6bb7579e72 100644 --- a/contrib/libs/icu/i18n/iso8601cal.cpp +++ b/contrib/libs/icu/i18n/iso8601cal.cpp @@ -14,7 +14,14 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ISO8601Calendar) ISO8601Calendar::ISO8601Calendar(const Locale& aLocale, UErrorCode& success) : GregorianCalendar(aLocale, success) { - setFirstDayOfWeek(UCAL_MONDAY); + UErrorCode tempStatus = U_ZERO_ERROR; + int32_t length = aLocale.getKeywordValue("fw", nullptr, 0, tempStatus) + + aLocale.getKeywordValue("rg", nullptr, 0, tempStatus); + // Do not set first day of week for iso8601 to Monday if we have fw or rg keywords + // and let the value set by the Calendar constructor to take care of it. + if (U_SUCCESS(tempStatus) && length == 0) { + setFirstDayOfWeek(UCAL_MONDAY); + } setMinimalDaysInFirstWeek(4); } diff --git a/contrib/libs/icu/i18n/iso8601cal.h b/contrib/libs/icu/i18n/iso8601cal.h index 688fac3588..957f12e4f2 100644 --- a/contrib/libs/icu/i18n/iso8601cal.h +++ b/contrib/libs/icu/i18n/iso8601cal.h @@ -90,6 +90,8 @@ class ISO8601Calendar : public GregorianCalendar { */ virtual const char * getType() const override; + protected: + virtual bool isEra0CountingBackward() const override { return false; } private: diff --git a/contrib/libs/icu/i18n/japancal.cpp b/contrib/libs/icu/i18n/japancal.cpp index fc18d6c0eb..7e69b97a3a 100644 --- a/contrib/libs/icu/i18n/japancal.cpp +++ b/contrib/libs/icu/i18n/japancal.cpp @@ -146,8 +146,11 @@ const char *JapaneseCalendar::getType() const return "japanese"; } -int32_t JapaneseCalendar::getDefaultMonthInYear(int32_t eyear) +int32_t JapaneseCalendar::getDefaultMonthInYear(int32_t eyear, UErrorCode& status) { + if (U_FAILURE(status)) { + return 0; + } int32_t era = internalGetEra(); // TODO do we assume we can trust 'era'? What if it is denormalized? @@ -155,9 +158,10 @@ int32_t JapaneseCalendar::getDefaultMonthInYear(int32_t eyear) // Find out if we are at the edge of an era int32_t eraStart[3] = { 0,0,0 }; - UErrorCode status = U_ZERO_ERROR; gJapaneseEraRules->getStartDate(era, eraStart, status); - U_ASSERT(U_SUCCESS(status)); + if (U_FAILURE(status)) { + return 0; + } if(eyear == eraStart[0]) { // Yes, we're in the first year of this era. return eraStart[1] // month @@ -176,12 +180,9 @@ int32_t JapaneseCalendar::getDefaultDayInMonth(int32_t eyear, int32_t month) UErrorCode status = U_ZERO_ERROR; gJapaneseEraRules->getStartDate(era, eraStart, status); U_ASSERT(U_SUCCESS(status)); - if(eyear == eraStart[0]) { - if(month == eraStart[1] - 1) { - return eraStart[2]; - } + if (eyear == eraStart[0] && (month == eraStart[1] - 1)) { + return eraStart[2]; } - return day; } @@ -191,24 +192,29 @@ int32_t JapaneseCalendar::internalGetEra() const return internalGet(UCAL_ERA, gCurrentEra); } -int32_t JapaneseCalendar::handleGetExtendedYear() +int32_t JapaneseCalendar::handleGetExtendedYear(UErrorCode& status) { + if (U_FAILURE(status)) { + return 0; + } // EXTENDED_YEAR in JapaneseCalendar is a Gregorian year // The default value of EXTENDED_YEAR is 1970 (Showa 45) - int32_t year; if (newerField(UCAL_EXTENDED_YEAR, UCAL_YEAR) == UCAL_EXTENDED_YEAR && newerField(UCAL_EXTENDED_YEAR, UCAL_ERA) == UCAL_EXTENDED_YEAR) { - year = internalGet(UCAL_EXTENDED_YEAR, kGregorianEpoch); - } else { - UErrorCode status = U_ZERO_ERROR; - int32_t eraStartYear = gJapaneseEraRules->getStartYear(internalGet(UCAL_ERA, gCurrentEra), status); - U_ASSERT(U_SUCCESS(status)); - - // extended year is a gregorian year, where 1 = 1AD, 0 = 1BC, -1 = 2BC, etc - year = internalGet(UCAL_YEAR, 1) // pin to minimum of year 1 (first year) - + eraStartYear // add gregorian starting year - - 1; // Subtract one because year starts at 1 + return internalGet(UCAL_EXTENDED_YEAR, kGregorianEpoch); + } + int32_t eraStartYear = gJapaneseEraRules->getStartYear(internalGet(UCAL_ERA, gCurrentEra), status); + if (U_FAILURE(status)) { + return 0; + } + + // extended year is a gregorian year, where 1 = 1AD, 0 = 1BC, -1 = 2BC, etc + int32_t year = internalGet(UCAL_YEAR, 1); // pin to minimum of year 1 (first year) + // add gregorian starting year, subtract one because year starts at 1 + if (uprv_add32_overflow(year, eraStartYear - 1, &year)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; } return year; } @@ -219,7 +225,7 @@ void JapaneseCalendar::handleComputeFields(int32_t julianDay, UErrorCode& status //Calendar::timeToFields(theTime, quick, status); GregorianCalendar::handleComputeFields(julianDay, status); int32_t year = internalGet(UCAL_EXTENDED_YEAR); // Gregorian year - int32_t eraIdx = gJapaneseEraRules->getEraIndex(year, internalGetMonth() + 1, internalGet(UCAL_DAY_OF_MONTH), status); + int32_t eraIdx = gJapaneseEraRules->getEraIndex(year, internalGetMonth(status) + 1, internalGet(UCAL_DAY_OF_MONTH), status); internalSet(UCAL_ERA, eraIdx); internalSet(UCAL_YEAR, year - gJapaneseEraRules->getStartYear(eraIdx, status) + 1); @@ -277,31 +283,30 @@ int32_t JapaneseCalendar::handleGetLimit(UCalendarDateFields field, ELimitType l } int32_t JapaneseCalendar::getActualMaximum(UCalendarDateFields field, UErrorCode& status) const { - if (field == UCAL_YEAR) { - int32_t era = get(UCAL_ERA, status); - if (U_FAILURE(status)) { - return 0; // error case... any value - } - if (era == gJapaneseEraRules->getNumberOfEras() - 1) { // max known era, not gCurrentEra - // TODO: Investigate what value should be used here - revisit after 4.0. - return handleGetLimit(UCAL_YEAR, UCAL_LIMIT_MAXIMUM); - } else { - int32_t nextEraStart[3] = { 0,0,0 }; - gJapaneseEraRules->getStartDate(era + 1, nextEraStart, status); - int32_t nextEraYear = nextEraStart[0]; - int32_t nextEraMonth = nextEraStart[1]; // 1-base - int32_t nextEraDate = nextEraStart[2]; - - int32_t eraStartYear = gJapaneseEraRules->getStartYear(era, status); - int32_t maxYear = nextEraYear - eraStartYear + 1; // 1-base - if (nextEraMonth == 1 && nextEraDate == 1) { - // Subtract 1, because the next era starts at Jan 1 - maxYear--; - } - return maxYear; - } + if (field != UCAL_YEAR) { + return GregorianCalendar::getActualMaximum(field, status); + } + int32_t era = get(UCAL_ERA, status); + if (U_FAILURE(status)) { + return 0; // error case... any value + } + if (era == gJapaneseEraRules->getNumberOfEras() - 1) { // max known era, not gCurrentEra + // TODO: Investigate what value should be used here - revisit after 4.0. + return handleGetLimit(UCAL_YEAR, UCAL_LIMIT_MAXIMUM); + } + int32_t nextEraStart[3] = { 0,0,0 }; + gJapaneseEraRules->getStartDate(era + 1, nextEraStart, status); + int32_t nextEraYear = nextEraStart[0]; + int32_t nextEraMonth = nextEraStart[1]; // 1-base + int32_t nextEraDate = nextEraStart[2]; + + int32_t eraStartYear = gJapaneseEraRules->getStartYear(era, status); + int32_t maxYear = nextEraYear - eraStartYear + 1; // 1-base + if (nextEraMonth == 1 && nextEraDate == 1) { + // Subtract 1, because the next era starts at Jan 1 + maxYear--; } - return GregorianCalendar::getActualMaximum(field, status); + return maxYear; } U_NAMESPACE_END diff --git a/contrib/libs/icu/i18n/japancal.h b/contrib/libs/icu/i18n/japancal.h index 3ae4900a2c..bd2a2ca075 100644 --- a/contrib/libs/icu/i18n/japancal.h +++ b/contrib/libs/icu/i18n/japancal.h @@ -123,7 +123,7 @@ public: * Japanese calendar case, this is equal to the equivalent extended Gregorian year. * @internal */ - virtual int32_t handleGetExtendedYear() override; + virtual int32_t handleGetExtendedYear(UErrorCode& status) override; /** * Return the maximum value that this field could have, given the current date. @@ -166,22 +166,7 @@ public: */ virtual const char * getType() const override; - /** - * @return false - no default century in Japanese - * @internal - */ - virtual UBool haveDefaultCentury() const override; - - /** - * Not used - no default century. - * @internal - */ - virtual UDate defaultCenturyStart() const override; - /** - * Not used - no default century. - * @internal - */ - virtual int32_t defaultCenturyStartYear() const override; + DECLARE_OVERRIDE_SYSTEM_DEFAULT_CENTURY private: JapaneseCalendar(); // default constructor not implemented @@ -212,7 +197,7 @@ protected: * @param eyear the extended year * @internal */ - virtual int32_t getDefaultMonthInYear(int32_t eyear) override; + virtual int32_t getDefaultMonthInYear(int32_t eyear, UErrorCode& status) override; /*** * Called by computeJulianDay. Returns the default day (1-based) for the month, @@ -223,6 +208,8 @@ protected: * @internal */ virtual int32_t getDefaultDayInMonth(int32_t eyear, int32_t month) override; + + virtual bool isEra0CountingBackward() const override { return false; } }; U_NAMESPACE_END diff --git a/contrib/libs/icu/i18n/listformatter.cpp b/contrib/libs/icu/i18n/listformatter.cpp index 3405b5de38..06bea83b6e 100644 --- a/contrib/libs/icu/i18n/listformatter.cpp +++ b/contrib/libs/icu/i18n/listformatter.cpp @@ -121,16 +121,16 @@ private: ContextualHandler::~ContextualHandler() { } -static const char16_t *spanishY = u"{0} y {1}"; -static const char16_t *spanishE = u"{0} e {1}"; -static const char16_t *spanishO = u"{0} o {1}"; -static const char16_t *spanishU = u"{0} u {1}"; -static const char16_t *hebrewVav = u"{0} \u05D5{1}"; -static const char16_t *hebrewVavDash = u"{0} \u05D5-{1}"; +const char16_t* spanishY = u"{0} y {1}"; +const char16_t* spanishE = u"{0} e {1}"; +const char16_t* spanishO = u"{0} o {1}"; +const char16_t* spanishU = u"{0} u {1}"; +const char16_t* hebrewVav = u"{0} \u05D5{1}"; +const char16_t* hebrewVavDash = u"{0} \u05D5-{1}"; // Condiction to change to e. // Starts with "hi" or "i" but not with "hie" nor "hia" -static bool shouldChangeToE(const UnicodeString& text) { +bool shouldChangeToE(const UnicodeString& text) { int32_t len = text.length(); if (len == 0) { return false; } // Case insensitive match hi but not hie nor hia. @@ -147,7 +147,7 @@ static bool shouldChangeToE(const UnicodeString& text) { // Condiction to change to u. // Starts with "o", "ho", and "8". Also "11" by itself. // re: ^((o|ho|8).*|11)$ -static bool shouldChangeToU(const UnicodeString& text) { +bool shouldChangeToU(const UnicodeString& text) { int32_t len = text.length(); if (len == 0) { return false; } // Case insensitive match o.* and 8.* @@ -164,7 +164,7 @@ static bool shouldChangeToU(const UnicodeString& text) { // Condiction to change to VAV follow by a dash. // Starts with non Hebrew letter. -static bool shouldChangeToVavDash(const UnicodeString& text) { +bool shouldChangeToVavDash(const UnicodeString& text) { if (text.isEmpty()) { return false; } UErrorCode status = U_ZERO_ERROR; return uscript_getScript(text.char32At(0), &status) != USCRIPT_HEBREW; diff --git a/contrib/libs/icu/i18n/measfmt.cpp b/contrib/libs/icu/i18n/measfmt.cpp index da4e69b49b..ee4bcb9e5b 100644 --- a/contrib/libs/icu/i18n/measfmt.cpp +++ b/contrib/libs/icu/i18n/measfmt.cpp @@ -489,7 +489,6 @@ void MeasureFormat::parseObject( const UnicodeString & /*source*/, Formattable & /*result*/, ParsePosition& /*pos*/) const { - return; } UnicodeString &MeasureFormat::formatMeasurePerUnit( @@ -501,14 +500,14 @@ UnicodeString &MeasureFormat::formatMeasurePerUnit( if (U_FAILURE(status)) { return appendTo; } - auto* df = dynamic_cast<const DecimalFormat*>(&getNumberFormatInternal()); + const auto* df = dynamic_cast<const DecimalFormat*>(&getNumberFormatInternal()); if (df == nullptr) { // Don't know how to handle other types of NumberFormat status = U_UNSUPPORTED_ERROR; return appendTo; } UFormattedNumberData result; - if (auto* lnf = df->toNumberFormatter(status)) { + if (const auto* lnf = df->toNumberFormatter(status)) { result.quantity.setToDouble(measure.getNumber().getDouble(status)); lnf->unit(measure.getUnit()) .perUnit(perUnit) @@ -691,7 +690,7 @@ UnicodeString &MeasureFormat::formatMeasure( pos, status); } - auto* df = dynamic_cast<const DecimalFormat*>(&nf); + const auto* df = dynamic_cast<const DecimalFormat*>(&nf); if (df == nullptr) { // Handle other types of NumberFormat using the ICU 63 code, modified to // get the unitPattern from LongNameHandler and handle fallback to OTHER. @@ -708,7 +707,7 @@ UnicodeString &MeasureFormat::formatMeasure( return QuantityFormatter::format(formatter, formattedNumber, appendTo, pos, status); } UFormattedNumberData result; - if (auto* lnf = df->toNumberFormatter(status)) { + if (const auto* lnf = df->toNumberFormatter(status)) { result.quantity.setToDouble(amtNumber.getDouble(status)); lnf->unit(amtUnit) .unitWidth(getUnitWidth(fWidth)) @@ -761,7 +760,7 @@ UnicodeString &MeasureFormat::formatNumeric( return appendTo; } number::LocalizedNumberFormatter numberFormatter2; - if (auto* lnf = numberFormatter->toNumberFormatter(status)) { + if (const auto* lnf = numberFormatter->toNumberFormatter(status)) { numberFormatter2 = lnf->integerWidth(number::IntegerWidth::zeroFillTo(2)); } else { return appendTo; diff --git a/contrib/libs/icu/i18n/measunit.cpp b/contrib/libs/icu/i18n/measunit.cpp index 47ae5bcf5d..a70d486539 100644 --- a/contrib/libs/icu/i18n/measunit.cpp +++ b/contrib/libs/icu/i18n/measunit.cpp @@ -56,11 +56,11 @@ static const int32_t gOffsets[] = { 429, 430, 436, - 446, - 451, - 455, - 457, - 491 + 447, + 452, + 456, + 458, + 492 }; static const int32_t kCurrencyOffset = 5; @@ -532,6 +532,7 @@ static const char * const gSubTypes[] = { "watt", "atmosphere", "bar", + "gasoline-energy-density", "hectopascal", "inch-ofhg", "kilopascal", @@ -1687,70 +1688,78 @@ MeasureUnit MeasureUnit::getBar() { return MeasureUnit(18, 1); } -MeasureUnit *MeasureUnit::createHectopascal(UErrorCode &status) { +MeasureUnit *MeasureUnit::createGasolineEnergyDensity(UErrorCode &status) { return MeasureUnit::create(18, 2, status); } -MeasureUnit MeasureUnit::getHectopascal() { +MeasureUnit MeasureUnit::getGasolineEnergyDensity() { return MeasureUnit(18, 2); } -MeasureUnit *MeasureUnit::createInchHg(UErrorCode &status) { +MeasureUnit *MeasureUnit::createHectopascal(UErrorCode &status) { return MeasureUnit::create(18, 3, status); } -MeasureUnit MeasureUnit::getInchHg() { +MeasureUnit MeasureUnit::getHectopascal() { return MeasureUnit(18, 3); } -MeasureUnit *MeasureUnit::createKilopascal(UErrorCode &status) { +MeasureUnit *MeasureUnit::createInchHg(UErrorCode &status) { return MeasureUnit::create(18, 4, status); } -MeasureUnit MeasureUnit::getKilopascal() { +MeasureUnit MeasureUnit::getInchHg() { return MeasureUnit(18, 4); } -MeasureUnit *MeasureUnit::createMegapascal(UErrorCode &status) { +MeasureUnit *MeasureUnit::createKilopascal(UErrorCode &status) { return MeasureUnit::create(18, 5, status); } -MeasureUnit MeasureUnit::getMegapascal() { +MeasureUnit MeasureUnit::getKilopascal() { return MeasureUnit(18, 5); } -MeasureUnit *MeasureUnit::createMillibar(UErrorCode &status) { +MeasureUnit *MeasureUnit::createMegapascal(UErrorCode &status) { return MeasureUnit::create(18, 6, status); } -MeasureUnit MeasureUnit::getMillibar() { +MeasureUnit MeasureUnit::getMegapascal() { return MeasureUnit(18, 6); } -MeasureUnit *MeasureUnit::createMillimeterOfMercury(UErrorCode &status) { +MeasureUnit *MeasureUnit::createMillibar(UErrorCode &status) { return MeasureUnit::create(18, 7, status); } -MeasureUnit MeasureUnit::getMillimeterOfMercury() { +MeasureUnit MeasureUnit::getMillibar() { return MeasureUnit(18, 7); } -MeasureUnit *MeasureUnit::createPascal(UErrorCode &status) { +MeasureUnit *MeasureUnit::createMillimeterOfMercury(UErrorCode &status) { return MeasureUnit::create(18, 8, status); } -MeasureUnit MeasureUnit::getPascal() { +MeasureUnit MeasureUnit::getMillimeterOfMercury() { return MeasureUnit(18, 8); } -MeasureUnit *MeasureUnit::createPoundPerSquareInch(UErrorCode &status) { +MeasureUnit *MeasureUnit::createPascal(UErrorCode &status) { return MeasureUnit::create(18, 9, status); } -MeasureUnit MeasureUnit::getPoundPerSquareInch() { +MeasureUnit MeasureUnit::getPascal() { return MeasureUnit(18, 9); } +MeasureUnit *MeasureUnit::createPoundPerSquareInch(UErrorCode &status) { + return MeasureUnit::create(18, 10, status); +} + +MeasureUnit MeasureUnit::getPoundPerSquareInch() { + return MeasureUnit(18, 10); +} + MeasureUnit *MeasureUnit::createBeaufort(UErrorCode &status) { return MeasureUnit::create(19, 0, status); } @@ -2160,9 +2169,7 @@ MeasureUnit &MeasureUnit::operator=(const MeasureUnit &other) { if (this == &other) { return *this; } - if (fImpl != nullptr) { - delete fImpl; - } + delete fImpl; if (other.fImpl) { ErrorCode localStatus; fImpl = new MeasureUnitImpl(other.fImpl->copy(localStatus)); @@ -2183,9 +2190,7 @@ MeasureUnit &MeasureUnit::operator=(MeasureUnit &&other) noexcept { if (this == &other) { return *this; } - if (fImpl != nullptr) { - delete fImpl; - } + delete fImpl; fImpl = other.fImpl; other.fImpl = nullptr; fTypeId = other.fTypeId; diff --git a/contrib/libs/icu/i18n/measunit_extra.cpp b/contrib/libs/icu/i18n/measunit_extra.cpp index 295d6a8ce8..a634842273 100644 --- a/contrib/libs/icu/i18n/measunit_extra.cpp +++ b/contrib/libs/icu/i18n/measunit_extra.cpp @@ -102,6 +102,8 @@ const struct UnitPrefixStrings { UMeasurePrefix value; } gUnitPrefixStrings[] = { // SI prefixes + { "quetta", UMEASURE_PREFIX_QUETTA }, + { "ronna", UMEASURE_PREFIX_RONNA }, { "yotta", UMEASURE_PREFIX_YOTTA }, { "zetta", UMEASURE_PREFIX_ZETTA }, { "exa", UMEASURE_PREFIX_EXA }, @@ -122,6 +124,8 @@ const struct UnitPrefixStrings { { "atto", UMEASURE_PREFIX_ATTO }, { "zepto", UMEASURE_PREFIX_ZEPTO }, { "yocto", UMEASURE_PREFIX_YOCTO }, + { "ronto", UMEASURE_PREFIX_RONTO }, + { "quecto", UMEASURE_PREFIX_QUECTO }, // Binary prefixes { "yobi", UMEASURE_PREFIX_YOBI }, { "zebi", UMEASURE_PREFIX_ZEBI }, @@ -542,13 +546,13 @@ public: */ static Parser from(StringPiece source, UErrorCode& status) { if (U_FAILURE(status)) { - return Parser(); + return {}; } umtx_initOnce(gUnitExtrasInitOnce, &initUnitExtras, status); if (U_FAILURE(status)) { - return Parser(); + return {}; } - return Parser(source); + return {source}; } MeasureUnitImpl parse(UErrorCode& status) { @@ -659,7 +663,7 @@ private: } else { fIndex = previ; } - return Token(match); + return {match}; } /** @@ -797,8 +801,8 @@ private: // Sorting function wrapping SingleUnitImpl::compareTo for use with uprv_sortArray. int32_t U_CALLCONV compareSingleUnits(const void* /*context*/, const void* left, const void* right) { - auto realLeft = static_cast<const SingleUnitImpl* const*>(left); - auto realRight = static_cast<const SingleUnitImpl* const*>(right); + const auto* realLeft = static_cast<const SingleUnitImpl* const*>(left); + const auto* realRight = static_cast<const SingleUnitImpl* const*>(right); return (*realLeft)->compareTo(**realRight); } diff --git a/contrib/libs/icu/i18n/measunit_impl.h b/contrib/libs/icu/i18n/measunit_impl.h index c60ff2fc33..5ee5c7bb95 100644 --- a/contrib/libs/icu/i18n/measunit_impl.h +++ b/contrib/libs/icu/i18n/measunit_impl.h @@ -14,11 +14,9 @@ U_NAMESPACE_BEGIN -namespace number { -namespace impl { +namespace number::impl { class LongNameHandler; } -} // namespace number static const char16_t kDefaultCurrency[] = u"XXX"; static const char kDefaultCurrency8[] = "XXX"; diff --git a/contrib/libs/icu/i18n/measure.cpp b/contrib/libs/icu/i18n/measure.cpp index cdbd995034..3280bcda46 100644 --- a/contrib/libs/icu/i18n/measure.cpp +++ b/contrib/libs/icu/i18n/measure.cpp @@ -29,7 +29,7 @@ Measure::Measure(const Formattable& _number, MeasureUnit* adoptedUnit, UErrorCode& ec) : number(_number), unit(adoptedUnit) { if (U_SUCCESS(ec) && - (!number.isNumeric() || adoptedUnit == 0)) { + (!number.isNumeric() || adoptedUnit == nullptr)) { ec = U_ILLEGAL_ARGUMENT_ERROR; } } diff --git a/contrib/libs/icu/i18n/messageformat2.cpp b/contrib/libs/icu/i18n/messageformat2.cpp new file mode 100644 index 0000000000..c5ae9f1c60 --- /dev/null +++ b/contrib/libs/icu/i18n/messageformat2.cpp @@ -0,0 +1,893 @@ +// © 2024 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#if !UCONFIG_NO_MF2 + +#include "unicode/messageformat2_arguments.h" +#include "unicode/messageformat2_data_model.h" +#include "unicode/messageformat2_formattable.h" +#include "unicode/messageformat2.h" +#include "unicode/unistr.h" +#include "messageformat2_allocation.h" +#include "messageformat2_evaluation.h" +#include "messageformat2_macros.h" + + +U_NAMESPACE_BEGIN + +namespace message2 { + +using namespace data_model; + +// ------------------------------------------------------ +// Formatting + +// The result of formatting a literal is just itself. +static Formattable evalLiteral(const Literal& lit) { + return Formattable(lit.unquoted()); +} + +// Assumes that `var` is a message argument; returns the argument's value. +[[nodiscard]] FormattedPlaceholder MessageFormatter::evalArgument(const VariableName& var, MessageContext& context, UErrorCode& errorCode) const { + if (U_SUCCESS(errorCode)) { + // The fallback for a variable name is itself. + UnicodeString str(DOLLAR); + str += var; + const Formattable* val = context.getGlobal(var, errorCode); + if (U_SUCCESS(errorCode)) { + return (FormattedPlaceholder(*val, str)); + } + } + return {}; +} + +// Returns the contents of the literal +[[nodiscard]] FormattedPlaceholder MessageFormatter::formatLiteral(const Literal& lit) const { + // The fallback for a literal is itself. + return FormattedPlaceholder(evalLiteral(lit), lit.quoted()); +} + +[[nodiscard]] FormattedPlaceholder MessageFormatter::formatOperand(const Environment& env, + const Operand& rand, + MessageContext& context, + UErrorCode &status) const { + if (U_FAILURE(status)) { + return {}; + } + + if (rand.isNull()) { + return FormattedPlaceholder(); + } + if (rand.isVariable()) { + // Check if it's local or global + // Note: there is no name shadowing; this is enforced by the parser + const VariableName& var = rand.asVariable(); + // TODO: Currently, this code implements lazy evaluation of locals. + // That is, the environment binds names to a closure, not a resolved value. + // Eager vs. lazy evaluation is an open issue: + // see https://github.com/unicode-org/message-format-wg/issues/299 + + // Look up the variable in the environment + if (env.has(var)) { + // `var` is a local -- look it up + const Closure& rhs = env.lookup(var); + // Format the expression using the environment from the closure + return formatExpression(rhs.getEnv(), rhs.getExpr(), context, status); + } + // Variable wasn't found in locals -- check if it's global + FormattedPlaceholder result = evalArgument(var, context, status); + if (status == U_ILLEGAL_ARGUMENT_ERROR) { + status = U_ZERO_ERROR; + // Unbound variable -- set a resolution error + context.getErrors().setUnresolvedVariable(var, status); + // Use fallback per + // https://github.com/unicode-org/message-format-wg/blob/main/spec/formatting.md#fallback-resolution + UnicodeString str(DOLLAR); + str += var; + return FormattedPlaceholder(str); + } + return result; + } else { + U_ASSERT(rand.isLiteral()); + return formatLiteral(rand.asLiteral()); + } +} + +// Resolves a function's options +FunctionOptions MessageFormatter::resolveOptions(const Environment& env, const OptionMap& options, MessageContext& context, UErrorCode& status) const { + LocalPointer<UVector> optionsVector(createUVector(status)); + if (U_FAILURE(status)) { + return {}; + } + LocalPointer<ResolvedFunctionOption> resolvedOpt; + for (int i = 0; i < options.size(); i++) { + const Option& opt = options.getOption(i, status); + if (U_FAILURE(status)) { + return {}; + } + const UnicodeString& k = opt.getName(); + const Operand& v = opt.getValue(); + + // Options are fully evaluated before calling the function + // Format the operand + FormattedPlaceholder rhsVal = formatOperand(env, v, context, status); + if (U_FAILURE(status)) { + return {}; + } + if (!rhsVal.isFallback()) { + resolvedOpt.adoptInstead(create<ResolvedFunctionOption>(ResolvedFunctionOption(k, rhsVal.asFormattable()), status)); + if (U_FAILURE(status)) { + return {}; + } + optionsVector->adoptElement(resolvedOpt.orphan(), status); + } + } + + return FunctionOptions(std::move(*optionsVector), status); +} + +// Overload that dispatches on argument type. Syntax doesn't provide for options in this case. +[[nodiscard]] FormattedPlaceholder MessageFormatter::evalFormatterCall(FormattedPlaceholder&& argument, + MessageContext& context, + UErrorCode& status) const { + if (U_FAILURE(status)) { + return {}; + } + + // These cases should have been checked for already + U_ASSERT(!argument.isFallback() && !argument.isNullOperand()); + + const Formattable& toFormat = argument.asFormattable(); + switch (toFormat.getType()) { + case UFMT_OBJECT: { + const FormattableObject* obj = toFormat.getObject(status); + U_ASSERT(U_SUCCESS(status)); + U_ASSERT(obj != nullptr); + const UnicodeString& type = obj->tag(); + FunctionName functionName; + if (!getDefaultFormatterNameByType(type, functionName)) { + // No formatter for this type -- follow default behavior + break; + } + return evalFormatterCall(functionName, + std::move(argument), + FunctionOptions(), + context, + status); + } + default: { + // TODO: The array case isn't handled yet; not sure whether it's desirable + // to have a default list formatter + break; + } + } + // No formatter for this type, or it's a primitive type (which will be formatted later) + // -- just return the argument itself + return std::move(argument); +} + +// Overload that dispatches on function name +[[nodiscard]] FormattedPlaceholder MessageFormatter::evalFormatterCall(const FunctionName& functionName, + FormattedPlaceholder&& argument, + FunctionOptions&& options, + MessageContext& context, + UErrorCode& status) const { + if (U_FAILURE(status)) { + return {}; + } + + DynamicErrors& errs = context.getErrors(); + + UnicodeString fallback(COLON); + fallback += functionName; + if (!argument.isNullOperand()) { + fallback = argument.fallback; + } + + if (isFormatter(functionName)) { + LocalPointer<Formatter> formatterImpl(getFormatter(functionName, status)); + if (U_FAILURE(status)) { + if (status == U_MF_FORMATTING_ERROR) { + errs.setFormattingError(functionName, status); + status = U_ZERO_ERROR; + return {}; + } + if (status == U_MF_UNKNOWN_FUNCTION_ERROR) { + errs.setUnknownFunction(functionName, status); + status = U_ZERO_ERROR; + return {}; + } + // Other errors are non-recoverable + return {}; + } + U_ASSERT(formatterImpl != nullptr); + + UErrorCode savedStatus = status; + FormattedPlaceholder result = formatterImpl->format(std::move(argument), std::move(options), status); + // Update errors + if (savedStatus != status) { + if (U_FAILURE(status)) { + if (status == U_MF_OPERAND_MISMATCH_ERROR) { + status = U_ZERO_ERROR; + errs.setOperandMismatchError(functionName, status); + } else { + status = U_ZERO_ERROR; + // Convey any error generated by the formatter + // as a formatting error, except for operand mismatch errors + errs.setFormattingError(functionName, status); + } + return FormattedPlaceholder(fallback); + } else { + // Ignore warnings + status = savedStatus; + } + } + // Ignore the output if any errors occurred + if (errs.hasFormattingError()) { + return FormattedPlaceholder(fallback); + } + return result; + } + // No formatter with this name -- set error + if (isSelector(functionName)) { + errs.setFormattingError(functionName, status); + } else { + errs.setUnknownFunction(functionName, status); + } + return FormattedPlaceholder(fallback); +} + +// Per https://github.com/unicode-org/message-format-wg/blob/main/spec/formatting.md#fallback-resolution +static UnicodeString reservedFallback (const Expression& e) { + UErrorCode localErrorCode = U_ZERO_ERROR; + const Operator* rator = e.getOperator(localErrorCode); + U_ASSERT(U_SUCCESS(localErrorCode)); + const Reserved& r = rator->asReserved(); + + // An empty Reserved isn't representable in the syntax + U_ASSERT(r.numParts() > 0); + + const UnicodeString& contents = r.getPart(0).unquoted(); + // Parts should never be empty + U_ASSERT(contents.length() > 0); + + // Return first character of string + return UnicodeString(contents, 0, 1); +} + +// Formats an expression using `globalEnv` for the values of variables +[[nodiscard]] FormattedPlaceholder MessageFormatter::formatExpression(const Environment& globalEnv, + const Expression& expr, + MessageContext& context, + UErrorCode &status) const { + if (U_FAILURE(status)) { + return {}; + } + + // Formatting error + if (expr.isReserved()) { + context.getErrors().setReservedError(status); + return FormattedPlaceholder(reservedFallback(expr)); + } + + const Operand& rand = expr.getOperand(); + // Format the operand (formatOperand handles the case of a null operand) + FormattedPlaceholder randVal = formatOperand(globalEnv, rand, context, status); + + // Don't call the function on error values + if (randVal.isFallback()) { + return randVal; + } + + if (!expr.isFunctionCall()) { + // Dispatch based on type of `randVal` + return evalFormatterCall(std::move(randVal), + context, + status); + } else { + const Operator* rator = expr.getOperator(status); + U_ASSERT(U_SUCCESS(status)); + const FunctionName& functionName = rator->getFunctionName(); + const OptionMap& options = rator->getOptionsInternal(); + // Resolve the options + FunctionOptions resolvedOptions = resolveOptions(globalEnv, options, context, status); + + // Call the formatter function + // The fallback for a nullary function call is the function name + UnicodeString fallback; + if (rand.isNull()) { + fallback = UnicodeString(COLON); + fallback += functionName; + } else { + fallback = randVal.fallback; + } + return evalFormatterCall(functionName, + std::move(randVal), + std::move(resolvedOptions), + context, + status); + } +} + +// Formats each text and expression part of a pattern, appending the results to `result` +void MessageFormatter::formatPattern(MessageContext& context, const Environment& globalEnv, const Pattern& pat, UErrorCode &status, UnicodeString& result) const { + CHECK_ERROR(status); + + for (int32_t i = 0; i < pat.numParts(); i++) { + const PatternPart& part = pat.getPart(i); + if (part.isText()) { + result += part.asText(); + } else if (part.isMarkup()) { + // Markup is ignored + } else { + // Format the expression + FormattedPlaceholder partVal = formatExpression(globalEnv, part.contents(), context, status); + // Force full evaluation, e.g. applying default formatters to + // unformatted input (or formatting numbers as strings) + UnicodeString partResult = partVal.formatToString(locale, status); + result += partResult; + // Handle formatting errors. `formatToString()` can't take a context and thus can't + // register an error directly + if (status == U_MF_FORMATTING_ERROR) { + status = U_ZERO_ERROR; + // TODO: The name of the formatter that failed is unavailable. + // Not ideal, but it's hard for `formatToString()` + // to pass along more detailed diagnostics + context.getErrors().setFormattingError(status); + } + } + } +} + +// ------------------------------------------------------ +// Selection + +// See https://github.com/unicode-org/message-format-wg/blob/main/spec/formatting.md#resolve-selectors +// `res` is a vector of ResolvedSelectors +void MessageFormatter::resolveSelectors(MessageContext& context, const Environment& env, UErrorCode &status, UVector& res) const { + CHECK_ERROR(status); + U_ASSERT(!dataModel.hasPattern()); + + const Expression* selectors = dataModel.getSelectorsInternal(); + // 1. Let res be a new empty list of resolved values that support selection. + // (Implicit, since `res` is an out-parameter) + // 2. For each expression exp of the message's selectors + for (int32_t i = 0; i < dataModel.numSelectors(); i++) { + // 2i. Let rv be the resolved value of exp. + ResolvedSelector rv = formatSelectorExpression(env, selectors[i], context, status); + if (rv.hasSelector()) { + // 2ii. If selection is supported for rv: + // (True if this code has been reached) + } else { + // 2iii. Else: + // Let nomatch be a resolved value for which selection always fails. + // Append nomatch as the last element of the list res. + // Emit a Selection Error. + // (Note: in this case, rv, being a fallback, serves as `nomatch`) + #if U_DEBUG + const DynamicErrors& err = context.getErrors(); + U_ASSERT(err.hasError()); + U_ASSERT(rv.argument().isFallback()); + #endif + } + // 2ii(a). Append rv as the last element of the list res. + // (Also fulfills 2iii) + LocalPointer<ResolvedSelector> v(create<ResolvedSelector>(std::move(rv), status)); + CHECK_ERROR(status); + res.adoptElement(v.orphan(), status); + } +} + +// See https://github.com/unicode-org/message-format-wg/blob/main/spec/formatting.md#resolve-preferences +// `keys` and `matches` are vectors of strings +void MessageFormatter::matchSelectorKeys(const UVector& keys, + MessageContext& context, + ResolvedSelector&& rv, + UVector& keysOut, + UErrorCode& status) const { + CHECK_ERROR(status); + + if (!rv.hasSelector()) { + // Return an empty list of matches + return; + } + + auto selectorImpl = rv.getSelector(); + U_ASSERT(selectorImpl != nullptr); + UErrorCode savedStatus = status; + + // Convert `keys` to an array + int32_t keysLen = keys.size(); + UnicodeString* keysArr = new UnicodeString[keysLen]; + if (keysArr == nullptr) { + status = U_MEMORY_ALLOCATION_ERROR; + return; + } + for (int32_t i = 0; i < keysLen; i++) { + const UnicodeString* k = static_cast<UnicodeString*>(keys[i]); + U_ASSERT(k != nullptr); + keysArr[i] = *k; + } + LocalArray<UnicodeString> adoptedKeys(keysArr); + + // Create an array to hold the output + UnicodeString* prefsArr = new UnicodeString[keysLen]; + if (prefsArr == nullptr) { + status = U_MEMORY_ALLOCATION_ERROR; + return; + } + LocalArray<UnicodeString> adoptedPrefs(prefsArr); + int32_t prefsLen = 0; + + // Call the selector + selectorImpl->selectKey(rv.takeArgument(), rv.takeOptions(), + adoptedKeys.getAlias(), keysLen, adoptedPrefs.getAlias(), prefsLen, + status); + + // Update errors + if (savedStatus != status) { + if (U_FAILURE(status)) { + status = U_ZERO_ERROR; + context.getErrors().setSelectorError(rv.getSelectorName(), status); + } else { + // Ignore warnings + status = savedStatus; + } + } + + CHECK_ERROR(status); + + // Copy the resulting keys (if there was no error) + keysOut.removeAllElements(); + for (int32_t i = 0; i < prefsLen; i++) { + UnicodeString* k = message2::create<UnicodeString>(std::move(prefsArr[i]), status); + if (k == nullptr) { + status = U_MEMORY_ALLOCATION_ERROR; + return; + } + keysOut.adoptElement(k, status); + CHECK_ERROR(status); + } +} + +// See https://github.com/unicode-org/message-format-wg/blob/main/spec/formatting.md#resolve-preferences +// `res` is a vector of FormattedPlaceholders; +// `pref` is a vector of vectors of strings +void MessageFormatter::resolvePreferences(MessageContext& context, UVector& res, UVector& pref, UErrorCode &status) const { + CHECK_ERROR(status); + + // 1. Let pref be a new empty list of lists of strings. + // (Implicit, since `pref` is an out-parameter) + UnicodeString ks; + LocalPointer<UnicodeString> ksP; + int32_t numVariants = dataModel.numVariants(); + const Variant* variants = dataModel.getVariantsInternal(); + // 2. For each index i in res + for (int32_t i = 0; i < (int32_t) res.size(); i++) { + // 2i. Let keys be a new empty list of strings. + LocalPointer<UVector> keys(createUVector(status)); + CHECK_ERROR(status); + // 2ii. For each variant `var` of the message + for (int32_t variantNum = 0; variantNum < numVariants; variantNum++) { + const SelectorKeys& selectorKeys = variants[variantNum].getKeys(); + + // Note: Here, `var` names the key list of `var`, + // not a Variant itself + const Key* var = selectorKeys.getKeysInternal(); + // 2ii(a). Let `key` be the `var` key at position i. + U_ASSERT(i < selectorKeys.len); // established by semantic check in formatSelectors() + const Key& key = var[i]; + // 2ii(b). If `key` is not the catch-all key '*' + if (!key.isWildcard()) { + // 2ii(b)(a) Assert that key is a literal. + // (Not needed) + // 2ii(b)(b) Let `ks` be the resolved value of `key`. + ks = key.asLiteral().unquoted(); + // 2ii(b)(c) Append `ks` as the last element of the list `keys`. + ksP.adoptInstead(create<UnicodeString>(std::move(ks), status)); + CHECK_ERROR(status); + keys->adoptElement(ksP.orphan(), status); + } + } + // 2iii. Let `rv` be the resolved value at index `i` of `res`. + U_ASSERT(i < res.size()); + ResolvedSelector rv = std::move(*(static_cast<ResolvedSelector*>(res[i]))); + // 2iv. Let matches be the result of calling the method MatchSelectorKeys(rv, keys) + LocalPointer<UVector> matches(createUVector(status)); + matchSelectorKeys(*keys, context, std::move(rv), *matches, status); + // 2v. Append `matches` as the last element of the list `pref` + pref.adoptElement(matches.orphan(), status); + } +} + +// `v` is assumed to be a vector of strings +static int32_t vectorFind(const UVector& v, const UnicodeString& k) { + for (int32_t i = 0; i < v.size(); i++) { + if (*static_cast<UnicodeString*>(v[i]) == k) { + return i; + } + } + return -1; +} + +static UBool vectorContains(const UVector& v, const UnicodeString& k) { + return (vectorFind(v, k) != -1); +} + +// See https://github.com/unicode-org/message-format-wg/blob/main/spec/formatting.md#filter-variants +// `pref` is a vector of vectors of strings. `vars` is a vector of PrioritizedVariants +void MessageFormatter::filterVariants(const UVector& pref, UVector& vars, UErrorCode& status) const { + const Variant* variants = dataModel.getVariantsInternal(); + + // 1. Let `vars` be a new empty list of variants. + // (Not needed since `vars` is an out-parameter) + // 2. For each variant `var` of the message: + for (int32_t j = 0; j < dataModel.numVariants(); j++) { + const SelectorKeys& selectorKeys = variants[j].getKeys(); + const Pattern& p = variants[j].getPattern(); + + // Note: Here, `var` names the key list of `var`, + // not a Variant itself + const Key* var = selectorKeys.getKeysInternal(); + // 2i. For each index `i` in `pref`: + bool noMatch = false; + for (int32_t i = 0; i < (int32_t) pref.size(); i++) { + // 2i(a). Let `key` be the `var` key at position `i`. + U_ASSERT(i < selectorKeys.len); + const Key& key = var[i]; + // 2i(b). If key is the catch-all key '*': + if (key.isWildcard()) { + // 2i(b)(a). Continue the inner loop on pref. + continue; + } + // 2i(c). Assert that `key` is a literal. + // (Not needed) + // 2i(d). Let `ks` be the resolved value of `key`. + UnicodeString ks = key.asLiteral().unquoted(); + // 2i(e). Let `matches` be the list of strings at index `i` of `pref`. + const UVector& matches = *(static_cast<UVector*>(pref[i])); // `matches` is a vector of strings + // 2i(f). If `matches` includes `ks` + if (vectorContains(matches, ks)) { + // 2i(f)(a). Continue the inner loop on `pref`. + continue; + } + // 2i(g). Else: + // 2i(g)(a). Continue the outer loop on message variants. + noMatch = true; + break; + } + if (!noMatch) { + // Append `var` as the last element of the list `vars`. + PrioritizedVariant* tuple = create<PrioritizedVariant>(PrioritizedVariant(-1, selectorKeys, p), status); + CHECK_ERROR(status); + vars.adoptElement(tuple, status); + } + } +} + +// See https://github.com/unicode-org/message-format-wg/blob/main/spec/formatting.md#sort-variants +// Leaves the preferred variant as element 0 in `sortable` +// Note: this sorts in-place, so `sortable` is just `vars` +// `pref` is a vector of vectors of strings; `vars` is a vector of PrioritizedVariants +void MessageFormatter::sortVariants(const UVector& pref, UVector& vars, UErrorCode& status) const { + CHECK_ERROR(status); + +// Note: steps 1 and 2 are omitted since we use `vars` as `sortable` (we sort in-place) + // 1. Let `sortable` be a new empty list of (integer, variant) tuples. + // (Not needed since `sortable` is an out-parameter) + // 2. For each variant `var` of `vars` + // 2i. Let tuple be a new tuple (-1, var). + // 2ii. Append `tuple` as the last element of the list `sortable`. + + // 3. Let `len` be the integer count of items in `pref`. + int32_t len = pref.size(); + // 4. Let `i` be `len` - 1. + int32_t i = len - 1; + // 5. While i >= 0: + while (i >= 0) { + // 5i. Let `matches` be the list of strings at index `i` of `pref`. + U_ASSERT(pref[i] != nullptr); + const UVector& matches = *(static_cast<UVector*>(pref[i])); // `matches` is a vector of strings + // 5ii. Let `minpref` be the integer count of items in `matches`. + int32_t minpref = matches.size(); + // 5iii. For each tuple `tuple` of `sortable`: + for (int32_t j = 0; j < vars.size(); j++) { + U_ASSERT(vars[j] != nullptr); + PrioritizedVariant& tuple = *(static_cast<PrioritizedVariant*>(vars[j])); + // 5iii(a). Let matchpref be an integer with the value minpref. + int32_t matchpref = minpref; + // 5iii(b). Let `key` be the tuple variant key at position `i`. + const Key* tupleVariantKeys = tuple.keys.getKeysInternal(); + U_ASSERT(i < tuple.keys.len); // Given by earlier semantic checking + const Key& key = tupleVariantKeys[i]; + // 5iii(c) If `key` is not the catch-all key '*': + if (!key.isWildcard()) { + // 5iii(c)(a). Assert that `key` is a literal. + // (Not needed) + // 5iii(c)(b). Let `ks` be the resolved value of `key`. + UnicodeString ks = key.asLiteral().unquoted(); + // 5iii(c)(c) Let matchpref be the integer position of ks in `matches`. + matchpref = vectorFind(matches, ks); + U_ASSERT(matchpref >= 0); + } + // 5iii(d) Set the `tuple` integer value as matchpref. + tuple.priority = matchpref; + } + // 5iv. Set `sortable` to be the result of calling the method SortVariants(`sortable`) + vars.sort(comparePrioritizedVariants, status); + CHECK_ERROR(status); + // 5v. Set `i` to be `i` - 1. + i--; + } + // The caller is responsible for steps 6 and 7 + // 6. Let `var` be the `variant` element of the first element of `sortable`. + // 7. Select the pattern of `var` +} + + +// Evaluate the operand +ResolvedSelector MessageFormatter::resolveVariables(const Environment& env, const Operand& rand, MessageContext& context, UErrorCode &status) const { + if (U_FAILURE(status)) { + return {}; + } + + if (rand.isNull()) { + return ResolvedSelector(FormattedPlaceholder()); + } + + if (rand.isLiteral()) { + return ResolvedSelector(formatLiteral(rand.asLiteral())); + } + + // Must be variable + const VariableName& var = rand.asVariable(); + // Resolve the variable + if (env.has(var)) { + const Closure& referent = env.lookup(var); + // Resolve the referent + return resolveVariables(referent.getEnv(), referent.getExpr(), context, status); + } + // Either this is a global var or an unbound var -- + // either way, it can't be bound to a function call. + // Check globals + FormattedPlaceholder val = evalArgument(var, context, status); + if (status == U_ILLEGAL_ARGUMENT_ERROR) { + status = U_ZERO_ERROR; + // Unresolved variable -- could be a previous warning. Nothing to resolve + U_ASSERT(context.getErrors().hasUnresolvedVariableError()); + return ResolvedSelector(FormattedPlaceholder(var)); + } + // Pass through other errors + return ResolvedSelector(std::move(val)); +} + +// Evaluate the expression except for not performing the top-level function call +// (which is expected to be a selector, but may not be, in error cases) +ResolvedSelector MessageFormatter::resolveVariables(const Environment& env, + const Expression& expr, + MessageContext& context, + UErrorCode &status) const { + if (U_FAILURE(status)) { + return {}; + } + + // A `reserved` is an error + if (expr.isReserved()) { + context.getErrors().setReservedError(status); + return ResolvedSelector(FormattedPlaceholder(reservedFallback(expr))); + } + + // Function call -- resolve the operand and options + if (expr.isFunctionCall()) { + const Operator* rator = expr.getOperator(status); + U_ASSERT(U_SUCCESS(status)); + // Already checked that rator is non-reserved + const FunctionName& selectorName = rator->getFunctionName(); + if (isSelector(selectorName)) { + auto selector = getSelector(context, selectorName, status); + if (U_SUCCESS(status)) { + FunctionOptions resolvedOptions = resolveOptions(env, rator->getOptionsInternal(), context, status); + // Operand may be the null argument, but resolveVariables() handles that + FormattedPlaceholder argument = formatOperand(env, expr.getOperand(), context, status); + return ResolvedSelector(selectorName, selector, std::move(resolvedOptions), std::move(argument)); + } + } else if (isFormatter(selectorName)) { + context.getErrors().setSelectorError(selectorName, status); + } else { + context.getErrors().setUnknownFunction(selectorName, status); + } + // Non-selector used as selector; an error would have been recorded earlier + UnicodeString fallback(COLON); + fallback += selectorName; + if (!expr.getOperand().isNull()) { + fallback = formatOperand(env, expr.getOperand(), context, status).fallback; + } + return ResolvedSelector(FormattedPlaceholder(fallback)); + } else { + // Might be a variable reference, so expand one more level of variable + return resolveVariables(env, expr.getOperand(), context, status); + } +} + +ResolvedSelector MessageFormatter::formatSelectorExpression(const Environment& globalEnv, const Expression& expr, MessageContext& context, UErrorCode &status) const { + if (U_FAILURE(status)) { + return {}; + } + + // Resolve expression to determine if it's a function call + ResolvedSelector exprResult = resolveVariables(globalEnv, expr, context, status); + + DynamicErrors& err = context.getErrors(); + + // If there is a selector, then `resolveVariables()` recorded it in the context + if (exprResult.hasSelector()) { + // Check if there was an error + if (exprResult.argument().isFallback()) { + // Use a null expression if it's a syntax or data model warning; + // create a valid (non-fallback) formatted placeholder from the + // fallback string otherwise + if (err.hasSyntaxError() || err.hasDataModelError()) { + return ResolvedSelector(FormattedPlaceholder()); // Null operand + } else { + return ResolvedSelector(exprResult.takeArgument()); + } + } + return exprResult; + } + + // No selector was found; error should already have been set + U_ASSERT(err.hasMissingSelectorAnnotationError() || err.hasUnknownFunctionError() || err.hasSelectorError()); + return ResolvedSelector(FormattedPlaceholder(exprResult.argument().fallback)); +} + +void MessageFormatter::formatSelectors(MessageContext& context, const Environment& env, UErrorCode &status, UnicodeString& result) const { + CHECK_ERROR(status); + + // See https://github.com/unicode-org/message-format-wg/blob/main/spec/formatting.md#pattern-selection + + // Resolve Selectors + // res is a vector of FormattedPlaceholders + LocalPointer<UVector> res(createUVector(status)); + CHECK_ERROR(status); + resolveSelectors(context, env, status, *res); + + // Resolve Preferences + // pref is a vector of vectors of strings + LocalPointer<UVector> pref(createUVector(status)); + CHECK_ERROR(status); + resolvePreferences(context, *res, *pref, status); + + // Filter Variants + // vars is a vector of PrioritizedVariants + LocalPointer<UVector> vars(createUVector(status)); + CHECK_ERROR(status); + filterVariants(*pref, *vars, status); + + // Sort Variants and select the final pattern + // Note: `sortable` in the spec is just `vars` here, + // which is sorted in-place + sortVariants(*pref, *vars, status); + + CHECK_ERROR(status); + + // 6. Let `var` be the `variant` element of the first element of `sortable`. + U_ASSERT(vars->size() > 0); // This should have been checked earlier (having 0 variants would be a data model error) + const PrioritizedVariant& var = *(static_cast<PrioritizedVariant*>(vars->elementAt(0))); + // 7. Select the pattern of `var` + const Pattern& pat = var.pat; + + // Format the pattern + formatPattern(context, env, pat, status, result); +} + +// Note: this is non-const due to the function registry being non-const, which is in turn +// due to the values (`FormatterFactory` objects in the map) having mutable state. +// In other words, formatting a message can mutate the underlying `MessageFormatter` by changing +// state within the factory objects that represent custom formatters. +UnicodeString MessageFormatter::formatToString(const MessageArguments& arguments, UErrorCode &status) { + EMPTY_ON_ERROR(status); + + // Create a new environment that will store closures for all local variables + Environment* env = Environment::create(status); + // Create a new context with the given arguments and the `errors` structure + MessageContext context(arguments, *errors, status); + + // Check for unresolved variable errors + checkDeclarations(context, env, status); + LocalPointer<Environment> globalEnv(env); + + UnicodeString result; + if (dataModel.hasPattern()) { + formatPattern(context, *globalEnv, dataModel.getPattern(), status, result); + } else { + // Check for errors/warnings -- if so, then the result of pattern selection is the fallback value + // See https://github.com/unicode-org/message-format-wg/blob/main/spec/formatting.md#pattern-selection + const DynamicErrors& err = context.getErrors(); + if (err.hasSyntaxError() || err.hasDataModelError()) { + result += REPLACEMENT; + } else { + formatSelectors(context, *globalEnv, status, result); + } + } + // Update status according to all errors seen while formatting + context.checkErrors(status); + return result; +} + +// ---------------------------------------- +// Checking for resolution errors + +void MessageFormatter::check(MessageContext& context, const Environment& localEnv, const OptionMap& options, UErrorCode& status) const { + // Check the RHS of each option + for (int32_t i = 0; i < options.size(); i++) { + const Option& opt = options.getOption(i, status); + CHECK_ERROR(status); + check(context, localEnv, opt.getValue(), status); + } +} + +void MessageFormatter::check(MessageContext& context, const Environment& localEnv, const Operand& rand, UErrorCode& status) const { + // Nothing to check for literals + if (rand.isLiteral() || rand.isNull()) { + return; + } + + // Check that variable is in scope + const VariableName& var = rand.asVariable(); + // Check local scope + if (localEnv.has(var)) { + return; + } + // Check global scope + context.getGlobal(var, status); + if (status == U_ILLEGAL_ARGUMENT_ERROR) { + status = U_ZERO_ERROR; + context.getErrors().setUnresolvedVariable(var, status); + } + // Either `var` is a global, or some other error occurred. + // Nothing more to do either way + return; +} + +void MessageFormatter::check(MessageContext& context, const Environment& localEnv, const Expression& expr, UErrorCode& status) const { + // Check for unresolved variable errors + if (expr.isFunctionCall()) { + const Operator* rator = expr.getOperator(status); + U_ASSERT(U_SUCCESS(status)); + const Operand& rand = expr.getOperand(); + check(context, localEnv, rand, status); + check(context, localEnv, rator->getOptionsInternal(), status); + } +} + +// Check for resolution errors +void MessageFormatter::checkDeclarations(MessageContext& context, Environment*& env, UErrorCode &status) const { + CHECK_ERROR(status); + + const Binding* decls = getDataModel().getLocalVariablesInternal(); + U_ASSERT(env != nullptr && decls != nullptr); + + for (int32_t i = 0; i < getDataModel().bindingsLen; i++) { + const Binding& decl = decls[i]; + const Expression& rhs = decl.getValue(); + check(context, *env, rhs, status); + + // Add a closure to the global environment, + // memoizing the value of localEnv up to this point + + // Add the LHS to the environment for checking the next declaration + env = Environment::create(decl.getVariable(), Closure(rhs, *env), env, status); + CHECK_ERROR(status); + } +} +} // namespace message2 + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_MF2 */ + +#endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/contrib/libs/icu/i18n/messageformat2_allocation.h b/contrib/libs/icu/i18n/messageformat2_allocation.h new file mode 100644 index 0000000000..7be27e2225 --- /dev/null +++ b/contrib/libs/icu/i18n/messageformat2_allocation.h @@ -0,0 +1,147 @@ +// © 2024 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#ifndef U_HIDE_DEPRECATED_API + +#ifndef MESSAGEFORMAT2_UTILS_H +#define MESSAGEFORMAT2_UTILS_H + +#if U_SHOW_CPLUSPLUS_API + +#if !UCONFIG_NO_FORMATTING + +#if !UCONFIG_NO_MF2 + +#include "unicode/unistr.h" +#include "uvector.h" + +U_NAMESPACE_BEGIN + +namespace message2 { + + // Helpers + + template<typename T> + static T* copyArray(const T* source, int32_t len, UErrorCode& status) { + if (U_FAILURE(status)) { + return nullptr; + } + U_ASSERT(source != nullptr); + U_ASSERT(len >= 0); + T* dest = new T[len]; + if (dest == nullptr) { + status = U_MEMORY_ALLOCATION_ERROR; + } else { + for (int32_t i = 0; i < len; i++) { + dest[i] = source[i]; + } + } + return dest; + } + + template<typename T> + static T* copyVectorToArray(const UVector& source, UErrorCode& status) { + if (U_FAILURE(status)) { + return nullptr; + } + int32_t len = source.size(); + T* dest = new T[len]; + if (dest == nullptr) { + status = U_MEMORY_ALLOCATION_ERROR; + } else { + for (int32_t i = 0; i < len; i++) { + dest[i] = *(static_cast<T*>(source.elementAt(i))); + } + } + return dest; + } + + template<typename T> + static T* moveVectorToArray(UVector& source, UErrorCode& status) { + if (U_FAILURE(status)) { + return nullptr; + } + + int32_t len = source.size(); + T* dest = new T[len]; + if (dest == nullptr) { + status = U_MEMORY_ALLOCATION_ERROR; + } else { + for (int32_t i = 0; i < len; i++) { + dest[i] = std::move(*static_cast<T*>(source.elementAt(i))); + } + source.removeAllElements(); + } + return dest; + } + + inline UVector* createUVectorNoAdopt(UErrorCode& status) { + if (U_FAILURE(status)) { + return nullptr; + } + LocalPointer<UVector> result(new UVector(status)); + if (U_FAILURE(status)) { + return nullptr; + } + return result.orphan(); + } + + inline UVector* createUVector(UErrorCode& status) { + UVector* result = createUVectorNoAdopt(status); + if (U_FAILURE(status)) { + return nullptr; + } + result->setDeleter(uprv_deleteUObject); + return result; + } + + static UBool stringsEqual(const UElement s1, const UElement s2) { + return (*static_cast<UnicodeString*>(s1.pointer) == *static_cast<UnicodeString*>(s2.pointer)); + } + + inline UVector* createStringUVector(UErrorCode& status) { + UVector* v = createUVector(status); + if (U_FAILURE(status)) { + return nullptr; + } + v->setComparer(stringsEqual); + return v; + } + + inline UVector* createStringVectorNoAdopt(UErrorCode& status) { + UVector* v = createUVectorNoAdopt(status); + if (U_FAILURE(status)) { + return nullptr; + } + v->setComparer(stringsEqual); + return v; + } + + template<typename T> + inline T* create(T&& node, UErrorCode& status) { + if (U_FAILURE(status)) { + return nullptr; + } + T* result = new T(std::move(node)); + if (result == nullptr) { + status = U_MEMORY_ALLOCATION_ERROR; + } + return result; + } + +} // namespace message2 + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_MF2 */ + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif /* U_SHOW_CPLUSPLUS_API */ + +#endif // MESSAGEFORMAT2_UTILS_H + +#endif // U_HIDE_DEPRECATED_API +// eof diff --git a/contrib/libs/icu/i18n/messageformat2_arguments.cpp b/contrib/libs/icu/i18n/messageformat2_arguments.cpp new file mode 100644 index 0000000000..ded3f4dda1 --- /dev/null +++ b/contrib/libs/icu/i18n/messageformat2_arguments.cpp @@ -0,0 +1,59 @@ +// © 2024 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#if !UCONFIG_NO_MF2 + +#include "unicode/messageformat2_arguments.h" +#include "unicode/messageformat2_data_model_names.h" +#include "uvector.h" // U_ASSERT + +U_NAMESPACE_BEGIN + +namespace message2 { + + using namespace data_model; + + // ------------------------------------------------------ + // MessageArguments + + using Arguments = MessageArguments; + + const Formattable* Arguments::getArgument(const VariableName& arg, UErrorCode& errorCode) const { + if (U_SUCCESS(errorCode)) { + U_ASSERT(argsLen == 0 || arguments.isValid()); + for (int32_t i = 0; i < argsLen; i++) { + if (argumentNames[i] == arg) { + return &arguments[i]; + } + } + errorCode = U_ILLEGAL_ARGUMENT_ERROR; + } + return nullptr; + } + + MessageArguments::~MessageArguments() {} + + // Message arguments + // ----------------- + + MessageArguments& MessageArguments::operator=(MessageArguments&& other) noexcept { + U_ASSERT(other.arguments.isValid() || other.argsLen == 0); + argsLen = other.argsLen; + if (argsLen != 0) { + argumentNames.adoptInstead(other.argumentNames.orphan()); + arguments.adoptInstead(other.arguments.orphan()); + } + return *this; + } + +} // namespace message2 + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_MF2 */ + +#endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/contrib/libs/icu/i18n/messageformat2_checker.cpp b/contrib/libs/icu/i18n/messageformat2_checker.cpp new file mode 100644 index 0000000000..192167583f --- /dev/null +++ b/contrib/libs/icu/i18n/messageformat2_checker.cpp @@ -0,0 +1,299 @@ +// © 2024 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#if !UCONFIG_NO_MF2 + +#include "messageformat2_allocation.h" +#include "messageformat2_checker.h" +#include "messageformat2_macros.h" +#include "uvector.h" // U_ASSERT + +U_NAMESPACE_BEGIN + +namespace message2 { + +/* +Checks data model errors +(see https://github.com/unicode-org/message-format-wg/blob/main/spec/formatting.md#error-handling ) + +The following are checked here: +Variant Key Mismatch +Missing Fallback Variant (called NonexhaustivePattern here) +Missing Selector Annotation +Duplicate Declaration + - Most duplicate declaration errors are checked by the parser, + but the checker checks for declarations of input variables + that were previously implicitly declared +(Duplicate option names and duplicate declarations are checked by the parser) +*/ + +// Type environments +// ----------------- + +TypeEnvironment::TypeEnvironment(UErrorCode& status) { + CHECK_ERROR(status); + + UVector* temp; + temp = createStringVectorNoAdopt(status); + CHECK_ERROR(status); + annotated.adoptInstead(temp); + temp = createStringVectorNoAdopt(status); + CHECK_ERROR(status); + unannotated.adoptInstead(temp); + temp = createStringVectorNoAdopt(status); + CHECK_ERROR(status); + freeVars.adoptInstead(temp); +} + + static bool has(const UVector& v, const VariableName& var) { + return v.contains(const_cast<void*>(static_cast<const void*>(&var))); + } + +// Returns true if `var` was either previously used (implicit declaration), +// or is in scope by an explicit declaration +bool TypeEnvironment::known(const VariableName& var) const { + return has(*annotated, var) || has(*unannotated, var) || has(*freeVars, var); +} + +TypeEnvironment::Type TypeEnvironment::get(const VariableName& var) const { + U_ASSERT(annotated.isValid()); + if (has(*annotated, var)) { + return Annotated; + } + U_ASSERT(unannotated.isValid()); + if (has(*unannotated, var)) { + return Unannotated; + } + U_ASSERT(freeVars.isValid()); + if (has(*freeVars, var)) { + return FreeVariable; + } + // This case is a "free variable without an implicit declaration", + // i.e. one used only in a selector expression and not in a declaration RHS + return Unannotated; +} + +void TypeEnvironment::extend(const VariableName& var, TypeEnvironment::Type t, UErrorCode& status) { + if (t == Unannotated) { + U_ASSERT(unannotated.isValid()); + // See comment below + unannotated->addElement(const_cast<void*>(static_cast<const void*>(&var)), status); + return; + } + + if (t == FreeVariable) { + U_ASSERT(freeVars.isValid()); + // See comment below + freeVars->addElement(const_cast<void*>(static_cast<const void*>(&var)), status); + return; + } + + U_ASSERT(annotated.isValid()); + // This is safe because elements of `annotated` are never written + // and the lifetime of `var` is guaranteed to include the lifetime of + // `annotated` + annotated->addElement(const_cast<void*>(static_cast<const void*>(&var)), status); +} + +TypeEnvironment::~TypeEnvironment() {} + +// --------------------- + +static bool areDefaultKeys(const Key* keys, int32_t len) { + U_ASSERT(len > 0); + for (int32_t i = 0; i < len; i++) { + if (!keys[i].isWildcard()) { + return false; + } + } + return true; +} + +void Checker::addFreeVars(TypeEnvironment& t, const Operand& rand, UErrorCode& status) { + CHECK_ERROR(status); + + if (rand.isVariable()) { + const VariableName& v = rand.asVariable(); + if (!t.known(v)) { + t.extend(v, TypeEnvironment::Type::FreeVariable, status); + } + } +} + +void Checker::addFreeVars(TypeEnvironment& t, const OptionMap& opts, UErrorCode& status) { + for (int32_t i = 0; i < opts.size(); i++) { + const Option& o = opts.getOption(i, status); + CHECK_ERROR(status); + addFreeVars(t, o.getValue(), status); + } +} + +void Checker::addFreeVars(TypeEnvironment& t, const Operator& rator, UErrorCode& status) { + CHECK_ERROR(status); + + if (!rator.isReserved()) { + addFreeVars(t, rator.getOptionsInternal(), status); + } +} + +void Checker::addFreeVars(TypeEnvironment& t, const Expression& rhs, UErrorCode& status) { + CHECK_ERROR(status); + + if (rhs.isFunctionCall()) { + const Operator* rator = rhs.getOperator(status); + U_ASSERT(U_SUCCESS(status)); + addFreeVars(t, *rator, status); + } + addFreeVars(t, rhs.getOperand(), status); +} + +void Checker::checkVariants(UErrorCode& status) { + CHECK_ERROR(status); + + U_ASSERT(!dataModel.hasPattern()); + + // Check that each variant has a key list with size + // equal to the number of selectors + const Variant* variants = dataModel.getVariantsInternal(); + + // Check that one variant includes only wildcards + bool defaultExists = false; + + for (int32_t i = 0; i < dataModel.numVariants(); i++) { + const SelectorKeys& k = variants[i].getKeys(); + const Key* keys = k.getKeysInternal(); + int32_t len = k.len; + if (len != dataModel.numSelectors()) { + // Variant key mismatch + errors.addError(StaticErrorType::VariantKeyMismatchError, status); + return; + } + defaultExists |= areDefaultKeys(keys, len); + } + if (!defaultExists) { + errors.addError(StaticErrorType::NonexhaustivePattern, status); + return; + } +} + +void Checker::requireAnnotated(const TypeEnvironment& t, const Expression& selectorExpr, UErrorCode& status) { + CHECK_ERROR(status); + + if (selectorExpr.isFunctionCall()) { + return; // No error + } + if (!selectorExpr.isReserved()) { + const Operand& rand = selectorExpr.getOperand(); + if (rand.isVariable()) { + if (t.get(rand.asVariable()) == TypeEnvironment::Type::Annotated) { + return; // No error + } + } + } + // If this code is reached, an error was detected + errors.addError(StaticErrorType::MissingSelectorAnnotation, status); +} + +void Checker::checkSelectors(const TypeEnvironment& t, UErrorCode& status) { + U_ASSERT(!dataModel.hasPattern()); + + // Check each selector; if it's not annotated, emit a + // "missing selector annotation" error + const Expression* selectors = dataModel.getSelectorsInternal(); + for (int32_t i = 0; i < dataModel.numSelectors(); i++) { + requireAnnotated(t, selectors[i], status); + } +} + +TypeEnvironment::Type typeOf(TypeEnvironment& t, const Expression& expr) { + if (expr.isFunctionCall()) { + return TypeEnvironment::Type::Annotated; + } + if (expr.isReserved()) { + return TypeEnvironment::Type::Unannotated; + } + const Operand& rand = expr.getOperand(); + U_ASSERT(!rand.isNull()); + if (rand.isLiteral()) { + return TypeEnvironment::Type::Unannotated; + } + U_ASSERT(rand.isVariable()); + return t.get(rand.asVariable()); +} + +void Checker::checkDeclarations(TypeEnvironment& t, UErrorCode& status) { + CHECK_ERROR(status); + + // For each declaration, extend the type environment with its type + // Only a very simple type system is necessary: variables + // have the type "annotated", "unannotated", or "free". + // For "missing selector annotation" checking, free variables + // (message arguments) are treated as unannotated. + // Free variables are also used for checking duplicate declarations. + const Binding* env = dataModel.getLocalVariablesInternal(); + for (int32_t i = 0; i < dataModel.bindingsLen; i++) { + const Binding& b = env[i]; + const VariableName& lhs = b.getVariable(); + const Expression& rhs = b.getValue(); + + // First, add free variables from the RHS of b + // This must be done first so we can catch: + // .local $foo = {$foo} + // (where the RHS is the first use of $foo) + if (b.isLocal()) { + addFreeVars(t, rhs, status); + + // Next, check if the LHS equals any free variables + // whose implicit declarations are in scope + if (t.known(lhs) && t.get(lhs) == TypeEnvironment::Type::FreeVariable) { + errors.addError(StaticErrorType::DuplicateDeclarationError, status); + } + } else { + // Input declaration; if b has no annotation, there's nothing to check + if (!b.isLocal() && b.hasAnnotation()) { + const OptionMap& opts = b.getOptionsInternal(); + // For .input declarations, we just need to add any variables + // referenced in the options + addFreeVars(t, opts, status); + } + // Next, check if the LHS equals any free variables + // whose implicit declarations are in scope + if (t.known(lhs) && t.get(lhs) == TypeEnvironment::Type::FreeVariable) { + errors.addError(StaticErrorType::DuplicateDeclarationError, status); + } + } + // Next, extend the type environment with a binding from lhs to its type + t.extend(lhs, typeOf(t, rhs), status); + } + + // Check for unsupported statements + if (dataModel.unsupportedStatementsLen > 0) { + errors.addError(StaticErrorType::UnsupportedStatementError, status); + } +} + +void Checker::check(UErrorCode& status) { + CHECK_ERROR(status); + + TypeEnvironment typeEnv(status); + checkDeclarations(typeEnv, status); + // Pattern message + if (dataModel.hasPattern()) { + return; + } else { + // Selectors message + checkSelectors(typeEnv, status); + checkVariants(status); + } +} + +} // namespace message2 +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_MF2 */ + +#endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/contrib/libs/icu/i18n/messageformat2_checker.h b/contrib/libs/icu/i18n/messageformat2_checker.h new file mode 100644 index 0000000000..4bb0498efb --- /dev/null +++ b/contrib/libs/icu/i18n/messageformat2_checker.h @@ -0,0 +1,97 @@ +// © 2024 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#ifndef U_HIDE_DEPRECATED_API + +#ifndef MESSAGEFORMAT_CHECKER_H +#define MESSAGEFORMAT_CHECKER_H + +#if U_SHOW_CPLUSPLUS_API + +#if !UCONFIG_NO_FORMATTING + +#if !UCONFIG_NO_MF2 + +#include "unicode/messageformat2_data_model.h" +#include "messageformat2_errors.h" + +U_NAMESPACE_BEGIN + +namespace message2 { + + using namespace data_model; + + // Used for checking missing selector annotation errors + // and duplicate declaration errors (specifically for + // implicit declarations) + class TypeEnvironment : public UMemory { + public: + // MessageFormat has a simple type system; + // variables are in-scope and annotated; in-scope and unannotated; + // or free (a free variable has no explicit declaration in the scope + // of its use.) + enum Type { + Annotated, + Unannotated, + FreeVariable + }; + void extend(const VariableName&, Type, UErrorCode& status); + Type get(const VariableName&) const; + bool known(const VariableName&) const; + TypeEnvironment(UErrorCode& status); + + virtual ~TypeEnvironment(); + + private: + // Stores variables known to be annotated. + LocalPointer<UVector> annotated; // Vector of `VariableName`s + // Stores variables that are in-scope but unannotated. + LocalPointer<UVector> unannotated; // Vector of `VariableName`s + // Stores free variables that are used in the RHS of a declaration + LocalPointer<UVector> freeVars; // Vector of `VariableNames`; tracks free variables + // This can't just be "variables that don't appear in + // `annotated` or `unannotated`", as a use introduces + // an explicit declaration + }; // class TypeEnvironment + + // Checks a data model for semantic errors + // (Errors are defined in https://github.com/unicode-org/message-format-wg/blob/main/spec/formatting.md ) + class Checker { + public: + void check(UErrorCode&); + Checker(const MFDataModel& m, StaticErrors& e) : dataModel(m), errors(e) {} + private: + + void requireAnnotated(const TypeEnvironment&, const Expression&, UErrorCode&); + void addFreeVars(TypeEnvironment& t, const Operand&, UErrorCode&); + void addFreeVars(TypeEnvironment& t, const Operator&, UErrorCode&); + void addFreeVars(TypeEnvironment& t, const OptionMap&, UErrorCode&); + void addFreeVars(TypeEnvironment& t, const Expression&, UErrorCode&); + void checkDeclarations(TypeEnvironment&, UErrorCode&); + void checkSelectors(const TypeEnvironment&, UErrorCode&); + void checkVariants(UErrorCode&); + void check(const OptionMap&); + void check(const Operand&); + void check(const Expression&); + void check(const Pattern&); + const MFDataModel& dataModel; + StaticErrors& errors; + }; // class Checker + +} // namespace message2 + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_MF2 */ + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif /* U_SHOW_CPLUSPLUS_API */ + +#endif // MESSAGEFORMAT_CHECKER_H + +#endif // U_HIDE_DEPRECATED_API +// eof + diff --git a/contrib/libs/icu/i18n/messageformat2_data_model.cpp b/contrib/libs/icu/i18n/messageformat2_data_model.cpp new file mode 100644 index 0000000000..8255de01af --- /dev/null +++ b/contrib/libs/icu/i18n/messageformat2_data_model.cpp @@ -0,0 +1,1152 @@ +// © 2024 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#if !UCONFIG_NO_MF2 + +#include "unicode/messageformat2_data_model.h" +#include "messageformat2_allocation.h" +#include "messageformat2_macros.h" +#include "uvector.h" + +U_NAMESPACE_BEGIN + +namespace message2 { + +// Implementation + +//------------------ SelectorKeys + +const Key* SelectorKeys::getKeysInternal() const { + return keys.getAlias(); +} + +// Lexically order key lists +bool SelectorKeys::operator<(const SelectorKeys& other) const { + // Handle key lists of different sizes first -- + // this case does have to be handled (even though it would + // reflect a data model error) because of the need to produce + // partial output + if (len < other.len) { + return true; + } + if (len > other.len) { + return false; + } + + for (int32_t i = 0; i < len; i++) { + if (keys[i] < other.keys[i]) { + return true; + } + if (!(keys[i] == other.keys[i])) { + return false; + } + } + // If we've reached here, all keys must be equal + return false; +} + +SelectorKeys::Builder::Builder(UErrorCode& status) { + keys = createUVector(status); +} + +SelectorKeys::Builder& SelectorKeys::Builder::add(Key&& key, UErrorCode& status) noexcept { + U_ASSERT(keys != nullptr); + if (U_SUCCESS(status)) { + Key* k = create<Key>(std::move(key), status); + keys->adoptElement(k, status); + } + return *this; +} + +SelectorKeys SelectorKeys::Builder::build(UErrorCode& status) const { + if (U_FAILURE(status)) { + return {}; + } + U_ASSERT(keys != nullptr); + return SelectorKeys(*keys, status); +} + +SelectorKeys::Builder::~Builder() { + if (keys != nullptr) { + delete keys; + } +} + +SelectorKeys::SelectorKeys(const UVector& ks, UErrorCode& status) : len(ks.size()) { + Key* result = copyVectorToArray<Key>(ks, status); + if (U_FAILURE(status)) { + return; + } + keys.adoptInstead(result); +} + +SelectorKeys& SelectorKeys::operator=(SelectorKeys other) noexcept { + swap(*this, other); + return *this; +} + +SelectorKeys::SelectorKeys(const SelectorKeys& other) : len(other.len) { + UErrorCode localErrorCode = U_ZERO_ERROR; + if (len != 0) { + keys.adoptInstead(copyArray(other.keys.getAlias(), len, localErrorCode)); + } + if (U_FAILURE(localErrorCode)) { + len = 0; + } +} + +SelectorKeys::~SelectorKeys() { + len = 0; +} + +//------------------ Literal + +bool Literal::operator<(const Literal& other) const { + // Ignore quoting for the purposes of ordering + return contents < other.contents; +} + +bool Literal::operator==(const Literal& other) const { + // Ignore quoting for the purposes of ordering + return contents == other.contents; +} + +UnicodeString Literal::quoted() const { + UnicodeString result(PIPE); + result += unquoted(); + result += PIPE; + return result; +} + +const UnicodeString& Literal::unquoted() const { return contents; } + +Literal& Literal::operator=(Literal other) noexcept { + swap(*this, other); + + return *this; +} + +Literal::~Literal() { + thisIsQuoted = false; +} + +//------------------ Operand + +Operand::Operand(const Operand& other) : contents(other.contents) {} + +Operand& Operand::operator=(Operand other) noexcept { + swap(*this, other); + + return *this; +} + +UBool Operand::isVariable() const { + return (contents.has_value() && std::holds_alternative<VariableName>(*contents)); +} +UBool Operand::isLiteral() const { + return (contents.has_value() && std::holds_alternative<Literal>(*contents)); +} +UBool Operand::isNull() const { return !contents.has_value(); } + +const Literal& Operand::asLiteral() const { + U_ASSERT(isLiteral()); + return *(std::get_if<Literal>(&(*contents))); +} + +const VariableName& Operand::asVariable() const { + U_ASSERT(isVariable()); + return *(std::get_if<VariableName>(&(*contents))); +} + +Operand::~Operand() {} + +//---------------- Key + +Key& Key::operator=(Key other) noexcept { + swap(*this, other); + return *this; +} + +bool Key::operator<(const Key& other) const { + // Arbitrarily treat * as greater than all concrete keys + if (isWildcard()) { + return false; + } + if (other.isWildcard()) { + return true; + } + return (asLiteral() < other.asLiteral()); +} + +bool Key::operator==(const Key& other) const { + if (isWildcard()) { + return other.isWildcard(); + } + return (asLiteral() == other.asLiteral()); +} + +const Literal& Key::asLiteral() const { + U_ASSERT(!isWildcard()); + return *contents; +} + +Key::~Key() {} + +// ------------ Reserved + +// Copy constructor +Reserved::Reserved(const Reserved& other) : len(other.len) { + U_ASSERT(!other.bogus); + + UErrorCode localErrorCode = U_ZERO_ERROR; + if (len == 0) { + parts.adoptInstead(nullptr); + } else { + parts.adoptInstead(copyArray(other.parts.getAlias(), len, localErrorCode)); + } + if (U_FAILURE(localErrorCode)) { + bogus = true; + } +} + +Reserved& Reserved::operator=(Reserved other) noexcept { + swap(*this, other); + return *this; +} + +Reserved::Reserved(const UVector& ps, UErrorCode& status) noexcept : len(ps.size()) { + if (U_FAILURE(status)) { + return; + } + parts = LocalArray<Literal>(copyVectorToArray<Literal>(ps, status)); +} + +int32_t Reserved::numParts() const { + U_ASSERT(!bogus); + return len; +} + +const Literal& Reserved::getPart(int32_t i) const { + U_ASSERT(!bogus); + U_ASSERT(i < numParts()); + return parts[i]; +} + +Reserved::Builder::Builder(UErrorCode& status) { + parts = createUVector(status); +} + +Reserved Reserved::Builder::build(UErrorCode& status) const noexcept { + if (U_FAILURE(status)) { + return {}; + } + U_ASSERT(parts != nullptr); + return Reserved(*parts, status); +} + +Reserved::Builder& Reserved::Builder::add(Literal&& part, UErrorCode& status) noexcept { + U_ASSERT(parts != nullptr); + if (U_SUCCESS(status)) { + Literal* l = create<Literal>(std::move(part), status); + parts->adoptElement(l, status); + } + return *this; +} + +Reserved::Builder::~Builder() { + if (parts != nullptr) { + delete parts; + } +} + +Reserved::~Reserved() { + len = 0; +} + +//------------------------ Operator + +OptionMap::OptionMap(const UVector& opts, UErrorCode& status) : len(opts.size()) { + Option* result = copyVectorToArray<Option>(opts, status); + if (U_FAILURE(status)) { + bogus = true; + return; + } + options.adoptInstead(result); + bogus = false; +} + +OptionMap::OptionMap(const OptionMap& other) : len(other.len) { + U_ASSERT(!other.bogus); + UErrorCode localErrorCode = U_ZERO_ERROR; + Option* result = copyArray(other.options.getAlias(), len, localErrorCode); + if (U_FAILURE(localErrorCode)) { + bogus = true; + return; + } + bogus = false; + options.adoptInstead(result); +} + +OptionMap& OptionMap::operator=(OptionMap other) { + swap(*this, other); + return *this; +} + +const Option& OptionMap::getOption(int32_t i, UErrorCode& status) const { + if (U_FAILURE(status) || bogus) { + if (bogus) { + status = U_MEMORY_ALLOCATION_ERROR; + } + } else { + U_ASSERT(options.isValid()); + U_ASSERT(i < len); + } + return options[i]; +} + +int32_t OptionMap::size() const { + U_ASSERT(options.isValid() || len == 0); + return len; +} + +OptionMap::~OptionMap() {} + +OptionMap OptionMap::Builder::build(UErrorCode& status) { + return OptionMap(*options, status); +} + +OptionMap::Builder::Builder(UErrorCode& status) { + options = createStringUVector(status); +} + +OptionMap::Builder::Builder(OptionMap::Builder&& other) { + checkDuplicates = other.checkDuplicates; + options = other.options; + other.options = nullptr; +} + +OptionMap::Builder& OptionMap::Builder::operator=(OptionMap::Builder other) noexcept { + swap(*this, other); + return *this; +} + +/* static */ OptionMap::Builder OptionMap::Builder::attributes(UErrorCode& status) { + Builder b(status); + // The same code is re-used for representing attributes and options. + // Duplicate attributes are allowed, while duplicate options are disallowed. + b.checkDuplicates = false; + return b; +} + +static UBool hasOptionNamed(const UVector& v, const UnicodeString& s) { + for (int32_t i = 0; i < v.size(); i++) { + const Option* opt = static_cast<Option*>(v[i]); + U_ASSERT(opt != nullptr); + if (opt->getName() == s) { + return true; + } + } + return false; +} + +OptionMap::Builder& OptionMap::Builder::add(Option&& opt, UErrorCode& status) { + THIS_ON_ERROR(status); + + // If the option name is already in the map, emit a data model error + if (checkDuplicates && hasOptionNamed(*options, opt.getName())) { + status = U_MF_DUPLICATE_OPTION_NAME_ERROR; + } else { + Option* newOption = create<Option>(std::move(opt), status); + options->adoptElement(newOption, status); + } + return *this; +} + +OptionMap::Builder::~Builder() { + if (options != nullptr) { + delete options; + } +} + +const Reserved& Operator::asReserved() const { + U_ASSERT(isReserved()); + return *(std::get_if<Reserved>(&contents)); +} + +const OptionMap& Operator::getOptionsInternal() const { + U_ASSERT(!isReserved()); + return std::get_if<Callable>(&contents)->getOptions(); +} + +Option::Option(const Option& other): name(other.name), rand(other.rand) {} + +Option& Option::operator=(Option other) noexcept { + swap(*this, other); + return *this; +} + +Option::~Option() {} + +Operator::Builder::Builder(UErrorCode& status) : options(OptionMap::Builder(status)) {} + +Operator::Builder& Operator::Builder::setReserved(Reserved&& reserved) { + isReservedSequence = true; + hasFunctionName = false; + hasOptions = false; + asReserved = std::move(reserved); + return *this; +} + +Operator::Builder& Operator::Builder::setFunctionName(FunctionName&& func) { + isReservedSequence = false; + hasFunctionName = true; + functionName = std::move(func); + return *this; +} + +const FunctionName& Operator::getFunctionName() const { + U_ASSERT(!isReserved()); + return std::get_if<Callable>(&contents)->getName(); +} + +Operator::Builder& Operator::Builder::addOption(const UnicodeString &key, Operand&& value, UErrorCode& errorCode) noexcept { + THIS_ON_ERROR(errorCode); + + isReservedSequence = false; + hasOptions = true; + options.add(Option(key, std::move(value)), errorCode); + return *this; +} + +Operator Operator::Builder::build(UErrorCode& errorCode) { + Operator result; + if (U_FAILURE(errorCode)) { + return result; + } + // Must be either reserved or function, not both; enforced by methods + if (isReservedSequence) { + // Methods enforce that the function name and options are unset + // if `setReserved()` is called, so if they were valid, that + // would indicate a bug. + U_ASSERT(!hasOptions && !hasFunctionName); + result = Operator(asReserved); + } else { + if (!hasFunctionName) { + // Neither function name nor reserved was set + // There is no default, so this case could occur if the + // caller creates a builder and doesn't make any calls + // before calling build(). + errorCode = U_INVALID_STATE_ERROR; + return result; + } + result = Operator(functionName, options.build(errorCode)); + } + return result; +} + +Operator::Operator(const Operator& other) noexcept : contents(other.contents) {} + +Operator& Operator::operator=(Operator other) noexcept { + swap(*this, other); + return *this; +} + +// Function call +Operator::Operator(const FunctionName& f, const UVector& optsVector, UErrorCode& status) : contents(Callable(f, OptionMap(optsVector, status))) {} + +Operator::Operator(const FunctionName& f, const OptionMap& opts) : contents(Callable(f, opts)) {} + +Operator::Builder::~Builder() {} + +Operator::~Operator() {} + +Callable& Callable::operator=(Callable other) noexcept { + swap(*this, other); + return *this; +} + +Callable::Callable(const Callable& other) : name(other.name), options(other.options) {} + +Callable::~Callable() {} + +// ------------ Markup + +Markup::Builder::Builder(UErrorCode& status) + : options(OptionMap::Builder(status)), attributes(OptionMap::Builder::attributes(status)) {} + +Markup::Markup(UMarkupType ty, UnicodeString n, OptionMap&& o, OptionMap&& a) + : type(ty), name(n), options(std::move(o)), attributes(std::move(a)) {} + +Markup::Builder& Markup::Builder::addOption(const UnicodeString &key, + Operand&& value, + UErrorCode& errorCode) { + options.add(Option(key, std::move(value)), errorCode); + return *this; +} + +Markup::Builder& Markup::Builder::addAttribute(const UnicodeString &key, + Operand&& value, + UErrorCode& errorCode) { + attributes.add(Option(key, std::move(value)), errorCode); + return *this; +} + +Markup Markup::Builder::build(UErrorCode& errorCode) { + Markup result; + + if (U_FAILURE(errorCode)) { + return result; + } + + if (type == UMARKUP_COUNT || name.length() == 0) { + // One of `setOpen()`, `setClose()`, or `setStandalone()` + // must be called before calling build() + // setName() must be called before calling build() + errorCode = U_INVALID_STATE_ERROR; + } else { + result = Markup(type, + name, + options.build(errorCode), + attributes.build(errorCode)); + } + return result; +} + +Markup::Builder::~Builder() {} + +Markup::~Markup() {} + +// ------------ Expression + +Expression::Builder::Builder(UErrorCode& status) + : attributes(OptionMap::Builder::attributes(status)) {} + +UBool Expression::isStandaloneAnnotation() const { + return rand.isNull(); +} + +// Returns true for function calls with operands as well as +// standalone annotations. +// Reserved sequences are not function calls +UBool Expression::isFunctionCall() const { + return (rator.has_value() && !rator->isReserved()); +} + +UBool Expression::isReserved() const { + return (rator.has_value() && rator->isReserved()); +} + +const Operator* Expression::getOperator(UErrorCode& status) const { + NULL_ON_ERROR(status); + + if (!(isReserved() || isFunctionCall())) { + status = U_INVALID_STATE_ERROR; + return nullptr; + } + U_ASSERT(rator); + return &(*rator); +} + +// May return null operand +const Operand& Expression::getOperand() const { return rand; } + +Expression::Builder& Expression::Builder::setOperand(Operand&& rAnd) { + hasOperand = true; + rand = std::move(rAnd); + return *this; +} + +Expression::Builder& Expression::Builder::setOperator(Operator&& rAtor) { + hasOperator = true; + rator = std::move(rAtor); + return *this; +} + +Expression::Builder& Expression::Builder::addAttribute(const UnicodeString& k, + Operand&& v, + UErrorCode& status) { + attributes.add(Option(k, std::move(v)), status); + return *this; +} + +Expression Expression::Builder::build(UErrorCode& errorCode) { + Expression result; + + if (U_FAILURE(errorCode)) { + return result; + } + + if ((!hasOperand || rand.isNull()) && !hasOperator) { + errorCode = U_INVALID_STATE_ERROR; + return result; + } + + OptionMap attributeMap = attributes.build(errorCode); + if (hasOperand && hasOperator) { + result = Expression(rator, rand, std::move(attributeMap)); + } else if (hasOperand && !hasOperator) { + result = Expression(rand, std::move(attributeMap)); + } else { + // rator is valid, rand is not valid + result = Expression(rator, std::move(attributeMap)); + } + return result; +} + +Expression::Expression() : rator(std::nullopt) {} + +Expression::Expression(const Expression& other) : rator(other.rator), rand(other.rand), attributes(other.attributes) {} + +Expression& Expression::operator=(Expression other) noexcept { + swap(*this, other); + return *this; +} + +Expression::Builder::~Builder() {} + +Expression::~Expression() {} + +// ----------- UnsupportedStatement + +UnsupportedStatement::Builder::Builder(UErrorCode& status) { + expressions = createUVector(status); +} + +UnsupportedStatement::Builder& UnsupportedStatement::Builder::setKeyword(const UnicodeString& k) { + keyword = k; + return *this; +} + +UnsupportedStatement::Builder& UnsupportedStatement::Builder::setBody(Reserved&& r) { + body.emplace(r); + return *this; +} + +UnsupportedStatement::Builder& UnsupportedStatement::Builder::addExpression(Expression&& e, UErrorCode& status) { + U_ASSERT(expressions != nullptr); + if (U_SUCCESS(status)) { + Expression* expr = create<Expression>(std::move(e), status); + expressions->adoptElement(expr, status); + } + return *this; +} + +UnsupportedStatement UnsupportedStatement::Builder::build(UErrorCode& status) const { + if (U_SUCCESS(status)) { + U_ASSERT(expressions != nullptr); + if (keyword.length() <= 0) { + status = U_ILLEGAL_ARGUMENT_ERROR; + } else if (expressions->size() < 1) { + status = U_ILLEGAL_ARGUMENT_ERROR; + } else { + return UnsupportedStatement(keyword, body, *expressions, status); + } + } + return {}; +} + +const Reserved* UnsupportedStatement::getBody(UErrorCode& errorCode) const { + if (U_SUCCESS(errorCode)) { + if (body.has_value()) { + return &(*body); + } + errorCode = U_ILLEGAL_ARGUMENT_ERROR; + } + return nullptr; +} + +UnsupportedStatement::UnsupportedStatement(const UnicodeString& k, + const std::optional<Reserved>& r, + const UVector& es, + UErrorCode& status) + : keyword(k), body(r), expressionsLen(es.size()) { + CHECK_ERROR(status); + + U_ASSERT(expressionsLen >= 1); + Expression* result = copyVectorToArray<Expression>(es, status); + CHECK_ERROR(status); + expressions.adoptInstead(result); +} + +UnsupportedStatement::UnsupportedStatement(const UnsupportedStatement& other) { + keyword = other.keyword; + body = other.body; + expressionsLen = other.expressionsLen; + U_ASSERT(expressionsLen > 0); + UErrorCode localErrorCode = U_ZERO_ERROR; + expressions.adoptInstead(copyArray(other.expressions.getAlias(), expressionsLen, localErrorCode)); + if (U_FAILURE(localErrorCode)) { + expressionsLen = 0; + } +} + +UnsupportedStatement& UnsupportedStatement::operator=(UnsupportedStatement other) noexcept { + swap(*this, other); + return *this; +} + +UnsupportedStatement::Builder::~Builder() { + if (expressions != nullptr) { + delete expressions; + } +} + +UnsupportedStatement::~UnsupportedStatement() {} +// ----------- PatternPart + +// PatternPart needs a copy constructor in order to make Pattern deeply copyable +// If !isRawText and the copy of the other expression fails, +// then isBogus() will be true for this PatternPart +PatternPart::PatternPart(const PatternPart& other) : piece(other.piece) {} + +const Expression& PatternPart::contents() const { + U_ASSERT(isExpression()); + return *std::get_if<Expression>(&piece); +} + +const Markup& PatternPart::asMarkup() const { + U_ASSERT(isMarkup()); + return *std::get_if<Markup>(&piece); +} + +// Precondition: isText(); +const UnicodeString& PatternPart::asText() const { + U_ASSERT(isText()); + return *std::get_if<UnicodeString>(&piece); +} + +PatternPart& PatternPart::operator=(PatternPart other) noexcept { + swap(*this, other); + return *this; +} + +PatternPart::~PatternPart() {} + +// ---------------- Pattern + +Pattern::Pattern(const UVector& ps, UErrorCode& status) : len(ps.size()) { + if (U_FAILURE(status)) { + return; + } + PatternPart* result = copyVectorToArray<PatternPart>(ps, status); + CHECK_ERROR(status); + parts.adoptInstead(result); +} + +// Copy constructor +Pattern::Pattern(const Pattern& other) : len(other.len) { + U_ASSERT(!other.bogus); + UErrorCode localErrorCode = U_ZERO_ERROR; + if (len == 0) { + parts.adoptInstead(nullptr); + } else { + parts.adoptInstead(copyArray(other.parts.getAlias(), len, localErrorCode)); + } + if (U_FAILURE(localErrorCode)) { + bogus = true; + } +} + +int32_t Pattern::numParts() const { + U_ASSERT(!bogus); + return len; +} + +const PatternPart& Pattern::getPart(int32_t i) const { + U_ASSERT(!bogus && i < numParts()); + return parts[i]; +} + +Pattern::Builder::Builder(UErrorCode& status) { + parts = createUVector(status); +} + +Pattern Pattern::Builder::build(UErrorCode& status) const noexcept { + if (U_FAILURE(status)) { + return {}; + } + U_ASSERT(parts != nullptr); + return Pattern(*parts, status); +} + +Pattern::Builder& Pattern::Builder::add(Expression&& part, UErrorCode& status) noexcept { + U_ASSERT(parts != nullptr); + if (U_SUCCESS(status)) { + PatternPart* l = create<PatternPart>(PatternPart(std::move(part)), status); + parts->adoptElement(l, status); + } + return *this; +} + +Pattern::Builder& Pattern::Builder::add(Markup&& part, UErrorCode& status) noexcept { + U_ASSERT(parts != nullptr); + if (U_SUCCESS(status)) { + PatternPart* l = create<PatternPart>(PatternPart(std::move(part)), status); + parts->adoptElement(l, status); + } + return *this; +} + +Pattern::Builder& Pattern::Builder::add(UnicodeString&& part, UErrorCode& status) noexcept { + U_ASSERT(parts != nullptr); + if (U_SUCCESS(status)) { + PatternPart* l = create<PatternPart>(PatternPart(std::move(part)), status); + parts->adoptElement(l, status); + } + return *this; +} + +Pattern& Pattern::operator=(Pattern other) noexcept { + swap(*this, other); + + return *this; +} + +Pattern::Builder::~Builder() { + if (parts != nullptr) { + delete parts; + } +} + +Pattern::~Pattern() {} + +// ---------------- Binding + +const Expression& Binding::getValue() const { + return expr; +} + +/* static */ Binding Binding::input(UnicodeString&& variableName, Expression&& rhs, UErrorCode& errorCode) { + Binding b; + if (U_SUCCESS(errorCode)) { + const Operand& rand = rhs.getOperand(); + if (!(rand.isVariable() && (rand.asVariable() == variableName))) { + errorCode = U_INVALID_STATE_ERROR; + } else { + const Operator* rator = rhs.getOperator(errorCode); + bool hasOperator = U_SUCCESS(errorCode); + if (hasOperator && rator->isReserved()) { + errorCode = U_INVALID_STATE_ERROR; + } else { + // Clear error code -- the "error" from the absent operator + // is handled + errorCode = U_ZERO_ERROR; + b = Binding(variableName, std::move(rhs)); + b.local = false; + if (hasOperator) { + rator = b.getValue().getOperator(errorCode); + U_ASSERT(U_SUCCESS(errorCode)); + b.annotation = std::get_if<Callable>(&(rator->contents)); + } else { + b.annotation = nullptr; + } + U_ASSERT(!hasOperator || b.annotation != nullptr); + } + } + } + return b; +} + +const OptionMap& Binding::getOptionsInternal() const { + U_ASSERT(annotation != nullptr); + return annotation->getOptions(); +} + +void Binding::updateAnnotation() { + UErrorCode localErrorCode = U_ZERO_ERROR; + const Operator* rator = expr.getOperator(localErrorCode); + if (U_FAILURE(localErrorCode) || rator->isReserved()) { + return; + } + U_ASSERT(U_SUCCESS(localErrorCode) && !rator->isReserved()); + annotation = std::get_if<Callable>(&(rator->contents)); +} + +Binding::Binding(const Binding& other) : var(other.var), expr(other.expr), local(other.local) { + updateAnnotation(); +} + +Binding& Binding::operator=(Binding other) noexcept { + swap(*this, other); + return *this; +} + +Binding::~Binding() {} + +// --------------- Variant + +Variant& Variant::operator=(Variant other) noexcept { + swap(*this, other); + return *this; +} + +Variant::Variant(const Variant& other) : k(other.k), p(other.p) {} + +Variant::~Variant() {} + +// ------------- Matcher + +Matcher& Matcher::operator=(Matcher other) { + swap(*this, other); + return *this; +} + +Matcher::Matcher(const Matcher& other) { + U_ASSERT(!other.bogus); + numSelectors = other.numSelectors; + numVariants = other.numVariants; + UErrorCode localErrorCode = U_ZERO_ERROR; + selectors.adoptInstead(copyArray<Expression>(other.selectors.getAlias(), + numSelectors, + localErrorCode)); + variants.adoptInstead(copyArray<Variant>(other.variants.getAlias(), + numVariants, + localErrorCode)); + if (U_FAILURE(localErrorCode)) { + bogus = true; + } +} + +Matcher::Matcher(Expression* ss, int32_t ns, Variant* vs, int32_t nv) + : selectors(ss), numSelectors(ns), variants(vs), numVariants(nv) {} + +Matcher::~Matcher() {} + +// --------------- MFDataModel + +const Pattern& MFDataModel::getPattern() const { + if (std::holds_alternative<Matcher>(body)) { + // Return reference to empty pattern if this is a selectors message + return empty; + } + return *(std::get_if<Pattern>(&body)); +} + +const Binding* MFDataModel::getLocalVariablesInternal() const { + U_ASSERT(!bogus); + U_ASSERT(bindings.isValid()); + return bindings.getAlias(); +} + +const Expression* MFDataModel::getSelectorsInternal() const { + U_ASSERT(!bogus); + U_ASSERT(!hasPattern()); + return std::get_if<Matcher>(&body)->selectors.getAlias(); +} + +const Variant* MFDataModel::getVariantsInternal() const { + U_ASSERT(!bogus); + U_ASSERT(!hasPattern()); + return std::get_if<Matcher>(&body)->variants.getAlias(); +} + +const UnsupportedStatement* MFDataModel::getUnsupportedStatementsInternal() const { + U_ASSERT(!bogus); + U_ASSERT(unsupportedStatements.isValid()); + return unsupportedStatements.getAlias(); +} + + +MFDataModel::Builder::Builder(UErrorCode& status) { + bindings = createUVector(status); + unsupportedStatements = createUVector(status); +} + +// Invalidate pattern and create selectors/variants if necessary +void MFDataModel::Builder::buildSelectorsMessage(UErrorCode& status) { + CHECK_ERROR(status); + + if (hasPattern) { + selectors = createUVector(status); + variants = createUVector(status); + hasPattern = false; + } + hasPattern = false; + hasSelectors = true; +} + +void MFDataModel::Builder::checkDuplicate(const VariableName& var, UErrorCode& status) const { + CHECK_ERROR(status); + + // This means that handling declarations is quadratic in the number of variables, + // but the `UVector` of locals in the builder could be changed to a `Hashtable` + // if that's a problem + // Note: this also doesn't check _all_ duplicate declaration errors, + // see MessageFormatter::Checker::checkDeclarations() + for (int32_t i = 0; i < bindings->size(); i++) { + if ((static_cast<Binding*>(bindings->elementAt(i)))->getVariable() == var) { + status = U_MF_DUPLICATE_DECLARATION_ERROR; + break; + } + } +} + +MFDataModel::Builder& MFDataModel::Builder::addBinding(Binding&& b, UErrorCode& status) { + if (U_SUCCESS(status)) { + U_ASSERT(bindings != nullptr); + checkDuplicate(b.getVariable(), status); + UErrorCode savedStatus = status; + if (status == U_MF_DUPLICATE_DECLARATION_ERROR) { + // Want to add the binding anyway even if it's a duplicate + status = U_ZERO_ERROR; + } + bindings->adoptElement(create<Binding>(std::move(b), status), status); + if (U_SUCCESS(status) || savedStatus == U_MF_DUPLICATE_DECLARATION_ERROR) { + status = savedStatus; + } + } + return *this; +} + +MFDataModel::Builder& MFDataModel::Builder::addUnsupportedStatement(UnsupportedStatement&& s, UErrorCode& status) { + if (U_SUCCESS(status)) { + U_ASSERT(unsupportedStatements != nullptr); + unsupportedStatements->adoptElement(create<UnsupportedStatement>(std::move(s), status), status); + } + return *this; +} + +/* + selector must be non-null +*/ +MFDataModel::Builder& MFDataModel::Builder::addSelector(Expression&& selector, UErrorCode& status) noexcept { + THIS_ON_ERROR(status); + + buildSelectorsMessage(status); + U_ASSERT(selectors != nullptr); + selectors->adoptElement(create<Expression>(std::move(selector), status), status); + + return *this; +} + +/* + `pattern` must be non-null +*/ +MFDataModel::Builder& MFDataModel::Builder::addVariant(SelectorKeys&& keys, Pattern&& pattern, UErrorCode& errorCode) noexcept { + buildSelectorsMessage(errorCode); + Variant* v = create<Variant>(Variant(std::move(keys), std::move(pattern)), errorCode); + if (U_SUCCESS(errorCode)) { + variants->adoptElement(v, errorCode); + } + return *this; +} + +MFDataModel::Builder& MFDataModel::Builder::setPattern(Pattern&& pat) { + pattern = std::move(pat); + hasPattern = true; + hasSelectors = false; + // Invalidate variants + if (variants != nullptr) { + variants->removeAllElements(); + } + return *this; +} + +MFDataModel::MFDataModel(const MFDataModel& other) : body(Pattern()) { + U_ASSERT(!other.bogus); + + UErrorCode localErrorCode = U_ZERO_ERROR; + + if (other.hasPattern()) { + // body.emplace<Pattern>(Pattern(*std::get_if<Pattern>(&other.body))); + body = *std::get_if<Pattern>(&other.body); + } else { + const Expression* otherSelectors = other.getSelectorsInternal(); + const Variant* otherVariants = other.getVariantsInternal(); + int32_t numSelectors = other.numSelectors(); + int32_t numVariants = other.numVariants(); + Expression* copiedSelectors = copyArray(otherSelectors, numSelectors, localErrorCode); + Variant* copiedVariants = copyArray(otherVariants, numVariants, localErrorCode); + if (U_FAILURE(localErrorCode)) { + bogus = true; + return; + } + // body.emplace<Matcher>(Matcher(copiedSelectors, numSelectors, copiedVariants, numVariants)); + body = Matcher(copiedSelectors, numSelectors, copiedVariants, numVariants); + } + + bindingsLen = other.bindingsLen; + bindings.adoptInstead(copyArray(other.bindings.getAlias(), bindingsLen, localErrorCode)); + if (U_FAILURE(localErrorCode)) { + bogus = true; + } + unsupportedStatementsLen = other.unsupportedStatementsLen; + unsupportedStatements.adoptInstead(copyArray(other.unsupportedStatements.getAlias(), unsupportedStatementsLen, localErrorCode)); + if (U_FAILURE(localErrorCode)) { + bogus = true; + } +} + +MFDataModel::MFDataModel(const MFDataModel::Builder& builder, UErrorCode& errorCode) noexcept : body(Pattern()) { + CHECK_ERROR(errorCode); + + if (builder.hasPattern) { + body.emplace<Pattern>(builder.pattern); + } else { + U_ASSERT(builder.variants != nullptr); + U_ASSERT(builder.selectors != nullptr); + int32_t numVariants = builder.variants->size(); + int32_t numSelectors = builder.selectors->size(); + Variant* variants = copyVectorToArray<Variant>(*builder.variants, errorCode); + Expression* selectors = copyVectorToArray<Expression>(*builder.selectors, errorCode); + if (U_FAILURE(errorCode)) { + bogus = true; + return; + } + body.emplace<Matcher>(Matcher(selectors, numSelectors, variants, numVariants)); + } + + U_ASSERT(builder.bindings != nullptr); + bindingsLen = builder.bindings->size(); + bindings.adoptInstead(copyVectorToArray<Binding>(*builder.bindings, errorCode)); + unsupportedStatementsLen = builder.unsupportedStatements->size(); + unsupportedStatements.adoptInstead(copyVectorToArray<UnsupportedStatement>(*builder.unsupportedStatements, errorCode)); + if (U_FAILURE(errorCode)) { + bogus = true; + } +} + +MFDataModel::MFDataModel() : body(Pattern()) {} + +MFDataModel& MFDataModel::operator=(MFDataModel other) noexcept { + U_ASSERT(!other.bogus); + swap(*this, other); + return *this; +} + +MFDataModel MFDataModel::Builder::build(UErrorCode& errorCode) const noexcept { + if (U_FAILURE(errorCode)) { + return {}; + } + if (!hasPattern && !hasSelectors) { + errorCode = U_INVALID_STATE_ERROR; + } + return MFDataModel(*this, errorCode); +} + +MFDataModel::~MFDataModel() {} +MFDataModel::Builder::~Builder() { + if (selectors != nullptr) { + delete selectors; + } + if (variants != nullptr) { + delete variants; + } + if (bindings != nullptr) { + delete bindings; + } + if (unsupportedStatements != nullptr) { + delete unsupportedStatements; + } +} +} // namespace message2 + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_MF2 */ + +#endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/contrib/libs/icu/i18n/messageformat2_errors.cpp b/contrib/libs/icu/i18n/messageformat2_errors.cpp new file mode 100644 index 0000000000..48fa17a79a --- /dev/null +++ b/contrib/libs/icu/i18n/messageformat2_errors.cpp @@ -0,0 +1,290 @@ +// © 2024 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#if !UCONFIG_NO_MF2 + +#include "messageformat2_allocation.h" +#include "messageformat2_errors.h" +#include "messageformat2_macros.h" +#include "uvector.h" // U_ASSERT + +U_NAMESPACE_BEGIN + +namespace message2 { + + // Errors + // ----------- + + void DynamicErrors::setReservedError(UErrorCode& status) { + addError(DynamicError(DynamicErrorType::ReservedError), status); + } + + void DynamicErrors::setFormattingError(const FunctionName& formatterName, UErrorCode& status) { + addError(DynamicError(DynamicErrorType::FormattingError, formatterName), status); + } + + void DynamicErrors::setFormattingError(UErrorCode& status) { + addError(DynamicError(DynamicErrorType::FormattingError, UnicodeString("unknown formatter")), status); + } + + void DynamicErrors::setOperandMismatchError(const FunctionName& formatterName, UErrorCode& status) { + addError(DynamicError(DynamicErrorType::OperandMismatchError, formatterName), status); + } + + void StaticErrors::setDuplicateOptionName(UErrorCode& status) { + addError(StaticError(StaticErrorType::DuplicateOptionName), status); + } + + void StaticErrors::setMissingSelectorAnnotation(UErrorCode& status) { + addError(StaticError(StaticErrorType::MissingSelectorAnnotation), status); + } + + void DynamicErrors::setSelectorError(const FunctionName& selectorName, UErrorCode& status) { + addError(DynamicError(DynamicErrorType::SelectorError, selectorName), status); + } + + void DynamicErrors::setUnknownFunction(const FunctionName& functionName, UErrorCode& status) { + addError(DynamicError(DynamicErrorType::UnknownFunction, functionName), status); + } + + void DynamicErrors::setUnresolvedVariable(const VariableName& v, UErrorCode& status) { + addError(DynamicError(DynamicErrorType::UnresolvedVariable, v), status); + } + + DynamicErrors::DynamicErrors(const StaticErrors& e, UErrorCode& status) : staticErrors(e) { + resolutionAndFormattingErrors.adoptInstead(createUVector(status)); + } + + StaticErrors::StaticErrors(UErrorCode& status) { + syntaxAndDataModelErrors.adoptInstead(createUVector(status)); + } + + StaticErrors::StaticErrors(StaticErrors&& other) noexcept { + U_ASSERT(other.syntaxAndDataModelErrors.isValid()); + syntaxAndDataModelErrors.adoptInstead(other.syntaxAndDataModelErrors.orphan()); + dataModelError = other.dataModelError; + missingSelectorAnnotationError = other.missingSelectorAnnotationError; + syntaxError = other.syntaxError; + } + + StaticErrors::StaticErrors(const StaticErrors& other, UErrorCode& errorCode) { + CHECK_ERROR(errorCode); + + U_ASSERT(other.syntaxAndDataModelErrors.isValid()); + syntaxAndDataModelErrors.adoptInstead(createUVector(errorCode)); + CHECK_ERROR(errorCode); + for (int32_t i = 0; i < other.syntaxAndDataModelErrors->size(); i++) { + StaticError* e = static_cast<StaticError*>(other.syntaxAndDataModelErrors->elementAt(i)); + U_ASSERT(e != nullptr); + StaticError* copy = new StaticError(*e); + if (copy == nullptr) { + errorCode = U_MEMORY_ALLOCATION_ERROR; + return; + } + syntaxAndDataModelErrors->adoptElement(copy, errorCode); + } + dataModelError = other.dataModelError; + missingSelectorAnnotationError = other.missingSelectorAnnotationError; + syntaxError = other.syntaxError; + } + + int32_t DynamicErrors::count() const { + U_ASSERT(resolutionAndFormattingErrors.isValid() && staticErrors.syntaxAndDataModelErrors.isValid()); + return resolutionAndFormattingErrors->size() + staticErrors.syntaxAndDataModelErrors->size(); + } + + bool DynamicErrors::hasError() const { + return count() > 0; + } + + bool DynamicErrors::hasStaticError() const { + U_ASSERT(staticErrors.syntaxAndDataModelErrors.isValid()); + return staticErrors.syntaxAndDataModelErrors->size() > 0; + } + + const DynamicError& DynamicErrors::first() const { + U_ASSERT(resolutionAndFormattingErrors->size() > 0); + return *static_cast<DynamicError*>(resolutionAndFormattingErrors->elementAt(0)); + } + + void DynamicErrors::checkErrors(UErrorCode& status) const { + if (status != U_ZERO_ERROR) { + return; + } + + // Just handle the first error + // TODO: Eventually want to return all errors to caller + if (count() == 0) { + return; + } + if (staticErrors.syntaxAndDataModelErrors->size() > 0) { + switch (staticErrors.first().type) { + case StaticErrorType::DuplicateDeclarationError: { + status = U_MF_DUPLICATE_DECLARATION_ERROR; + break; + } + case StaticErrorType::DuplicateOptionName: { + status = U_MF_DUPLICATE_OPTION_NAME_ERROR; + break; + } + case StaticErrorType::VariantKeyMismatchError: { + status = U_MF_VARIANT_KEY_MISMATCH_ERROR; + break; + } + case StaticErrorType::NonexhaustivePattern: { + status = U_MF_NONEXHAUSTIVE_PATTERN_ERROR; + break; + } + case StaticErrorType::MissingSelectorAnnotation: { + status = U_MF_MISSING_SELECTOR_ANNOTATION_ERROR; + break; + } + case StaticErrorType::SyntaxError: { + status = U_MF_SYNTAX_ERROR; + break; + } + case StaticErrorType::UnsupportedStatementError: { + status = U_MF_UNSUPPORTED_STATEMENT_ERROR; + } + } + } else { + U_ASSERT(resolutionAndFormattingErrors->size() > 0); + switch (first().type) { + case DynamicErrorType::UnknownFunction: { + status = U_MF_UNKNOWN_FUNCTION_ERROR; + break; + } + case DynamicErrorType::UnresolvedVariable: { + status = U_MF_UNRESOLVED_VARIABLE_ERROR; + break; + } + case DynamicErrorType::FormattingError: { + status = U_MF_FORMATTING_ERROR; + break; + } + case DynamicErrorType::OperandMismatchError: { + status = U_MF_OPERAND_MISMATCH_ERROR; + break; + } + case DynamicErrorType::ReservedError: { + status = U_MF_UNSUPPORTED_EXPRESSION_ERROR; + break; + } + case DynamicErrorType::SelectorError: { + status = U_MF_SELECTOR_ERROR; + break; + } + } + } + } + + void StaticErrors::addSyntaxError(UErrorCode& status) { + addError(StaticError(StaticErrorType::SyntaxError), status); + } + + void StaticErrors::addError(StaticError&& e, UErrorCode& status) { + CHECK_ERROR(status); + + void* errorP = static_cast<void*>(create<StaticError>(std::move(e), status)); + U_ASSERT(syntaxAndDataModelErrors.isValid()); + + switch (e.type) { + case StaticErrorType::SyntaxError: { + syntaxError = true; + break; + } + case StaticErrorType::DuplicateDeclarationError: { + dataModelError = true; + break; + } + case StaticErrorType::DuplicateOptionName: { + dataModelError = true; + break; + } + case StaticErrorType::VariantKeyMismatchError: { + dataModelError = true; + break; + } + case StaticErrorType::NonexhaustivePattern: { + dataModelError = true; + break; + } + case StaticErrorType::MissingSelectorAnnotation: { + missingSelectorAnnotationError = true; + dataModelError = true; + break; + } + case StaticErrorType::UnsupportedStatementError: { + dataModelError = true; + break; + } + } + syntaxAndDataModelErrors->adoptElement(errorP, status); + } + + void DynamicErrors::addError(DynamicError&& e, UErrorCode& status) { + CHECK_ERROR(status); + + void* errorP = static_cast<void*>(create<DynamicError>(std::move(e), status)); + U_ASSERT(resolutionAndFormattingErrors.isValid()); + + switch (e.type) { + case DynamicErrorType::UnresolvedVariable: { + unresolvedVariableError = true; + resolutionAndFormattingErrors->adoptElement(errorP, status); + break; + } + case DynamicErrorType::FormattingError: { + formattingError = true; + resolutionAndFormattingErrors->adoptElement(errorP, status); + break; + } + case DynamicErrorType::OperandMismatchError: { + formattingError = true; + resolutionAndFormattingErrors->adoptElement(errorP, status); + break; + } + case DynamicErrorType::ReservedError: { + resolutionAndFormattingErrors->adoptElement(errorP, status); + break; + } + case DynamicErrorType::SelectorError: { + selectorError = true; + resolutionAndFormattingErrors->adoptElement(errorP, status); + break; + } + case DynamicErrorType::UnknownFunction: { + unknownFunctionError = true; + resolutionAndFormattingErrors->adoptElement(errorP, status); + break; + } + } + } + + const StaticError& StaticErrors::first() const { + U_ASSERT(syntaxAndDataModelErrors.isValid() && syntaxAndDataModelErrors->size() > 0); + return *static_cast<StaticError*>(syntaxAndDataModelErrors->elementAt(0)); + } + + StaticErrors::~StaticErrors() {} + DynamicErrors::~DynamicErrors() {} + + template<typename ErrorType> + Error<ErrorType>::~Error() {} + + template<> + Error<StaticErrorType>::~Error() {} + template<> + Error<DynamicErrorType>::~Error() {} + +} // namespace message2 + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_MF2 */ + +#endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/contrib/libs/icu/i18n/messageformat2_errors.h b/contrib/libs/icu/i18n/messageformat2_errors.h new file mode 100644 index 0000000000..ef2ad20fad --- /dev/null +++ b/contrib/libs/icu/i18n/messageformat2_errors.h @@ -0,0 +1,160 @@ +// © 2024 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#ifndef U_HIDE_DEPRECATED_API + +#ifndef MESSAGEFORMAT2_ERRORS_H +#define MESSAGEFORMAT2_ERRORS_H + +#if U_SHOW_CPLUSPLUS_API + +/** + * \file + * \brief C++ API: Formats messages using the draft MessageFormat 2.0. + */ + +#if !UCONFIG_NO_FORMATTING + +#if !UCONFIG_NO_MF2 + +#include "unicode/messageformat2_data_model_names.h" +#include "unicode/unistr.h" + +#include "uvector.h" + +U_NAMESPACE_BEGIN + +namespace message2 { + + using namespace data_model; + + // Errors + // ---------- + + class DynamicErrors; + class StaticErrors; + + // Internal class -- used as a private field in MessageFormatter + template <typename ErrorType> + class Error : public UObject { + public: + Error(ErrorType ty) : type(ty) {} + Error(ErrorType ty, const UnicodeString& s) : type(ty), contents(s) {} + virtual ~Error(); + private: + friend class DynamicErrors; + friend class StaticErrors; + + ErrorType type; + UnicodeString contents; + }; // class Error + + enum StaticErrorType { + DuplicateDeclarationError, + DuplicateOptionName, + MissingSelectorAnnotation, + NonexhaustivePattern, + SyntaxError, + UnsupportedStatementError, + VariantKeyMismatchError + }; + + enum DynamicErrorType { + UnresolvedVariable, + FormattingError, + OperandMismatchError, + ReservedError, + SelectorError, + UnknownFunction, + }; + + using StaticError = Error<StaticErrorType>; + using DynamicError = Error<DynamicErrorType>; + + // These explicit instantiations have to come before the + // destructor definitions + template<> + Error<StaticErrorType>::~Error(); + template<> + Error<DynamicErrorType>::~Error(); + + class StaticErrors : public UObject { + private: + friend class DynamicErrors; + + LocalPointer<UVector> syntaxAndDataModelErrors; + bool dataModelError = false; + bool missingSelectorAnnotationError = false; + bool syntaxError = false; + + public: + StaticErrors(UErrorCode&); + + void setMissingSelectorAnnotation(UErrorCode&); + void setDuplicateOptionName(UErrorCode&); + void addSyntaxError(UErrorCode&); + bool hasDataModelError() const { return dataModelError; } + bool hasSyntaxError() const { return syntaxError; } + bool hasMissingSelectorAnnotationError() const { return missingSelectorAnnotationError; } + void addError(StaticError&&, UErrorCode&); + void checkErrors(UErrorCode&); + + const StaticError& first() const; + StaticErrors(const StaticErrors&, UErrorCode&); + StaticErrors(StaticErrors&&) noexcept; + virtual ~StaticErrors(); + }; // class StaticErrors + + class DynamicErrors : public UObject { + private: + const StaticErrors& staticErrors; + LocalPointer<UVector> resolutionAndFormattingErrors; + bool formattingError = false; + bool selectorError = false; + bool unknownFunctionError = false; + bool unresolvedVariableError = false; + + public: + DynamicErrors(const StaticErrors&, UErrorCode&); + + int32_t count() const; + void setSelectorError(const FunctionName&, UErrorCode&); + void setReservedError(UErrorCode&); + void setUnresolvedVariable(const VariableName&, UErrorCode&); + void setUnknownFunction(const FunctionName&, UErrorCode&); + void setFormattingError(const FunctionName&, UErrorCode&); + // Used when the name of the offending formatter is unknown + void setFormattingError(UErrorCode&); + void setOperandMismatchError(const FunctionName&, UErrorCode&); + bool hasDataModelError() const { return staticErrors.hasDataModelError(); } + bool hasFormattingError() const { return formattingError; } + bool hasSelectorError() const { return selectorError; } + bool hasSyntaxError() const { return staticErrors.hasSyntaxError(); } + bool hasUnknownFunctionError() const { return unknownFunctionError; } + bool hasMissingSelectorAnnotationError() const { return staticErrors.hasMissingSelectorAnnotationError(); } + bool hasUnresolvedVariableError() const { return unresolvedVariableError; } + void addError(DynamicError&&, UErrorCode&); + void checkErrors(UErrorCode&) const; + bool hasError() const; + bool hasStaticError() const; + + const DynamicError& first() const; + virtual ~DynamicErrors(); + }; // class DynamicErrors + +} // namespace message2 + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_MF2 */ + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif /* U_SHOW_CPLUSPLUS_API */ + +#endif // MESSAGEFORMAT2_ERRORS_H + +#endif // U_HIDE_DEPRECATED_API +// eof diff --git a/contrib/libs/icu/i18n/messageformat2_evaluation.cpp b/contrib/libs/icu/i18n/messageformat2_evaluation.cpp new file mode 100644 index 0000000000..41e4c9a802 --- /dev/null +++ b/contrib/libs/icu/i18n/messageformat2_evaluation.cpp @@ -0,0 +1,207 @@ +// © 2024 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#if !UCONFIG_NO_MF2 + +#include "messageformat2_allocation.h" +#include "messageformat2_evaluation.h" +#include "messageformat2_macros.h" +#include "uvector.h" // U_ASSERT + +U_NAMESPACE_BEGIN + +// Auxiliary data structures used during formatting a message + +namespace message2 { + +using namespace data_model; + +// Functions +// ------------- + +ResolvedFunctionOption::ResolvedFunctionOption(ResolvedFunctionOption&& other) { + name = std::move(other.name); + value = std::move(other.value); +} + +ResolvedFunctionOption::~ResolvedFunctionOption() {} + + +const ResolvedFunctionOption* FunctionOptions::getResolvedFunctionOptions(int32_t& len) const { + len = functionOptionsLen; + U_ASSERT(len == 0 || options != nullptr); + return options; +} + +FunctionOptions::FunctionOptions(UVector&& optionsVector, UErrorCode& status) { + CHECK_ERROR(status); + + functionOptionsLen = optionsVector.size(); + options = moveVectorToArray<ResolvedFunctionOption>(optionsVector, status); +} + +UBool FunctionOptions::getFunctionOption(const UnicodeString& key, Formattable& option) const { + if (options == nullptr) { + U_ASSERT(functionOptionsLen == 0); + } + for (int32_t i = 0; i < functionOptionsLen; i++) { + const ResolvedFunctionOption& opt = options[i]; + if (opt.getName() == key) { + option = opt.getValue(); + return true; + } + } + return false; +} + +UnicodeString FunctionOptions::getStringFunctionOption(const UnicodeString& key) const { + Formattable option; + if (getFunctionOption(key, option)) { + if (option.getType() == UFMT_STRING) { + UErrorCode localErrorCode = U_ZERO_ERROR; + UnicodeString val = option.getString(localErrorCode); + U_ASSERT(U_SUCCESS(localErrorCode)); + return val; + } + } + // For anything else, including non-string values, return "". + // Alternately, could try to stringify the non-string option. + // (Currently, no tests require that.) + return {}; +} + +FunctionOptions& FunctionOptions::operator=(FunctionOptions&& other) noexcept { + functionOptionsLen = other.functionOptionsLen; + options = other.options; + other.functionOptionsLen = 0; + other.options = nullptr; + return *this; +} + +FunctionOptions::FunctionOptions(FunctionOptions&& other) { + *this = std::move(other); +} + +FunctionOptions::~FunctionOptions() { + if (options != nullptr) { + delete[] options; + } +} +// ResolvedSelector +// ---------------- + +ResolvedSelector::ResolvedSelector(const FunctionName& fn, + Selector* sel, + FunctionOptions&& opts, + FormattedPlaceholder&& val) + : selectorName(fn), selector(sel), options(std::move(opts)), value(std::move(val)) { + U_ASSERT(sel != nullptr); +} + +ResolvedSelector::ResolvedSelector(FormattedPlaceholder&& val) : value(std::move(val)) {} + +ResolvedSelector& ResolvedSelector::operator=(ResolvedSelector&& other) noexcept { + selectorName = std::move(other.selectorName); + selector.adoptInstead(other.selector.orphan()); + options = std::move(other.options); + value = std::move(other.value); + return *this; +} + +ResolvedSelector::ResolvedSelector(ResolvedSelector&& other) { + *this = std::move(other); +} + +ResolvedSelector::~ResolvedSelector() {} + +// PrioritizedVariant +// ------------------ + +UBool PrioritizedVariant::operator<(const PrioritizedVariant& other) const { + if (priority < other.priority) { + return true; + } + return false; +} + +PrioritizedVariant::~PrioritizedVariant() {} + + // ---------------- Environments and closures + + Environment* Environment::create(const VariableName& var, Closure&& c, Environment* parent, UErrorCode& errorCode) { + NULL_ON_ERROR(errorCode); + Environment* result = new NonEmptyEnvironment(var, std::move(c), parent); + if (result == nullptr) { + errorCode = U_MEMORY_ALLOCATION_ERROR; + return nullptr; + } + return result; + } + + Environment* Environment::create(UErrorCode& errorCode) { + NULL_ON_ERROR(errorCode); + Environment* result = new EmptyEnvironment(); + if (result == nullptr) { + errorCode = U_MEMORY_ALLOCATION_ERROR; + return nullptr; + } + return result; + } + + const Closure& EmptyEnvironment::lookup(const VariableName& v) const { + (void) v; + U_ASSERT(false); + UPRV_UNREACHABLE_EXIT; + } + + const Closure& NonEmptyEnvironment::lookup(const VariableName& v) const { + if (v == var) { + return rhs; + } + return parent->lookup(v); + } + + bool EmptyEnvironment::has(const VariableName& v) const { + (void) v; + return false; + } + + bool NonEmptyEnvironment::has(const VariableName& v) const { + if (v == var) { + return true; + } + return parent->has(v); + } + + Environment::~Environment() {} + NonEmptyEnvironment::~NonEmptyEnvironment() {} + EmptyEnvironment::~EmptyEnvironment() {} + + Closure::~Closure() {} + + // MessageContext methods + + void MessageContext::checkErrors(UErrorCode& status) const { + CHECK_ERROR(status); + errors.checkErrors(status); + } + + const Formattable* MessageContext::getGlobal(const VariableName& v, UErrorCode& errorCode) const { + return arguments.getArgument(v, errorCode); + } + + MessageContext::MessageContext(const MessageArguments& args, + const StaticErrors& e, + UErrorCode& status) : arguments(args), errors(e, status) {} + MessageContext::~MessageContext() {} + +} // namespace message2 +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_MF2 */ + +#endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/contrib/libs/icu/i18n/messageformat2_evaluation.h b/contrib/libs/icu/i18n/messageformat2_evaluation.h new file mode 100644 index 0000000000..b8ae024236 --- /dev/null +++ b/contrib/libs/icu/i18n/messageformat2_evaluation.h @@ -0,0 +1,209 @@ +// © 2024 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#ifndef U_HIDE_DEPRECATED_API + +#ifndef MESSAGEFORMAT2_EVALUATION_H +#define MESSAGEFORMAT2_EVALUATION_H + +#if U_SHOW_CPLUSPLUS_API + +/** + * \file + * \brief C++ API: Formats messages using the draft MessageFormat 2.0. + */ + +#if !UCONFIG_NO_FORMATTING + +#if !UCONFIG_NO_MF2 + +#include "unicode/messageformat2_arguments.h" +#include "unicode/messageformat2_data_model.h" +#include "unicode/messageformat2_function_registry.h" +#include "messageformat2_errors.h" + +// Auxiliary data structures used during formatting a message + +U_NAMESPACE_BEGIN + +namespace message2 { + + using namespace data_model; + + // PrioritizedVariant + + // For how this class is used, see the references to (integer, variant) tuples + // in https://github.com/unicode-org/message-format-wg/blob/main/spec/formatting.md#pattern-selection + class PrioritizedVariant : public UObject { + public: + PrioritizedVariant() = default; + PrioritizedVariant(PrioritizedVariant&&) = default; + PrioritizedVariant& operator=(PrioritizedVariant&&) noexcept = default; + UBool operator<(const PrioritizedVariant&) const; + int32_t priority; + /* const */ SelectorKeys keys; + /* const */ Pattern pat; + PrioritizedVariant(uint32_t p, + const SelectorKeys& k, + const Pattern& pattern) noexcept : priority(p), keys(k), pat(pattern) {} + virtual ~PrioritizedVariant(); + }; // class PrioritizedVariant + + static inline int32_t comparePrioritizedVariants(UElement left, UElement right) { + const PrioritizedVariant& tuple1 = *(static_cast<const PrioritizedVariant*>(left.pointer)); + const PrioritizedVariant& tuple2 = *(static_cast<const PrioritizedVariant*>(right.pointer)); + if (tuple1 < tuple2) { + return -1; + } + if (tuple1.priority == tuple2.priority) { + return 0; + } + return 1; + } + + // Encapsulates a value to be scrutinized by a `match` with its resolved + // options and the name of the selector + class ResolvedSelector : public UObject { + public: + ResolvedSelector() {} + ResolvedSelector(const FunctionName& fn, + Selector* selector, + FunctionOptions&& options, + FormattedPlaceholder&& value); + // Used either for errors, or when selector isn't yet known + explicit ResolvedSelector(FormattedPlaceholder&& value); + bool hasSelector() const { return selector.isValid(); } + const FormattedPlaceholder& argument() const { return value; } + FormattedPlaceholder&& takeArgument() { return std::move(value); } + const Selector* getSelector() { + U_ASSERT(selector.isValid()); + return selector.getAlias(); + } + FunctionOptions&& takeOptions() { + return std::move(options); + } + const FunctionName& getSelectorName() const { return selectorName; } + virtual ~ResolvedSelector(); + ResolvedSelector& operator=(ResolvedSelector&&) noexcept; + ResolvedSelector(ResolvedSelector&&); + private: + FunctionName selectorName; // For error reporting + LocalPointer<Selector> selector; + FunctionOptions options; + FormattedPlaceholder value; + }; // class ResolvedSelector + + // Closures and environments + // ------------------------- + + class Environment; + + // A closure represents the right-hand side of a variable + // declaration, along with an environment giving values + // to its free variables + class Closure : public UMemory { + public: + const Expression& getExpr() const { + return expr; + } + const Environment& getEnv() const { + return env; + } + Closure(const Expression& expression, const Environment& environment) : expr(expression), env(environment) {} + Closure(Closure&&) = default; + + virtual ~Closure(); + private: + + // An unevaluated expression + const Expression& expr; + // The environment mapping names used in this + // expression to other expressions + const Environment& env; + }; + + // An environment is represented as a linked chain of + // non-empty environments, terminating at an empty environment. + // It's searched using linear search. + class Environment : public UMemory { + public: + virtual bool has(const VariableName&) const = 0; + virtual const Closure& lookup(const VariableName&) const = 0; + static Environment* create(UErrorCode&); + static Environment* create(const VariableName&, Closure&&, Environment*, UErrorCode&); + virtual ~Environment(); + }; + + class NonEmptyEnvironment; + class EmptyEnvironment : public Environment { + public: + EmptyEnvironment() = default; + virtual ~EmptyEnvironment(); + + private: + friend class Environment; + + bool has(const VariableName&) const override; + const Closure& lookup(const VariableName&) const override; + static EmptyEnvironment* create(UErrorCode&); + static NonEmptyEnvironment* create(const VariableName&, Closure&&, Environment*, UErrorCode&); + }; + + class NonEmptyEnvironment : public Environment { + private: + friend class Environment; + + bool has(const VariableName&) const override; + const Closure& lookup(const VariableName&) const override; + static NonEmptyEnvironment* create(const VariableName&, Closure&&, const Environment*, UErrorCode&); + virtual ~NonEmptyEnvironment(); + private: + friend class Environment; + + NonEmptyEnvironment(const VariableName& v, Closure&& c, Environment* e) : var(v), rhs(std::move(c)), parent(e) {} + + // Maps VariableName onto Closure* + // Chain of linked environments + VariableName var; + Closure rhs; + const LocalPointer<Environment> parent; + }; + + // The context contains all the information needed to process + // an entire message: arguments, formatter cache, and error list + + class MessageContext : public UMemory { + public: + MessageContext(const MessageArguments&, const StaticErrors&, UErrorCode&); + + const Formattable* getGlobal(const VariableName&, UErrorCode&) const; + + // If any errors were set, update `status` accordingly + void checkErrors(UErrorCode& status) const; + DynamicErrors& getErrors() { return errors; } + + virtual ~MessageContext(); + + private: + + const MessageArguments& arguments; // External message arguments + // Errors accumulated during parsing/formatting + DynamicErrors errors; + }; // class MessageContext + +} // namespace message2 + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_MF2 */ + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif /* U_SHOW_CPLUSPLUS_API */ + +#endif // MESSAGEFORMAT2_EVALUATION_H + +#endif // U_HIDE_DEPRECATED_API +// eof diff --git a/contrib/libs/icu/i18n/messageformat2_formattable.cpp b/contrib/libs/icu/i18n/messageformat2_formattable.cpp new file mode 100644 index 0000000000..3152ccb44f --- /dev/null +++ b/contrib/libs/icu/i18n/messageformat2_formattable.cpp @@ -0,0 +1,338 @@ +// © 2024 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#if !UCONFIG_NO_MF2 + +#include "unicode/messageformat2_formattable.h" +#include "unicode/smpdtfmt.h" +#include "messageformat2_macros.h" + +#include "limits.h" + +U_NAMESPACE_BEGIN + +namespace message2 { + + // Fallback values are enclosed in curly braces; + // see https://github.com/unicode-org/message-format-wg/blob/main/spec/formatting.md#formatting-fallback-values + + static UnicodeString fallbackToString(const UnicodeString& s) { + UnicodeString result; + result += LEFT_CURLY_BRACE; + result += s; + result += RIGHT_CURLY_BRACE; + return result; + } + + Formattable& Formattable::operator=(Formattable other) noexcept { + swap(*this, other); + return *this; + } + + Formattable::Formattable(const Formattable& other) { + contents = other.contents; + holdsDate = other.holdsDate; + } + + Formattable Formattable::forDecimal(std::string_view number, UErrorCode &status) { + Formattable f; + // The relevant overload of the StringPiece constructor + // casts the string length to int32_t, so we have to check + // that the length makes sense + if (number.size() > INT_MAX) { + status = U_ILLEGAL_ARGUMENT_ERROR; + } else { + f.contents = icu::Formattable(StringPiece(number), status); + } + return f; + } + + UFormattableType Formattable::getType() const { + if (std::holds_alternative<double>(contents)) { + return holdsDate ? UFMT_DATE : UFMT_DOUBLE; + } + if (std::holds_alternative<int64_t>(contents)) { + return UFMT_INT64; + } + if (std::holds_alternative<UnicodeString>(contents)) { + return UFMT_STRING; + } + if (isDecimal()) { + switch (std::get_if<icu::Formattable>(&contents)->getType()) { + case icu::Formattable::Type::kLong: { + return UFMT_LONG; + } + case icu::Formattable::Type::kDouble: { + return UFMT_DOUBLE; + } + default: { + return UFMT_INT64; + } + } + } + if (std::holds_alternative<const FormattableObject*>(contents)) { + return UFMT_OBJECT; + } + return UFMT_ARRAY; + } + + const Formattable* Formattable::getArray(int32_t& len, UErrorCode& status) const { + NULL_ON_ERROR(status); + + if (getType() != UFMT_ARRAY) { + len = 0; + status = U_ILLEGAL_ARGUMENT_ERROR; + return nullptr; + } + const std::pair<const Formattable*, int32_t>& p = *std::get_if<std::pair<const Formattable*, int32_t>>(&contents); + U_ASSERT(p.first != nullptr); + len = p.second; + return p.first; + } + + int64_t Formattable::getInt64(UErrorCode& status) const { + if (isDecimal() && isNumeric()) { + return std::get_if<icu::Formattable>(&contents)->getInt64(status); + } + + switch (getType()) { + case UFMT_LONG: + case UFMT_INT64: { + return *std::get_if<int64_t>(&contents); + } + case UFMT_DOUBLE: { + return icu::Formattable(*std::get_if<double>(&contents)).getInt64(status); + } + default: { + status = U_INVALID_FORMAT_ERROR; + return 0; + } + } + } + + icu::Formattable Formattable::asICUFormattable(UErrorCode& status) const { + if (U_FAILURE(status)) { + return {}; + } + // Type must not be UFMT_ARRAY or UFMT_OBJECT + if (getType() == UFMT_ARRAY || getType() == UFMT_OBJECT) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return {}; + } + + if (isDecimal()) { + return *std::get_if<icu::Formattable>(&contents); + } + + switch (getType()) { + case UFMT_DATE: { + return icu::Formattable(*std::get_if<double>(&contents), icu::Formattable::kIsDate); + } + case UFMT_DOUBLE: { + return icu::Formattable(*std::get_if<double>(&contents)); + } + case UFMT_LONG: { + return icu::Formattable(static_cast<int32_t>(*std::get_if<double>(&contents))); + } + case UFMT_INT64: { + return icu::Formattable(*std::get_if<int64_t>(&contents)); + } + case UFMT_STRING: { + return icu::Formattable(*std::get_if<UnicodeString>(&contents)); + } + default: { + // Already checked for UFMT_ARRAY and UFMT_OBJECT + return icu::Formattable(); + } + } + } + + Formattable::~Formattable() {} + + FormattableObject::~FormattableObject() {} + + FormattedMessage::~FormattedMessage() {} + + FormattedValue::FormattedValue(const UnicodeString& s) { + type = kString; + stringOutput = std::move(s); + } + + FormattedValue::FormattedValue(number::FormattedNumber&& n) { + type = kNumber; + numberOutput = std::move(n); + } + + FormattedValue& FormattedValue::operator=(FormattedValue&& other) noexcept { + type = other.type; + if (type == kString) { + stringOutput = std::move(other.stringOutput); + } else { + numberOutput = std::move(other.numberOutput); + } + return *this; + } + + FormattedValue::~FormattedValue() {} + + FormattedPlaceholder& FormattedPlaceholder::operator=(FormattedPlaceholder&& other) noexcept { + type = other.type; + source = other.source; + if (type == kEvaluated) { + formatted = std::move(other.formatted); + previousOptions = std::move(other.previousOptions); + } + fallback = other.fallback; + return *this; + } + + const Formattable& FormattedPlaceholder::asFormattable() const { + return source; + } + + // Default formatters + // ------------------ + + number::FormattedNumber formatNumberWithDefaults(const Locale& locale, double toFormat, UErrorCode& errorCode) { + return number::NumberFormatter::withLocale(locale).formatDouble(toFormat, errorCode); + } + + number::FormattedNumber formatNumberWithDefaults(const Locale& locale, int32_t toFormat, UErrorCode& errorCode) { + return number::NumberFormatter::withLocale(locale).formatInt(toFormat, errorCode); + } + + number::FormattedNumber formatNumberWithDefaults(const Locale& locale, int64_t toFormat, UErrorCode& errorCode) { + return number::NumberFormatter::withLocale(locale).formatInt(toFormat, errorCode); + } + + number::FormattedNumber formatNumberWithDefaults(const Locale& locale, StringPiece toFormat, UErrorCode& errorCode) { + return number::NumberFormatter::withLocale(locale).formatDecimal(toFormat, errorCode); + } + + DateFormat* defaultDateTimeInstance(const Locale& locale, UErrorCode& errorCode) { + NULL_ON_ERROR(errorCode); + LocalPointer<DateFormat> df(DateFormat::createDateTimeInstance(DateFormat::SHORT, DateFormat::SHORT, locale)); + if (!df.isValid()) { + errorCode = U_MEMORY_ALLOCATION_ERROR; + return nullptr; + } + return df.orphan(); + } + + void formatDateWithDefaults(const Locale& locale, UDate date, UnicodeString& result, UErrorCode& errorCode) { + CHECK_ERROR(errorCode); + + LocalPointer<DateFormat> df(defaultDateTimeInstance(locale, errorCode)); + CHECK_ERROR(errorCode); + df->format(date, result, 0, errorCode); + } + + // Called when output is required and the contents are an unevaluated `Formattable`; + // formats the source `Formattable` to a string with defaults, if it can be + // formatted with a default formatter + static FormattedPlaceholder formatWithDefaults(const Locale& locale, const FormattedPlaceholder& input, UErrorCode& status) { + if (U_FAILURE(status)) { + return {}; + } + + const Formattable& toFormat = input.asFormattable(); + // Try as decimal number first + if (toFormat.isNumeric()) { + // Note: the ICU Formattable has to be created here since the StringPiece + // refers to state inside the Formattable; so otherwise we'll have a reference + // to a temporary object + icu::Formattable icuFormattable = toFormat.asICUFormattable(status); + StringPiece asDecimal = icuFormattable.getDecimalNumber(status); + if (U_FAILURE(status)) { + return {}; + } + if (asDecimal != nullptr) { + return FormattedPlaceholder(input, FormattedValue(formatNumberWithDefaults(locale, asDecimal, status))); + } + } + + UFormattableType type = toFormat.getType(); + switch (type) { + case UFMT_DATE: { + UnicodeString result; + UDate d = toFormat.getDate(status); + U_ASSERT(U_SUCCESS(status)); + formatDateWithDefaults(locale, d, result, status); + return FormattedPlaceholder(input, FormattedValue(std::move(result))); + } + case UFMT_DOUBLE: { + double d = toFormat.getDouble(status); + U_ASSERT(U_SUCCESS(status)); + return FormattedPlaceholder(input, FormattedValue(formatNumberWithDefaults(locale, d, status))); + } + case UFMT_LONG: { + int32_t l = toFormat.getLong(status); + U_ASSERT(U_SUCCESS(status)); + return FormattedPlaceholder(input, FormattedValue(formatNumberWithDefaults(locale, l, status))); + } + case UFMT_INT64: { + int64_t i = toFormat.getInt64Value(status); + U_ASSERT(U_SUCCESS(status)); + return FormattedPlaceholder(input, FormattedValue(formatNumberWithDefaults(locale, i, status))); + } + case UFMT_STRING: { + const UnicodeString& s = toFormat.getString(status); + U_ASSERT(U_SUCCESS(status)); + return FormattedPlaceholder(input, FormattedValue(UnicodeString(s))); + } + default: { + // No default formatters for other types; use fallback + status = U_MF_FORMATTING_ERROR; + // Note: it would be better to set an internal formatting error so that a string + // (e.g. the type tag) can be provided. However, this method is called by the + // public method formatToString() and thus can't take a MessageContext + return FormattedPlaceholder(input.getFallback()); + } + } + } + + // Called when string output is required; forces output to be produced + // if none is present (including formatting number output as a string) + UnicodeString FormattedPlaceholder::formatToString(const Locale& locale, + UErrorCode& status) const { + if (U_FAILURE(status)) { + return {}; + } + if (isFallback() || isNullOperand()) { + return fallbackToString(fallback); + } + + // Evaluated value: either just return the string, or format the number + // as a string and return it + if (isEvaluated()) { + if (formatted.isString()) { + return formatted.getString(); + } else { + return formatted.getNumber().toString(status); + } + } + // Unevaluated value: first evaluate it fully, then format + UErrorCode savedStatus = status; + FormattedPlaceholder evaluated = formatWithDefaults(locale, *this, status); + if (status == U_MF_FORMATTING_ERROR) { + U_ASSERT(evaluated.isFallback()); + return evaluated.getFallback(); + } + // Ignore U_USING_DEFAULT_WARNING + if (status == U_USING_DEFAULT_WARNING) { + status = savedStatus; + } + return evaluated.formatToString(locale, status); + } + +} // namespace message2 + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_MF2 */ + +#endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/contrib/libs/icu/i18n/messageformat2_formatter.cpp b/contrib/libs/icu/i18n/messageformat2_formatter.cpp new file mode 100644 index 0000000000..47be398788 --- /dev/null +++ b/contrib/libs/icu/i18n/messageformat2_formatter.cpp @@ -0,0 +1,326 @@ +// © 2024 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#if !UCONFIG_NO_MF2 + +#include "unicode/messageformat2.h" +#include "messageformat2_allocation.h" +#include "messageformat2_checker.h" +#include "messageformat2_errors.h" +#include "messageformat2_evaluation.h" +#include "messageformat2_function_registry_internal.h" +#include "messageformat2_macros.h" +#include "messageformat2_parser.h" +#include "messageformat2_serializer.h" +#include "uvector.h" // U_ASSERT + +U_NAMESPACE_BEGIN + +namespace message2 { + + // MessageFormatter::Builder + + // ------------------------------------- + // Creates a MessageFormat instance based on the pattern. + + MessageFormatter::Builder& MessageFormatter::Builder::setPattern(const UnicodeString& pat, UParseError& parseError, UErrorCode& errorCode) { + normalizedInput.remove(); + // Parse the pattern + MFDataModel::Builder tree(errorCode); + Parser(pat, tree, *errors, normalizedInput).parse(parseError, errorCode); + + // Build the data model based on what was parsed + dataModel = tree.build(errorCode); + hasDataModel = true; + hasPattern = true; + pattern = pat; + + return *this; + } + + // Precondition: `reg` is non-null + // Does not adopt `reg` + MessageFormatter::Builder& MessageFormatter::Builder::setFunctionRegistry(const MFFunctionRegistry& reg) { + customMFFunctionRegistry = ® + return *this; + } + + MessageFormatter::Builder& MessageFormatter::Builder::setLocale(const Locale& loc) { + locale = loc; + return *this; + } + + MessageFormatter::Builder& MessageFormatter::Builder::setDataModel(MFDataModel&& newDataModel) { + normalizedInput.remove(); + delete errors; + errors = nullptr; + hasPattern = false; + hasDataModel = true; + dataModel = std::move(newDataModel); + + return *this; + } + + /* + This build() method is non-destructive, which entails the risk that + its borrowed MFFunctionRegistry and (if the setDataModel() method was called) + MFDataModel pointers could become invalidated. + */ + MessageFormatter MessageFormatter::Builder::build(UErrorCode& errorCode) const { + return MessageFormatter(*this, errorCode); + } + + MessageFormatter::Builder::Builder(UErrorCode& errorCode) : locale(Locale::getDefault()), customMFFunctionRegistry(nullptr) { + // Initialize errors + errors = new StaticErrors(errorCode); + CHECK_ERROR(errorCode); + if (errors == nullptr) { + errorCode = U_MEMORY_ALLOCATION_ERROR; + } + } + + MessageFormatter::Builder::~Builder() { + if (errors != nullptr) { + delete errors; + } + } + + // MessageFormatter + + MessageFormatter::MessageFormatter(const MessageFormatter::Builder& builder, UErrorCode &success) : locale(builder.locale), customMFFunctionRegistry(builder.customMFFunctionRegistry) { + CHECK_ERROR(success); + + // Set up the standard function registry + MFFunctionRegistry::Builder standardFunctionsBuilder(success); + + FormatterFactory* dateTime = StandardFunctions::DateTimeFactory::dateTime(success); + FormatterFactory* date = StandardFunctions::DateTimeFactory::date(success); + FormatterFactory* time = StandardFunctions::DateTimeFactory::time(success); + FormatterFactory* number = new StandardFunctions::NumberFactory(); + FormatterFactory* integer = new StandardFunctions::IntegerFactory(); + standardFunctionsBuilder.adoptFormatter(FunctionName(UnicodeString("datetime")), dateTime, success) + .adoptFormatter(FunctionName(UnicodeString("date")), date, success) + .adoptFormatter(FunctionName(UnicodeString("time")), time, success) + .adoptFormatter(FunctionName(UnicodeString("number")), number, success) + .adoptFormatter(FunctionName(UnicodeString("integer")), integer, success) + .adoptSelector(FunctionName(UnicodeString("number")), new StandardFunctions::PluralFactory(UPLURAL_TYPE_CARDINAL), success) + .adoptSelector(FunctionName(UnicodeString("integer")), new StandardFunctions::PluralFactory(StandardFunctions::PluralFactory::integer()), success) + .adoptSelector(FunctionName(UnicodeString("string")), new StandardFunctions::TextFactory(), success); + CHECK_ERROR(success); + standardMFFunctionRegistry = standardFunctionsBuilder.build(); + CHECK_ERROR(success); + standardMFFunctionRegistry.checkStandard(); + + normalizedInput = builder.normalizedInput; + + // Build data model + // First, check that there is a data model + // (which might have been set by setDataModel(), or to + // the data model parsed from the pattern by setPattern()) + + if (!builder.hasDataModel) { + success = U_INVALID_STATE_ERROR; + return; + } + + dataModel = builder.dataModel; + if (builder.errors != nullptr) { + errors = new StaticErrors(*builder.errors, success); + } else { + // Initialize errors + LocalPointer<StaticErrors> errorsNew(new StaticErrors(success)); + CHECK_ERROR(success); + errors = errorsNew.orphan(); + } + + // Note: we currently evaluate variables lazily, + // without memoization. This call is still necessary + // to check out-of-scope uses of local variables in + // right-hand sides (unresolved variable errors can + // only be checked when arguments are known) + + // Check for resolution errors + Checker(dataModel, *errors).check(success); + } + + void MessageFormatter::cleanup() noexcept { + if (errors != nullptr) { + delete errors; + } + } + + MessageFormatter& MessageFormatter::operator=(MessageFormatter&& other) noexcept { + cleanup(); + + locale = std::move(other.locale); + standardMFFunctionRegistry = std::move(other.standardMFFunctionRegistry); + customMFFunctionRegistry = other.customMFFunctionRegistry; + dataModel = std::move(other.dataModel); + normalizedInput = std::move(other.normalizedInput); + errors = other.errors; + other.errors = nullptr; + return *this; + } + + const MFDataModel& MessageFormatter::getDataModel() const { return dataModel; } + + UnicodeString MessageFormatter::getPattern() const { + // Converts the current data model back to a string + UnicodeString result; + Serializer serializer(getDataModel(), result); + serializer.serialize(); + return result; + } + + // Precondition: custom function registry exists + const MFFunctionRegistry& MessageFormatter::getCustomMFFunctionRegistry() const { + U_ASSERT(hasCustomMFFunctionRegistry()); + return *customMFFunctionRegistry; + } + + MessageFormatter::~MessageFormatter() { + cleanup(); + } + + // Selector and formatter lookup + // ----------------------------- + + // Postcondition: selector != nullptr || U_FAILURE(status) + Selector* MessageFormatter::getSelector(MessageContext& context, const FunctionName& functionName, UErrorCode& status) const { + NULL_ON_ERROR(status); + U_ASSERT(isSelector(functionName)); + + const SelectorFactory* selectorFactory = lookupSelectorFactory(context, functionName, status); + NULL_ON_ERROR(status); + if (selectorFactory == nullptr) { + status = U_MEMORY_ALLOCATION_ERROR; + return nullptr; + } + // Create a specific instance of the selector + auto result = selectorFactory->createSelector(getLocale(), status); + NULL_ON_ERROR(status); + return result; + } + + // Returns an owned pointer + Formatter* MessageFormatter::getFormatter(const FunctionName& functionName, UErrorCode& status) const { + NULL_ON_ERROR(status); + + // Create the formatter + + // First, look up the formatter factory for this function + FormatterFactory* formatterFactory = lookupFormatterFactory(functionName, status); + NULL_ON_ERROR(status); + + U_ASSERT(formatterFactory != nullptr); + + // Create a specific instance of the formatter + Formatter* formatter = formatterFactory->createFormatter(locale, status); + NULL_ON_ERROR(status); + if (formatter == nullptr) { + status = U_MEMORY_ALLOCATION_ERROR; + return nullptr; + } + return formatter; + } + + bool MessageFormatter::getDefaultFormatterNameByType(const UnicodeString& type, FunctionName& name) const { + U_ASSERT(hasCustomMFFunctionRegistry()); + const MFFunctionRegistry& reg = getCustomMFFunctionRegistry(); + return reg.getDefaultFormatterNameByType(type, name); + } + + // --------------------------------------------------- + // Function registry + + bool MessageFormatter::isBuiltInSelector(const FunctionName& functionName) const { + return standardMFFunctionRegistry.hasSelector(functionName); + } + + bool MessageFormatter::isBuiltInFormatter(const FunctionName& functionName) const { + return standardMFFunctionRegistry.hasFormatter(functionName); + } + + // https://github.com/unicode-org/message-format-wg/issues/409 + // Unknown function = unknown function error + // Formatter used as selector = selector error + // Selector used as formatter = formatting error + const SelectorFactory* MessageFormatter::lookupSelectorFactory(MessageContext& context, const FunctionName& functionName, UErrorCode& status) const { + DynamicErrors& err = context.getErrors(); + + if (isBuiltInSelector(functionName)) { + return standardMFFunctionRegistry.getSelector(functionName); + } + if (isBuiltInFormatter(functionName)) { + err.setSelectorError(functionName, status); + return nullptr; + } + if (hasCustomMFFunctionRegistry()) { + const MFFunctionRegistry& customMFFunctionRegistry = getCustomMFFunctionRegistry(); + const SelectorFactory* selectorFactory = customMFFunctionRegistry.getSelector(functionName); + if (selectorFactory != nullptr) { + return selectorFactory; + } + if (customMFFunctionRegistry.getFormatter(functionName) != nullptr) { + err.setSelectorError(functionName, status); + return nullptr; + } + } + // Either there is no custom function registry and the function + // isn't built-in, or the function doesn't exist in either the built-in + // or custom registry. + // Unknown function error + err.setUnknownFunction(functionName, status); + return nullptr; + } + + FormatterFactory* MessageFormatter::lookupFormatterFactory(const FunctionName& functionName, + UErrorCode& status) const { + NULL_ON_ERROR(status); + + if (isBuiltInFormatter(functionName)) { + return standardMFFunctionRegistry.getFormatter(functionName); + } + if (isBuiltInSelector(functionName)) { + status = U_MF_FORMATTING_ERROR; + return nullptr; + } + if (hasCustomMFFunctionRegistry()) { + const MFFunctionRegistry& customMFFunctionRegistry = getCustomMFFunctionRegistry(); + FormatterFactory* formatterFactory = customMFFunctionRegistry.getFormatter(functionName); + if (formatterFactory != nullptr) { + return formatterFactory; + } + if (customMFFunctionRegistry.getSelector(functionName) != nullptr) { + status = U_MF_FORMATTING_ERROR; + return nullptr; + } + } + // Either there is no custom function registry and the function + // isn't built-in, or the function doesn't exist in either the built-in + // or custom registry. + // Unknown function error + status = U_MF_UNKNOWN_FUNCTION_ERROR; + return nullptr; + } + + bool MessageFormatter::isCustomFormatter(const FunctionName& fn) const { + return hasCustomMFFunctionRegistry() && getCustomMFFunctionRegistry().getFormatter(fn) != nullptr; + } + + + bool MessageFormatter::isCustomSelector(const FunctionName& fn) const { + return hasCustomMFFunctionRegistry() && getCustomMFFunctionRegistry().getSelector(fn) != nullptr; + } + +} // namespace message2 + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_MF2 */ + +#endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/contrib/libs/icu/i18n/messageformat2_function_registry.cpp b/contrib/libs/icu/i18n/messageformat2_function_registry.cpp new file mode 100644 index 0000000000..18401d4844 --- /dev/null +++ b/contrib/libs/icu/i18n/messageformat2_function_registry.cpp @@ -0,0 +1,1186 @@ +// © 2024 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#if !UCONFIG_NO_MF2 + +#include "unicode/dtptngen.h" +#include "unicode/messageformat2_data_model_names.h" +#include "unicode/messageformat2_function_registry.h" +#include "unicode/smpdtfmt.h" +#include "messageformat2_allocation.h" +#include "messageformat2_function_registry_internal.h" +#include "messageformat2_macros.h" +#include "hash.h" +#include "number_types.h" +#include "uvector.h" // U_ASSERT + +#include <inttypes.h> +#include <math.h> + +U_NAMESPACE_BEGIN + +namespace message2 { + +// Function registry implementation + +Formatter::~Formatter() {} +Selector::~Selector() {} +FormatterFactory::~FormatterFactory() {} +SelectorFactory::~SelectorFactory() {} + +MFFunctionRegistry MFFunctionRegistry::Builder::build() { + U_ASSERT(formatters != nullptr && selectors != nullptr && formattersByType != nullptr); + MFFunctionRegistry result = MFFunctionRegistry(formatters, selectors, formattersByType); + formatters = nullptr; + selectors = nullptr; + formattersByType = nullptr; + return result; +} + +MFFunctionRegistry::Builder& MFFunctionRegistry::Builder::adoptSelector(const FunctionName& selectorName, SelectorFactory* selectorFactory, UErrorCode& errorCode) { + if (U_SUCCESS(errorCode)) { + U_ASSERT(selectors != nullptr); + selectors->put(selectorName, selectorFactory, errorCode); + } + return *this; +} + +MFFunctionRegistry::Builder& MFFunctionRegistry::Builder::adoptFormatter(const FunctionName& formatterName, FormatterFactory* formatterFactory, UErrorCode& errorCode) { + if (U_SUCCESS(errorCode)) { + U_ASSERT(formatters != nullptr); + formatters->put(formatterName, formatterFactory, errorCode); + } + return *this; +} + +MFFunctionRegistry::Builder& MFFunctionRegistry::Builder::setDefaultFormatterNameByType(const UnicodeString& type, const FunctionName& functionName, UErrorCode& errorCode) { + if (U_SUCCESS(errorCode)) { + U_ASSERT(formattersByType != nullptr); + FunctionName* f = create<FunctionName>(FunctionName(functionName), errorCode); + formattersByType->put(type, f, errorCode); + } + return *this; +} + +MFFunctionRegistry::Builder::Builder(UErrorCode& errorCode) { + CHECK_ERROR(errorCode); + + formatters = new Hashtable(); + selectors = new Hashtable(); + formattersByType = new Hashtable(); + if (!(formatters != nullptr && selectors != nullptr && formattersByType != nullptr)) { + errorCode = U_MEMORY_ALLOCATION_ERROR; + } + formatters->setValueDeleter(uprv_deleteUObject); + selectors->setValueDeleter(uprv_deleteUObject); + formattersByType->setValueDeleter(uprv_deleteUObject); +} + +MFFunctionRegistry::Builder::~Builder() { + if (formatters != nullptr) { + delete formatters; + } + if (selectors != nullptr) { + delete selectors; + } + if (formattersByType != nullptr) { + delete formattersByType; + } +} + +// Returns non-owned pointer. Returns pointer rather than reference because it can fail. +// Returns non-const because FormatterFactory is mutable. +// TODO: This is unsafe because of the cached-formatters map +// (the caller could delete the resulting pointer) +FormatterFactory* MFFunctionRegistry::getFormatter(const FunctionName& formatterName) const { + U_ASSERT(formatters != nullptr); + return static_cast<FormatterFactory*>(formatters->get(formatterName)); +} + +UBool MFFunctionRegistry::getDefaultFormatterNameByType(const UnicodeString& type, FunctionName& name) const { + U_ASSERT(formatters != nullptr); + const FunctionName* f = static_cast<FunctionName*>(formattersByType->get(type)); + if (f != nullptr) { + name = *f; + return true; + } + return false; +} + +const SelectorFactory* MFFunctionRegistry::getSelector(const FunctionName& selectorName) const { + U_ASSERT(selectors != nullptr); + return static_cast<const SelectorFactory*>(selectors->get(selectorName)); +} + +bool MFFunctionRegistry::hasFormatter(const FunctionName& f) const { + return getFormatter(f) != nullptr; +} + +bool MFFunctionRegistry::hasSelector(const FunctionName& s) const { + return getSelector(s) != nullptr; +} + +void MFFunctionRegistry::checkFormatter(const char* s) const { +#if U_DEBUG + U_ASSERT(hasFormatter(FunctionName(UnicodeString(s)))); +#else + (void) s; +#endif +} + +void MFFunctionRegistry::checkSelector(const char* s) const { +#if U_DEBUG + U_ASSERT(hasSelector(FunctionName(UnicodeString(s)))); +#else + (void) s; +#endif +} + +// Debugging +void MFFunctionRegistry::checkStandard() const { + checkFormatter("datetime"); + checkFormatter("date"); + checkFormatter("time"); + checkFormatter("number"); + checkFormatter("integer"); + checkSelector("number"); + checkSelector("integer"); + checkSelector("string"); +} + +// Formatter/selector helpers + +// Converts `s` to a double, indicating failure via `errorCode` +static void strToDouble(const UnicodeString& s, double& result, UErrorCode& errorCode) { + CHECK_ERROR(errorCode); + + // Using en-US locale because it happens to correspond to the spec: + // https://github.com/unicode-org/message-format-wg/blob/main/spec/registry.md#number-operands + // Ideally, this should re-use the code for parsing number literals (Parser::parseUnquotedLiteral()) + // It's hard to reuse the same code because of how parse errors work. + // TODO: Refactor + LocalPointer<NumberFormat> numberFormat(NumberFormat::createInstance(Locale("en-US"), errorCode)); + CHECK_ERROR(errorCode); + icu::Formattable asNumber; + numberFormat->parse(s, asNumber, errorCode); + CHECK_ERROR(errorCode); + result = asNumber.getDouble(errorCode); +} + +static double tryStringAsNumber(const Locale& locale, const Formattable& val, UErrorCode& errorCode) { + // Check for a string option, try to parse it as a number if present + UnicodeString tempString = val.getString(errorCode); + LocalPointer<NumberFormat> numberFormat(NumberFormat::createInstance(locale, errorCode)); + if (U_SUCCESS(errorCode)) { + icu::Formattable asNumber; + numberFormat->parse(tempString, asNumber, errorCode); + if (U_SUCCESS(errorCode)) { + return asNumber.getDouble(errorCode); + } + } + return 0; +} + +static int64_t getInt64Value(const Locale& locale, const Formattable& value, UErrorCode& errorCode) { + if (U_SUCCESS(errorCode)) { + if (!value.isNumeric()) { + double doubleResult = tryStringAsNumber(locale, value, errorCode); + if (U_SUCCESS(errorCode)) { + return static_cast<int64_t>(doubleResult); + } + } + else { + int64_t result = value.getInt64(errorCode); + if (U_SUCCESS(errorCode)) { + return result; + } + } + } + // Option was numeric but couldn't be converted to int64_t -- could be overflow + return 0; +} + +// Adopts its arguments +MFFunctionRegistry::MFFunctionRegistry(FormatterMap* f, SelectorMap* s, Hashtable* byType) : formatters(f), selectors(s), formattersByType(byType) { + U_ASSERT(f != nullptr && s != nullptr && byType != nullptr); +} + +MFFunctionRegistry& MFFunctionRegistry::operator=(MFFunctionRegistry&& other) noexcept { + cleanup(); + + formatters = other.formatters; + selectors = other.selectors; + formattersByType = other.formattersByType; + other.formatters = nullptr; + other.selectors = nullptr; + other.formattersByType = nullptr; + + return *this; +} + +void MFFunctionRegistry::cleanup() noexcept { + if (formatters != nullptr) { + delete formatters; + } + if (selectors != nullptr) { + delete selectors; + } + if (formattersByType != nullptr) { + delete formattersByType; + } +} + + +MFFunctionRegistry::~MFFunctionRegistry() { + cleanup(); +} + +// Specific formatter implementations + +// --------- Number + +/* static */ number::LocalizedNumberFormatter StandardFunctions::formatterForOptions(const Number& number, + const FunctionOptions& opts, + UErrorCode& status) { + number::UnlocalizedNumberFormatter nf; + + using namespace number; + + if (U_SUCCESS(status)) { + Formattable opt; + nf = NumberFormatter::with(); + bool isInteger = number.isInteger; + + if (isInteger) { + nf = nf.precision(Precision::integer()); + } + + // Notation options + if (!isInteger) { + // These options only apply to `:number` + + // Default notation is simple + Notation notation = Notation::simple(); + UnicodeString notationOpt = opts.getStringFunctionOption(UnicodeString("notation")); + if (notationOpt == UnicodeString("scientific")) { + notation = Notation::scientific(); + } else if (notationOpt == UnicodeString("engineering")) { + notation = Notation::engineering(); + } else if (notationOpt == UnicodeString("compact")) { + UnicodeString displayOpt = opts.getStringFunctionOption(UnicodeString("compactDisplay")); + if (displayOpt == UnicodeString("long")) { + notation = Notation::compactLong(); + } else { + // Default is short + notation = Notation::compactShort(); + } + } else { + // Already set to default + } + nf = nf.notation(notation); + } + + // Style options -- specific to `:number` + if (!isInteger) { + if (number.usePercent(opts)) { + nf = nf.unit(NoUnit::percent()); + } + } + + int32_t maxSignificantDigits = number.maximumSignificantDigits(opts); + if (!isInteger) { + int32_t minFractionDigits = number.minimumFractionDigits(opts); + int32_t maxFractionDigits = number.maximumFractionDigits(opts); + int32_t minSignificantDigits = number.minimumSignificantDigits(opts); + Precision p = Precision::minMaxFraction(minFractionDigits, maxFractionDigits); + if (minSignificantDigits > 0) { + p = p.minSignificantDigits(minSignificantDigits); + } + if (maxSignificantDigits > 0) { + p = p.maxSignificantDigits(maxSignificantDigits); + } + nf = nf.precision(p); + } else { + // maxSignificantDigits applies to `:integer`, but the other precision options don't + Precision p = Precision::integer(); + if (maxSignificantDigits > 0) { + p = p.maxSignificantDigits(maxSignificantDigits); + } + nf = nf.precision(p); + } + + // All other options apply to both `:number` and `:integer` + int32_t minIntegerDigits = number.minimumIntegerDigits(opts); + nf = nf.integerWidth(IntegerWidth::zeroFillTo(minIntegerDigits)); + + // signDisplay + UnicodeString sd = opts.getStringFunctionOption(UnicodeString("signDisplay")); + UNumberSignDisplay signDisplay; + if (sd == UnicodeString("always")) { + signDisplay = UNumberSignDisplay::UNUM_SIGN_ALWAYS; + } else if (sd == UnicodeString("exceptZero")) { + signDisplay = UNumberSignDisplay::UNUM_SIGN_EXCEPT_ZERO; + } else if (sd == UnicodeString("negative")) { + signDisplay = UNumberSignDisplay::UNUM_SIGN_NEGATIVE; + } else if (sd == UnicodeString("never")) { + signDisplay = UNumberSignDisplay::UNUM_SIGN_NEVER; + } else { + signDisplay = UNumberSignDisplay::UNUM_SIGN_AUTO; + } + nf = nf.sign(signDisplay); + + // useGrouping + UnicodeString ug = opts.getStringFunctionOption(UnicodeString("useGrouping")); + UNumberGroupingStrategy grp; + if (ug == UnicodeString("always")) { + grp = UNumberGroupingStrategy::UNUM_GROUPING_ON_ALIGNED; + } else if (ug == UnicodeString("never")) { + grp = UNumberGroupingStrategy::UNUM_GROUPING_OFF; + } else if (ug == UnicodeString("min2")) { + grp = UNumberGroupingStrategy::UNUM_GROUPING_MIN2; + } else { + // Default is "auto" + grp = UNumberGroupingStrategy::UNUM_GROUPING_AUTO; + } + nf = nf.grouping(grp); + } + return LocalizedNumberFormatter(nf.locale(number.locale)); +} + +Formatter* StandardFunctions::NumberFactory::createFormatter(const Locale& locale, UErrorCode& errorCode) { + NULL_ON_ERROR(errorCode); + + Formatter* result = new Number(locale); + if (result == nullptr) { + errorCode = U_MEMORY_ALLOCATION_ERROR; + } + return result; +} + +Formatter* StandardFunctions::IntegerFactory::createFormatter(const Locale& locale, UErrorCode& errorCode) { + NULL_ON_ERROR(errorCode); + + Formatter* result = new Number(Number::integer(locale)); + if (result == nullptr) { + errorCode = U_MEMORY_ALLOCATION_ERROR; + } + return result; +} + +StandardFunctions::IntegerFactory::~IntegerFactory() {} + +static FormattedPlaceholder notANumber(const FormattedPlaceholder& input) { + return FormattedPlaceholder(input, FormattedValue(UnicodeString("NaN"))); +} + +static FormattedPlaceholder stringAsNumber(const number::LocalizedNumberFormatter& nf, const FormattedPlaceholder& input, UErrorCode& errorCode) { + if (U_FAILURE(errorCode)) { + return {}; + } + + double numberValue; + // Copying string to avoid GCC dangling-reference warning + // (although the reference is safe) + UnicodeString inputStr = input.asFormattable().getString(errorCode); + // Precondition: `input`'s source Formattable has type string + if (U_FAILURE(errorCode)) { + return {}; + } + UErrorCode localErrorCode = U_ZERO_ERROR; + strToDouble(inputStr, numberValue, localErrorCode); + if (U_FAILURE(localErrorCode)) { + errorCode = U_MF_OPERAND_MISMATCH_ERROR; + return notANumber(input); + } + UErrorCode savedStatus = errorCode; + number::FormattedNumber result = nf.formatDouble(numberValue, errorCode); + // Ignore U_USING_DEFAULT_WARNING + if (errorCode == U_USING_DEFAULT_WARNING) { + errorCode = savedStatus; + } + return FormattedPlaceholder(input, FormattedValue(std::move(result))); +} + +int32_t StandardFunctions::Number::maximumFractionDigits(const FunctionOptions& opts) const { + Formattable opt; + + if (isInteger) { + return 0; + } + + if (opts.getFunctionOption(UnicodeString("maximumFractionDigits"), opt)) { + UErrorCode localErrorCode = U_ZERO_ERROR; + int64_t val = getInt64Value(locale, opt, localErrorCode); + if (U_SUCCESS(localErrorCode)) { + return static_cast<int32_t>(val); + } + } + return number::impl::kMaxIntFracSig; +} + +int32_t StandardFunctions::Number::minimumFractionDigits(const FunctionOptions& opts) const { + Formattable opt; + + if (!isInteger) { + if (opts.getFunctionOption(UnicodeString("minimumFractionDigits"), opt)) { + UErrorCode localErrorCode = U_ZERO_ERROR; + int64_t val = getInt64Value(locale, opt, localErrorCode); + if (U_SUCCESS(localErrorCode)) { + return static_cast<int32_t>(val); + } + } + } + return 0; +} + +int32_t StandardFunctions::Number::minimumIntegerDigits(const FunctionOptions& opts) const { + Formattable opt; + + if (opts.getFunctionOption(UnicodeString("minimumIntegerDigits"), opt)) { + UErrorCode localErrorCode = U_ZERO_ERROR; + int64_t val = getInt64Value(locale, opt, localErrorCode); + if (U_SUCCESS(localErrorCode)) { + return static_cast<int32_t>(val); + } + } + return 0; +} + +int32_t StandardFunctions::Number::minimumSignificantDigits(const FunctionOptions& opts) const { + Formattable opt; + + if (!isInteger) { + if (opts.getFunctionOption(UnicodeString("minimumSignificantDigits"), opt)) { + UErrorCode localErrorCode = U_ZERO_ERROR; + int64_t val = getInt64Value(locale, opt, localErrorCode); + if (U_SUCCESS(localErrorCode)) { + return static_cast<int32_t>(val); + } + } + } + // Returning 0 indicates that the option wasn't provided or was a non-integer. + // The caller needs to check for that case, since passing 0 to Precision::minSignificantDigits() + // is an error. + return 0; +} + +int32_t StandardFunctions::Number::maximumSignificantDigits(const FunctionOptions& opts) const { + Formattable opt; + + if (opts.getFunctionOption(UnicodeString("maximumSignificantDigits"), opt)) { + UErrorCode localErrorCode = U_ZERO_ERROR; + int64_t val = getInt64Value(locale, opt, localErrorCode); + if (U_SUCCESS(localErrorCode)) { + return static_cast<int32_t>(val); + } + } + // Returning 0 indicates that the option wasn't provided or was a non-integer. + // The caller needs to check for that case, since passing 0 to Precision::maxSignificantDigits() + // is an error. + return 0; // Not a valid value for Precision; has to be checked +} + +bool StandardFunctions::Number::usePercent(const FunctionOptions& opts) const { + Formattable opt; + if (isInteger + || !opts.getFunctionOption(UnicodeString("style"), opt) + || opt.getType() != UFMT_STRING) { + return false; + } + UErrorCode localErrorCode = U_ZERO_ERROR; + const UnicodeString& style = opt.getString(localErrorCode); + U_ASSERT(U_SUCCESS(localErrorCode)); + return (style == UnicodeString("percent")); +} + +/* static */ StandardFunctions::Number StandardFunctions::Number::integer(const Locale& loc) { + return StandardFunctions::Number(loc, true); +} + +FormattedPlaceholder StandardFunctions::Number::format(FormattedPlaceholder&& arg, FunctionOptions&& opts, UErrorCode& errorCode) const { + if (U_FAILURE(errorCode)) { + return {}; + } + + // No argument => return "NaN" + if (!arg.canFormat()) { + errorCode = U_MF_OPERAND_MISMATCH_ERROR; + return notANumber(arg); + } + + number::LocalizedNumberFormatter realFormatter; + realFormatter = formatterForOptions(*this, opts, errorCode); + + number::FormattedNumber numberResult; + if (U_SUCCESS(errorCode)) { + // Already checked that contents can be formatted + const Formattable& toFormat = arg.asFormattable(); + switch (toFormat.getType()) { + case UFMT_DOUBLE: { + double d = toFormat.getDouble(errorCode); + U_ASSERT(U_SUCCESS(errorCode)); + numberResult = realFormatter.formatDouble(d, errorCode); + break; + } + case UFMT_LONG: { + int32_t l = toFormat.getLong(errorCode); + U_ASSERT(U_SUCCESS(errorCode)); + numberResult = realFormatter.formatInt(l, errorCode); + break; + } + case UFMT_INT64: { + int64_t i = toFormat.getInt64(errorCode); + U_ASSERT(U_SUCCESS(errorCode)); + numberResult = realFormatter.formatInt(i, errorCode); + break; + } + case UFMT_STRING: { + // Try to parse the string as a number + return stringAsNumber(realFormatter, arg, errorCode); + } + default: { + // Other types can't be parsed as a number + errorCode = U_MF_OPERAND_MISMATCH_ERROR; + return notANumber(arg); + } + } + } + + return FormattedPlaceholder(arg, FormattedValue(std::move(numberResult))); +} + +StandardFunctions::Number::~Number() {} +StandardFunctions::NumberFactory::~NumberFactory() {} + +// --------- PluralFactory + + +StandardFunctions::Plural::PluralType StandardFunctions::Plural::pluralType(const FunctionOptions& opts) const { + Formattable opt; + + if (opts.getFunctionOption(UnicodeString("select"), opt)) { + UErrorCode localErrorCode = U_ZERO_ERROR; + UnicodeString val = opt.getString(localErrorCode); + if (U_SUCCESS(localErrorCode)) { + if (val == UnicodeString("ordinal")) { + return PluralType::PLURAL_ORDINAL; + } + if (val == UnicodeString("exact")) { + return PluralType::PLURAL_EXACT; + } + } + } + return PluralType::PLURAL_CARDINAL; +} + +Selector* StandardFunctions::PluralFactory::createSelector(const Locale& locale, UErrorCode& errorCode) const { + NULL_ON_ERROR(errorCode); + + Selector* result; + if (isInteger) { + result = new Plural(Plural::integer(locale)); + } else { + result = new Plural(locale); + } + if (result == nullptr) { + errorCode = U_MEMORY_ALLOCATION_ERROR; + return nullptr; + } + return result; +} + +static double tryAsString(const UnicodeString& s, UErrorCode& errorCode) { + if (U_FAILURE(errorCode)) { + return 0; + } + // Try parsing the inputString as a double + double valToCheck; + strToDouble(s, valToCheck, errorCode); + return valToCheck; +} + +static double tryWithFormattable(const Formattable& value, UErrorCode& errorCode) { + if (U_FAILURE(errorCode)) { + return 0; + } + double valToCheck; + switch (value.getType()) { + case UFMT_DOUBLE: { + valToCheck = value.getDouble(errorCode); + break; + } + case UFMT_LONG: { + valToCheck = (double) value.getLong(errorCode); + break; + } + case UFMT_INT64: { + valToCheck = (double) value.getInt64(errorCode); + break; + } + case UFMT_STRING: { + const UnicodeString& s = value.getString(errorCode); + U_ASSERT(U_SUCCESS(errorCode)); + return tryAsString(s, errorCode); + } + default: { + errorCode = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + } + U_ASSERT(U_SUCCESS(errorCode)); + return valToCheck; +} + +static UnicodeString toJSONString(double d) { + // TODO :( + char buffer[512]; + // "Only integer matching is required in the Technical Preview." + snprintf(buffer, 512, "%" PRId64, static_cast<int64_t>(d)); + return UnicodeString(buffer); +} + +void StandardFunctions::Plural::selectKey(FormattedPlaceholder&& toFormat, + FunctionOptions&& opts, + const UnicodeString* keys, + int32_t keysLen, + UnicodeString* prefs, + int32_t& prefsLen, + UErrorCode& errorCode) const { + CHECK_ERROR(errorCode); + + // No argument => return "NaN" + if (!toFormat.canFormat()) { + errorCode = U_MF_SELECTOR_ERROR; + return; + } + + // Only doubles and integers can match + double valToCheck; + + bool isFormattedString = toFormat.isEvaluated() && toFormat.output().isString(); + bool isFormattedNumber = toFormat.isEvaluated() && toFormat.output().isNumber(); + + if (isFormattedString) { + // Formatted string: try parsing it as a number + valToCheck = tryAsString(toFormat.output().getString(), errorCode); + } else { + // Already checked that contents can be formatted + valToCheck = tryWithFormattable(toFormat.asFormattable(), errorCode); + } + + if (U_FAILURE(errorCode)) { + // Non-number => selector error + errorCode = U_MF_SELECTOR_ERROR; + return; + } + // TODO: This needs to be checked against https://github.com/unicode-org/message-format-wg/blob/main/spec/registry.md#number-selection + // Determine `exact`, per step 1 under "Number Selection" + UnicodeString exact = toJSONString(valToCheck); + + // Generate the matches + // ----------------------- + + prefsLen = 0; + + // First, check for an exact match + double keyAsDouble = 0; + for (int32_t i = 0; i < keysLen; i++) { + // Try parsing the key as a double + UErrorCode localErrorCode = U_ZERO_ERROR; + strToDouble(keys[i], keyAsDouble, localErrorCode); + if (U_SUCCESS(localErrorCode)) { + if (exact == keys[i]) { + prefs[prefsLen] = keys[i]; + prefsLen++; + break; + } + } + } + + PluralType type = pluralType(opts); + // Return immediately if exact matching was requested + if (prefsLen == keysLen || type == PluralType::PLURAL_EXACT) { + return; + } + + UPluralType t = type == PluralType::PLURAL_ORDINAL ? UPLURAL_TYPE_ORDINAL : UPLURAL_TYPE_CARDINAL; + // Look up plural rules by locale and type + LocalPointer<PluralRules> rules(PluralRules::forLocale(locale, t, errorCode)); + CHECK_ERROR(errorCode); + + + // Check for a match based on the plural category + UnicodeString match; + if (isFormattedNumber) { + match = rules->select(toFormat.output().getNumber(), errorCode); + } else { + if (isInteger) { + match = rules->select(static_cast<int32_t>(trunc(valToCheck))); + } else { + match = rules->select(valToCheck); + } + } + CHECK_ERROR(errorCode); + + for (int32_t i = 0; i < keysLen; i ++) { + if (prefsLen >= keysLen) { + break; + } + if (match == keys[i]) { + prefs[prefsLen] = keys[i]; + prefsLen++; + } + } +} + +StandardFunctions::Plural::~Plural() {} +StandardFunctions::PluralFactory::~PluralFactory() {} + +// --------- DateTimeFactory + +/* static */ UnicodeString StandardFunctions::getStringOption(const FunctionOptions& opts, + const UnicodeString& optionName, + UErrorCode& errorCode) { + if (U_SUCCESS(errorCode)) { + Formattable opt; + if (opts.getFunctionOption(optionName, opt)) { + return opt.getString(errorCode); // In case it's not a string, error code will be set + } else { + errorCode = U_ILLEGAL_ARGUMENT_ERROR; + } + } + // Default is empty string + return {}; +} + +// Date/time options only +static UnicodeString defaultForOption(const UnicodeString& optionName) { + if (optionName == UnicodeString("dateStyle") + || optionName == UnicodeString("timeStyle") + || optionName == UnicodeString("style")) { + return UnicodeString("short"); + } + return {}; // Empty string is default +} + +// TODO +// Only DateTime currently uses the function options stored in the placeholder. +// It also doesn't use them very consistently (it looks at the previous set of options, +// and others aren't preserved). This needs to be generalized, +// but that depends on https://github.com/unicode-org/message-format-wg/issues/515 +// Finally, the option value is assumed to be a string, +// which works for datetime options but not necessarily in general. +UnicodeString StandardFunctions::DateTime::getFunctionOption(const FormattedPlaceholder& toFormat, + const FunctionOptions& opts, + const UnicodeString& optionName) const { + // Options passed to the current function invocation take priority + Formattable opt; + UnicodeString s; + UErrorCode localErrorCode = U_ZERO_ERROR; + s = getStringOption(opts, optionName, localErrorCode); + if (U_SUCCESS(localErrorCode)) { + return s; + } + // Next try the set of options used to construct `toFormat` + localErrorCode = U_ZERO_ERROR; + s = getStringOption(toFormat.options(), optionName, localErrorCode); + if (U_SUCCESS(localErrorCode)) { + return s; + } + // Finally, use default + return defaultForOption(optionName); +} + +// Used for options that don't have defaults +UnicodeString StandardFunctions::DateTime::getFunctionOption(const FormattedPlaceholder& toFormat, + const FunctionOptions& opts, + const UnicodeString& optionName, + UErrorCode& errorCode) const { + if (U_SUCCESS(errorCode)) { + // Options passed to the current function invocation take priority + Formattable opt; + UnicodeString s; + UErrorCode localErrorCode = U_ZERO_ERROR; + s = getStringOption(opts, optionName, localErrorCode); + if (U_SUCCESS(localErrorCode)) { + return s; + } + // Next try the set of options used to construct `toFormat` + localErrorCode = U_ZERO_ERROR; + s = getStringOption(toFormat.options(), optionName, localErrorCode); + if (U_SUCCESS(localErrorCode)) { + return s; + } + errorCode = U_ILLEGAL_ARGUMENT_ERROR; + } + return {}; +} + +static DateFormat::EStyle stringToStyle(UnicodeString option, UErrorCode& errorCode) { + if (U_SUCCESS(errorCode)) { + UnicodeString upper = option.toUpper(); + if (upper == UnicodeString("FULL")) { + return DateFormat::EStyle::kFull; + } + if (upper == UnicodeString("LONG")) { + return DateFormat::EStyle::kLong; + } + if (upper == UnicodeString("MEDIUM")) { + return DateFormat::EStyle::kMedium; + } + if (upper == UnicodeString("SHORT")) { + return DateFormat::EStyle::kShort; + } + if (upper.isEmpty() || upper == UnicodeString("DEFAULT")) { + return DateFormat::EStyle::kDefault; + } + errorCode = U_ILLEGAL_ARGUMENT_ERROR; + } + return DateFormat::EStyle::kNone; +} + +/* static */ StandardFunctions::DateTimeFactory* StandardFunctions::DateTimeFactory::dateTime(UErrorCode& errorCode) { + NULL_ON_ERROR(errorCode); + + DateTimeFactory* result = new StandardFunctions::DateTimeFactory(DateTimeType::DateTime); + if (result == nullptr) { + errorCode = U_MEMORY_ALLOCATION_ERROR; + } + return result; +} + +/* static */ StandardFunctions::DateTimeFactory* StandardFunctions::DateTimeFactory::date(UErrorCode& errorCode) { + NULL_ON_ERROR(errorCode); + + DateTimeFactory* result = new DateTimeFactory(DateTimeType::Date); + if (result == nullptr) { + errorCode = U_MEMORY_ALLOCATION_ERROR; + } + return result; +} + +/* static */ StandardFunctions::DateTimeFactory* StandardFunctions::DateTimeFactory::time(UErrorCode& errorCode) { + NULL_ON_ERROR(errorCode); + + DateTimeFactory* result = new DateTimeFactory(DateTimeType::Time); + if (result == nullptr) { + errorCode = U_MEMORY_ALLOCATION_ERROR; + } + return result; +} + +Formatter* StandardFunctions::DateTimeFactory::createFormatter(const Locale& locale, UErrorCode& errorCode) { + NULL_ON_ERROR(errorCode); + + Formatter* result = new StandardFunctions::DateTime(locale, type); + if (result == nullptr) { + errorCode = U_MEMORY_ALLOCATION_ERROR; + } + return result; +} + +FormattedPlaceholder StandardFunctions::DateTime::format(FormattedPlaceholder&& toFormat, + FunctionOptions&& opts, + UErrorCode& errorCode) const { + if (U_FAILURE(errorCode)) { + return {}; + } + + // Argument must be present + if (!toFormat.canFormat()) { + errorCode = U_MF_OPERAND_MISMATCH_ERROR; + return std::move(toFormat); + } + + LocalPointer<DateFormat> df; + Formattable opt; + + DateFormat::EStyle dateStyle = DateFormat::kShort; + DateFormat::EStyle timeStyle = DateFormat::kShort; + + UnicodeString dateStyleName("dateStyle"); + UnicodeString timeStyleName("timeStyle"); + UnicodeString styleName("style"); + + bool hasDateStyleOption = opts.getFunctionOption(dateStyleName, opt); + bool hasTimeStyleOption = opts.getFunctionOption(timeStyleName, opt); + bool noOptions = opts.optionsCount() == 0; + + bool useStyle = (type == DateTimeFactory::DateTimeType::DateTime + && (hasDateStyleOption || hasTimeStyleOption + || noOptions)) + || (type != DateTimeFactory::DateTimeType::DateTime); + + bool useDate = type == DateTimeFactory::DateTimeType::Date + || (type == DateTimeFactory::DateTimeType::DateTime + && hasDateStyleOption); + bool useTime = type == DateTimeFactory::DateTimeType::Time + || (type == DateTimeFactory::DateTimeType::DateTime + && hasTimeStyleOption); + + if (useStyle) { + // Extract style options + if (type == DateTimeFactory::DateTimeType::DateTime) { + // Note that the options-getting has to be repeated across the three cases, + // since `:datetime` uses "dateStyle"/"timeStyle" and `:date` and `:time` + // use "style" + dateStyle = stringToStyle(getFunctionOption(toFormat, opts, dateStyleName), errorCode); + timeStyle = stringToStyle(getFunctionOption(toFormat, opts, timeStyleName), errorCode); + + if (useDate && !useTime) { + df.adoptInstead(DateFormat::createDateInstance(dateStyle, locale)); + } else if (useTime && !useDate) { + df.adoptInstead(DateFormat::createTimeInstance(timeStyle, locale)); + } else { + df.adoptInstead(DateFormat::createDateTimeInstance(dateStyle, timeStyle, locale)); + } + } else if (type == DateTimeFactory::DateTimeType::Date) { + dateStyle = stringToStyle(getFunctionOption(toFormat, opts, styleName), errorCode); + df.adoptInstead(DateFormat::createDateInstance(dateStyle, locale)); + } else { + // :time + timeStyle = stringToStyle(getFunctionOption(toFormat, opts, styleName), errorCode); + df.adoptInstead(DateFormat::createTimeInstance(timeStyle, locale)); + } + } else { + // Build up a skeleton based on the field options, then use that to + // create the date formatter + + UnicodeString skeleton; + #define ADD_PATTERN(s) skeleton += UnicodeString(s) + if (U_SUCCESS(errorCode)) { + // Year + UnicodeString year = getFunctionOption(toFormat, opts, UnicodeString("year"), errorCode); + if (U_FAILURE(errorCode)) { + errorCode = U_ZERO_ERROR; + } else { + useDate = true; + if (year == UnicodeString("2-digit")) { + ADD_PATTERN("YY"); + } else if (year == UnicodeString("numeric")) { + ADD_PATTERN("YYYY"); + } + } + // Month + UnicodeString month = getFunctionOption(toFormat, opts, UnicodeString("month"), errorCode); + if (U_FAILURE(errorCode)) { + errorCode = U_ZERO_ERROR; + } else { + useDate = true; + /* numeric, 2-digit, long, short, narrow */ + if (month == UnicodeString("long")) { + ADD_PATTERN("MMMM"); + } else if (month == UnicodeString("short")) { + ADD_PATTERN("MMM"); + } else if (month == UnicodeString("narrow")) { + ADD_PATTERN("MMMMM"); + } else if (month == UnicodeString("numeric")) { + ADD_PATTERN("M"); + } else if (month == UnicodeString("2-digit")) { + ADD_PATTERN("MM"); + } + } + // Weekday + UnicodeString weekday = getFunctionOption(toFormat, opts, UnicodeString("weekday"), errorCode); + if (U_FAILURE(errorCode)) { + errorCode = U_ZERO_ERROR; + } else { + useDate = true; + if (weekday == UnicodeString("long")) { + ADD_PATTERN("EEEE"); + } else if (weekday == UnicodeString("short")) { + ADD_PATTERN("EEEEE"); + } else if (weekday == UnicodeString("narrow")) { + ADD_PATTERN("EEEEE"); + } + } + // Day + UnicodeString day = getFunctionOption(toFormat, opts, UnicodeString("day"), errorCode); + if (U_FAILURE(errorCode)) { + errorCode = U_ZERO_ERROR; + } else { + useDate = true; + if (day == UnicodeString("numeric")) { + ADD_PATTERN("d"); + } else if (day == UnicodeString("2-digit")) { + ADD_PATTERN("dd"); + } + } + // Hour + UnicodeString hour = getFunctionOption(toFormat, opts, UnicodeString("hour"), errorCode); + if (U_FAILURE(errorCode)) { + errorCode = U_ZERO_ERROR; + } else { + useTime = true; + if (hour == UnicodeString("numeric")) { + ADD_PATTERN("h"); + } else if (hour == UnicodeString("2-digit")) { + ADD_PATTERN("hh"); + } + } + // Minute + UnicodeString minute = getFunctionOption(toFormat, opts, UnicodeString("minute"), errorCode); + if (U_FAILURE(errorCode)) { + errorCode = U_ZERO_ERROR; + } else { + useTime = true; + if (minute == UnicodeString("numeric")) { + ADD_PATTERN("m"); + } else if (minute == UnicodeString("2-digit")) { + ADD_PATTERN("mm"); + } + } + // Second + UnicodeString second = getFunctionOption(toFormat, opts, UnicodeString("second"), errorCode); + if (U_FAILURE(errorCode)) { + errorCode = U_ZERO_ERROR; + } else { + useTime = true; + if (second == UnicodeString("numeric")) { + ADD_PATTERN("s"); + } else if (second == UnicodeString("2-digit")) { + ADD_PATTERN("ss"); + } + } + } + /* + TODO + fractionalSecondDigits + hourCycle + timeZoneName + era + */ + df.adoptInstead(DateFormat::createInstanceForSkeleton(skeleton, errorCode)); + } + + if (U_FAILURE(errorCode)) { + return {}; + } + if (!df.isValid()) { + errorCode = U_MEMORY_ALLOCATION_ERROR; + return {}; + } + + UnicodeString result; + const Formattable& source = toFormat.asFormattable(); + switch (source.getType()) { + case UFMT_STRING: { + const UnicodeString& sourceStr = source.getString(errorCode); + U_ASSERT(U_SUCCESS(errorCode)); + // Pattern for ISO 8601 format - datetime + UnicodeString pattern("YYYY-MM-dd'T'HH:mm:ss"); + LocalPointer<DateFormat> dateParser(new SimpleDateFormat(pattern, errorCode)); + if (U_FAILURE(errorCode)) { + errorCode = U_MF_FORMATTING_ERROR; + } else { + // Parse the date + UDate d = dateParser->parse(sourceStr, errorCode); + if (U_FAILURE(errorCode)) { + // Pattern for ISO 8601 format - date + UnicodeString pattern("YYYY-MM-dd"); + errorCode = U_ZERO_ERROR; + dateParser.adoptInstead(new SimpleDateFormat(pattern, errorCode)); + if (U_FAILURE(errorCode)) { + errorCode = U_MF_FORMATTING_ERROR; + } else { + d = dateParser->parse(sourceStr, errorCode); + if (U_FAILURE(errorCode)) { + errorCode = U_MF_OPERAND_MISMATCH_ERROR; + } + } + } + // Use the parsed date as the source value + // in the returned FormattedPlaceholder; this is necessary + // so the date can be re-formatted + toFormat = FormattedPlaceholder(message2::Formattable::forDate(d), + toFormat.getFallback()); + df->format(d, result, 0, errorCode); + } + break; + } + case UFMT_DATE: { + df->format(source.asICUFormattable(errorCode), result, 0, errorCode); + if (U_FAILURE(errorCode)) { + if (errorCode == U_ILLEGAL_ARGUMENT_ERROR) { + errorCode = U_MF_OPERAND_MISMATCH_ERROR; + } + } + break; + } + // Any other cases are an error + default: { + errorCode = U_MF_OPERAND_MISMATCH_ERROR; + break; + } + } + if (U_FAILURE(errorCode)) { + return {}; + } + return FormattedPlaceholder(toFormat, std::move(opts), FormattedValue(std::move(result))); +} + +StandardFunctions::DateTimeFactory::~DateTimeFactory() {} +StandardFunctions::DateTime::~DateTime() {} + +// --------- TextFactory + +Selector* StandardFunctions::TextFactory::createSelector(const Locale& locale, UErrorCode& errorCode) const { + Selector* result = new TextSelector(locale); + if (result == nullptr) { + errorCode = U_MEMORY_ALLOCATION_ERROR; + return nullptr; + } + return result; +} + +void StandardFunctions::TextSelector::selectKey(FormattedPlaceholder&& toFormat, + FunctionOptions&& opts, + const UnicodeString* keys, + int32_t keysLen, + UnicodeString* prefs, + int32_t& prefsLen, + UErrorCode& errorCode) const { + // No options + (void) opts; + + CHECK_ERROR(errorCode); + + // Just compares the key and value as strings + + // Argument must be present + if (!toFormat.canFormat()) { + errorCode = U_MF_SELECTOR_ERROR; + return; + } + + prefsLen = 0; + + // Convert to string + const UnicodeString& formattedValue = toFormat.formatToString(locale, errorCode); + if (U_FAILURE(errorCode)) { + return; + } + + for (int32_t i = 0; i < keysLen; i++) { + if (keys[i] == formattedValue) { + prefs[0] = keys[i]; + prefsLen = 1; + break; + } + } +} + +StandardFunctions::TextFactory::~TextFactory() {} +StandardFunctions::TextSelector::~TextSelector() {} + +} // namespace message2 +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_MF2 */ + +#endif /* #if !UCONFIG_NO_FORMATTING */ + diff --git a/contrib/libs/icu/i18n/messageformat2_function_registry_internal.h b/contrib/libs/icu/i18n/messageformat2_function_registry_internal.h new file mode 100644 index 0000000000..b34cb9b014 --- /dev/null +++ b/contrib/libs/icu/i18n/messageformat2_function_registry_internal.h @@ -0,0 +1,233 @@ +// © 2024 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#ifndef U_HIDE_DEPRECATED_API + +#ifndef MESSAGEFORMAT2_FUNCTION_REGISTRY_INTERNAL_H +#define MESSAGEFORMAT2_FUNCTION_REGISTRY_INTERNAL_H + +#if U_SHOW_CPLUSPLUS_API + +#if !UCONFIG_NO_FORMATTING + +#if !UCONFIG_NO_MF2 + +#include "unicode/datefmt.h" +#include "unicode/messageformat2_function_registry.h" + +U_NAMESPACE_BEGIN + +namespace message2 { + + // Built-in functions + /* + The standard functions are :datetime, :date, :time, + :number, :integer, and :string, + per https://github.com/unicode-org/message-format-wg/blob/main/spec/registry.md + as of https://github.com/unicode-org/message-format-wg/releases/tag/LDML45-alpha + */ + class StandardFunctions { + friend class MessageFormatter; + + static UnicodeString getStringOption(const FunctionOptions& opts, + const UnicodeString& optionName, + UErrorCode& errorCode); + + class DateTime; + + class DateTimeFactory : public FormatterFactory { + public: + Formatter* createFormatter(const Locale& locale, UErrorCode& status) override; + static DateTimeFactory* date(UErrorCode&); + static DateTimeFactory* time(UErrorCode&); + static DateTimeFactory* dateTime(UErrorCode&); + DateTimeFactory() = delete; + virtual ~DateTimeFactory(); + + private: + friend class DateTime; + + typedef enum DateTimeType { + Date, + Time, + DateTime + } DateTimeType; + + DateTimeType type; + DateTimeFactory(DateTimeType t) : type(t) {} + }; + + class DateTime : public Formatter { + public: + FormattedPlaceholder format(FormattedPlaceholder&& toFormat, FunctionOptions&& options, UErrorCode& status) const override; + virtual ~DateTime(); + + private: + const Locale& locale; + const DateTimeFactory::DateTimeType type; + friend class DateTimeFactory; + DateTime(const Locale& l, DateTimeFactory::DateTimeType t) : locale(l), type(t) {} + const LocalPointer<icu::DateFormat> icuFormatter; + + /* + Looks up an option by name, first checking `opts`, then the cached options + in `toFormat` if applicable, and finally using a default + + Ignores any options with non-string values + */ + UnicodeString getFunctionOption(const FormattedPlaceholder& toFormat, + const FunctionOptions& opts, + const UnicodeString& optionName) const; + // Version for options that don't have defaults; sets the error + // code instead of returning a default value + UnicodeString getFunctionOption(const FormattedPlaceholder& toFormat, + const FunctionOptions& opts, + const UnicodeString& optionName, + UErrorCode& errorCode) const; + + }; + + // Note: IntegerFactory doesn't implement SelectorFactory; + // instead, an instance of PluralFactory is registered to the integer + // selector + // TODO + class IntegerFactory : public FormatterFactory { + public: + Formatter* createFormatter(const Locale& locale, UErrorCode& status) override; + virtual ~IntegerFactory(); + }; + + class NumberFactory : public FormatterFactory { + public: + Formatter* createFormatter(const Locale& locale, UErrorCode& status) override; + virtual ~NumberFactory(); + private: + friend class IntegerFactory; + static NumberFactory integer(const Locale& locale, UErrorCode& status); + }; + + class Number : public Formatter { + public: + FormattedPlaceholder format(FormattedPlaceholder&& toFormat, FunctionOptions&& options, UErrorCode& status) const override; + virtual ~Number(); + + private: + friend class NumberFactory; + friend class StandardFunctions; + + Number(const Locale& loc) : locale(loc), icuFormatter(number::NumberFormatter::withLocale(loc)) {} + Number(const Locale& loc, bool isInt) : locale(loc), isInteger(isInt), icuFormatter(number::NumberFormatter::withLocale(loc)) {} + static Number integer(const Locale& loc); + + // These options have their own accessor methods, since they have different default values. + int32_t maximumFractionDigits(const FunctionOptions& options) const; + int32_t minimumFractionDigits(const FunctionOptions& options) const; + int32_t minimumSignificantDigits(const FunctionOptions& options) const; + int32_t maximumSignificantDigits(const FunctionOptions& options) const; + int32_t minimumIntegerDigits(const FunctionOptions& options) const; + + bool usePercent(const FunctionOptions& options) const; + const Locale& locale; + const bool isInteger = false; + const number::LocalizedNumberFormatter icuFormatter; + }; + + static number::LocalizedNumberFormatter formatterForOptions(const Number& number, + const FunctionOptions& opts, + UErrorCode& status); + + class PluralFactory : public SelectorFactory { + public: + Selector* createSelector(const Locale& locale, UErrorCode& status) const override; + virtual ~PluralFactory(); + + private: + friend class IntegerFactory; + friend class MessageFormatter; + + PluralFactory() {} + PluralFactory(bool isInt) : isInteger(isInt) {} + static PluralFactory integer() { return PluralFactory(true);} + const bool isInteger = false; + }; + + class Plural : public Selector { + public: + void selectKey(FormattedPlaceholder&& val, + FunctionOptions&& options, + const UnicodeString* keys, + int32_t keysLen, + UnicodeString* prefs, + int32_t& prefsLen, + UErrorCode& status) const override; + virtual ~Plural(); + + private: + friend class IntegerFactory; + friend class PluralFactory; + + // Can't use UPluralType for this since we want to include + // exact matching as an option + typedef enum PluralType { + PLURAL_ORDINAL, + PLURAL_CARDINAL, + PLURAL_EXACT + } PluralType; + Plural(const Locale& loc) : locale(loc) {} + Plural(const Locale& loc, bool isInt) : locale(loc), isInteger(isInt) {} + static Plural integer(const Locale& loc) { return Plural(loc, true); } + PluralType pluralType(const FunctionOptions& opts) const; + const Locale& locale; + const bool isInteger = false; + }; + + class TextFactory : public SelectorFactory { + public: + Selector* createSelector(const Locale& locale, UErrorCode& status) const override; + virtual ~TextFactory(); + }; + + class TextSelector : public Selector { + public: + void selectKey(FormattedPlaceholder&& val, + FunctionOptions&& options, + const UnicodeString* keys, + int32_t keysLen, + UnicodeString* prefs, + int32_t& prefsLen, + UErrorCode& status) const override; + virtual ~TextSelector(); + + private: + friend class TextFactory; + + // Formatting `value` to a string might require the locale + const Locale& locale; + + TextSelector(const Locale& l) : locale(l) {} + }; + }; + + extern void formatDateWithDefaults(const Locale& locale, UDate date, UnicodeString&, UErrorCode& errorCode); + extern number::FormattedNumber formatNumberWithDefaults(const Locale& locale, double toFormat, UErrorCode& errorCode); + extern number::FormattedNumber formatNumberWithDefaults(const Locale& locale, int32_t toFormat, UErrorCode& errorCode); + extern number::FormattedNumber formatNumberWithDefaults(const Locale& locale, int64_t toFormat, UErrorCode& errorCode); + extern number::FormattedNumber formatNumberWithDefaults(const Locale& locale, StringPiece toFormat, UErrorCode& errorCode); + extern DateFormat* defaultDateTimeInstance(const Locale&, UErrorCode&); + +} // namespace message2 + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_MF2 */ + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif /* U_SHOW_CPLUSPLUS_API */ + +#endif // MESSAGEFORMAT2_FUNCTION_REGISTRY_INTERNAL_H + +#endif // U_HIDE_DEPRECATED_API +// eof diff --git a/contrib/libs/icu/i18n/messageformat2_macros.h b/contrib/libs/icu/i18n/messageformat2_macros.h new file mode 100644 index 0000000000..ee8cf0779e --- /dev/null +++ b/contrib/libs/icu/i18n/messageformat2_macros.h @@ -0,0 +1,113 @@ +// © 2024 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#ifndef U_HIDE_DEPRECATED_API + +#ifndef MESSAGEFORMAT2_MACROS_H +#define MESSAGEFORMAT2_MACROS_H + +#if U_SHOW_CPLUSPLUS_API + +#if !UCONFIG_NO_FORMATTING + +#if !UCONFIG_NO_MF2 + +#include "unicode/format.h" +#include "unicode/unistr.h" +#include "plurrule_impl.h" + +U_NAMESPACE_BEGIN + +namespace message2 { + +using namespace pluralimpl; + +// Tokens for parser and serializer + +// Syntactically significant characters +#define LEFT_CURLY_BRACE ((UChar32)0x007B) +#define RIGHT_CURLY_BRACE ((UChar32)0x007D) +#define HTAB ((UChar32)0x0009) +#define CR ((UChar32)0x000D) +#define LF ((UChar32)0x000A) +#define IDEOGRAPHIC_SPACE ((UChar32)0x3000) + +#define PIPE ((UChar32)0x007C) +#define EQUALS ((UChar32)0x003D) +#define DOLLAR ((UChar32)0x0024) +#define COLON ((UChar32)0x003A) +#define PLUS ((UChar32)0x002B) +#define HYPHEN ((UChar32)0x002D) +#define PERIOD ((UChar32)0x002E) +#define UNDERSCORE ((UChar32)0x005F) + +#define LOWERCASE_E ((UChar32)0x0065) +#define UPPERCASE_E ((UChar32)0x0045) + +// Reserved sigils +#define BANG ((UChar32)0x0021) +#define AT ((UChar32)0x0040) +#define PERCENT ((UChar32)0x0025) +#define CARET ((UChar32)0x005E) +#define AMPERSAND ((UChar32)0x0026) +#define LESS_THAN ((UChar32)0x003C) +#define GREATER_THAN ((UChar32)0x003E) +#define QUESTION ((UChar32)0x003F) +#define TILDE ((UChar32)0x007E) + +// Fallback +#define REPLACEMENT ((UChar32) 0xFFFD) + +// MessageFormat2 uses four keywords: `.input`, `.local`, `.when`, and `.match`. + +static constexpr UChar32 ID_INPUT[] = { + 0x2E, 0x69, 0x6E, 0x70, 0x75, 0x74, 0 /* ".input" */ +}; + +static constexpr UChar32 ID_LOCAL[] = { + 0x2E, 0x6C, 0x6F, 0x63, 0x61, 0x6C, 0 /* ".local" */ +}; + +static constexpr UChar32 ID_MATCH[] = { + 0x2E, 0x6D, 0x61, 0x74, 0x63, 0x68, 0 /* ".match" */ +}; + +// Returns immediately if `errorCode` indicates failure +#define CHECK_ERROR(errorCode) \ + if (U_FAILURE(errorCode)) { \ + return; \ + } + +// Returns immediately if `errorCode` indicates failure +#define NULL_ON_ERROR(errorCode) \ + if (U_FAILURE(errorCode)) { \ + return nullptr; \ + } + +// Returns immediately if `errorCode` indicates failure +#define THIS_ON_ERROR(errorCode) \ + if (U_FAILURE(errorCode)) { \ + return *this; \ + } + +// Returns immediately if `errorCode` indicates failure +#define EMPTY_ON_ERROR(errorCode) \ + if (U_FAILURE(errorCode)) { \ + return {}; \ + } + +} // namespace message2 +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_MF2 */ + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif /* U_SHOW_CPLUSPLUS_API */ + +#endif // MESSAGEFORMAT2_MACROS_H + +#endif // U_HIDE_DEPRECATED_API +// eof diff --git a/contrib/libs/icu/i18n/messageformat2_parser.cpp b/contrib/libs/icu/i18n/messageformat2_parser.cpp new file mode 100644 index 0000000000..15b185762d --- /dev/null +++ b/contrib/libs/icu/i18n/messageformat2_parser.cpp @@ -0,0 +1,2279 @@ +// © 2024 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#if !UCONFIG_NO_MF2 + +#include "messageformat2_errors.h" +#include "messageformat2_macros.h" +#include "messageformat2_parser.h" +#include "uvector.h" // U_ASSERT + +U_NAMESPACE_BEGIN + +namespace message2 { + +using namespace pluralimpl; + +using namespace data_model; + +/* + The `ERROR()` macro sets a syntax error in the context + and sets the offset in `parseError` to `index`. It does not alter control flow. +*/ +#define ERROR(parseError, errorCode, index) \ + if (!errors.hasSyntaxError()) { \ + setParseError(parseError, index); \ + errors.addSyntaxError(errorCode); \ + } + +// Returns true iff `index` is a valid index for the string `source` +static bool inBounds(const UnicodeString &source, uint32_t index) { + return (((int32_t)index) < source.length()); +} + +// Increments the line number and updates the "characters seen before +// current line" count in `parseError`, iff `source[index]` is a newline +void Parser::maybeAdvanceLine() { + if (source[index] == LF) { + parseError.line++; + // add 1 to index to get the number of characters seen so far + // (including the newline) + parseError.lengthBeforeCurrentLine = index + 1; + } +} + +/* + Signals an error and returns either if `parseError` already denotes an + error, or `index` is out of bounds for the string `source` +*/ +#define CHECK_BOUNDS(source, index, parseError, errorCode) \ + if (!inBounds(source, index)) { \ + ERROR(parseError, errorCode, index); \ + return; \ + } + +// ------------------------------------- +// Helper functions + +static void copyContext(const UChar in[U_PARSE_CONTEXT_LEN], UChar out[U_PARSE_CONTEXT_LEN]) { + for (int32_t i = 0; i < U_PARSE_CONTEXT_LEN; i++) { + out[i] = in[i]; + if (in[i] == '\0') { + break; + } + } +} + +/* static */ void Parser::translateParseError(const MessageParseError &messageParseError, UParseError &parseError) { + parseError.line = messageParseError.line; + parseError.offset = messageParseError.offset; + copyContext(messageParseError.preContext, parseError.preContext); + copyContext(messageParseError.postContext, parseError.postContext); +} + +/* static */ void Parser::setParseError(MessageParseError &parseError, uint32_t index) { + // Translate absolute to relative offset + parseError.offset = index // Start with total number of characters seen + - parseError.lengthBeforeCurrentLine; // Subtract all characters before the current line + // TODO: Fill this in with actual pre and post-context + parseError.preContext[0] = 0; + parseError.postContext[0] = 0; +} + +// ------------------------------------- +// Predicates + +// Returns true if `c` is in the interval [`first`, `last`] +static bool inRange(UChar32 c, UChar32 first, UChar32 last) { + U_ASSERT(first < last); + return c >= first && c <= last; +} + +/* + The following helper predicates should exactly match nonterminals in the MessageFormat 2 grammar: + + `isContentChar()` : `content-char` + `isTextChar()` : `text-char` + `isReservedStart()` : `reserved-start` + `isReservedChar()` : `reserved-char` + `isAlpha()` : `ALPHA` + `isDigit()` : `DIGIT` + `isNameStart()` : `name-start` + `isNameChar()` : `name-char` + `isUnquotedStart()` : `unquoted-start` + `isQuotedChar()` : `quoted-char` + `isWhitespace()` : `s` +*/ + +static bool isContentChar(UChar32 c) { + return inRange(c, 0x0001, 0x0008) // Omit NULL, HTAB and LF + || inRange(c, 0x000B, 0x000C) // Omit CR + || inRange(c, 0x000E, 0x001F) // Omit SP + || inRange(c, 0x0021, 0x002D) // Omit '.' + || inRange(c, 0x002F, 0x003F) // Omit '@' + || inRange(c, 0x0041, 0x005B) // Omit '\' + || inRange(c, 0x005D, 0x007A) // Omit { | } + || inRange(c, 0x007E, 0xD7FF) // Omit surrogates + || inRange(c, 0xE000, 0x10FFFF); +} + +// See `s` in the MessageFormat 2 grammar +inline bool isWhitespace(UChar32 c) { + switch (c) { + case SPACE: + case HTAB: + case CR: + case LF: + case IDEOGRAPHIC_SPACE: + return true; + default: + return false; + } +} + +static bool isTextChar(UChar32 c) { + return isContentChar(c) + || isWhitespace(c) + || c == PERIOD + || c == AT + || c == PIPE; +} + +// Note: this doesn't distinguish between private-use +// and reserved, since the data model doesn't +static bool isReservedStart(UChar32 c) { + switch (c) { + case BANG: + case PERCENT: + case ASTERISK: + case PLUS: + case LESS_THAN: + case GREATER_THAN: + case QUESTION: + case TILDE: + // Private-use + case CARET: + case AMPERSAND: + return true; + default: + return false; + } +} + +static bool isReservedChar(UChar32 c) { + return isContentChar(c) || c == PERIOD; +} + +static bool isReservedBodyStart(UChar32 c) { + return isReservedChar(c) || c == BACKSLASH || c == PIPE; +} + +static bool isAlpha(UChar32 c) { return inRange(c, 0x0041, 0x005A) || inRange(c, 0x0061, 0x007A); } + +static bool isDigit(UChar32 c) { return inRange(c, 0x0030, 0x0039); } + +static bool isNameStart(UChar32 c) { + return isAlpha(c) || c == UNDERSCORE || inRange(c, 0x00C0, 0x00D6) || inRange(c, 0x00D8, 0x00F6) || + inRange(c, 0x00F8, 0x02FF) || inRange(c, 0x0370, 0x037D) || inRange(c, 0x037F, 0x1FFF) || + inRange(c, 0x200C, 0x200D) || inRange(c, 0x2070, 0x218F) || inRange(c, 0x2C00, 0x2FEF) || + inRange(c, 0x3001, 0xD7FF) || inRange(c, 0xF900, 0xFDCF) || inRange(c, 0xFDF0, 0xFFFD) || + inRange(c, 0x10000, 0xEFFFF); +} + +static bool isNameChar(UChar32 c) { + return isNameStart(c) || isDigit(c) || c == HYPHEN || c == PERIOD || c == 0x00B7 || + inRange(c, 0x0300, 0x036F) || inRange(c, 0x203F, 0x2040); +} + +static bool isUnquotedStart(UChar32 c) { + return isNameStart(c) || isDigit(c) || c == HYPHEN || c == PERIOD || c == 0x00B7 || + inRange(c, 0x0300, 0x036F) || inRange(c, 0x203F, 0x2040); +} + +static bool isQuotedChar(UChar32 c) { + return isContentChar(c) + || isWhitespace(c) + || c == PERIOD + || c == AT + || c == LEFT_CURLY_BRACE + || c == RIGHT_CURLY_BRACE; +} + +// Returns true iff `c` can begin a `function` nonterminal +static bool isFunctionStart(UChar32 c) { + switch (c) { + case COLON: { + return true; + } + default: { + return false; + } + } +} + +// Returns true iff `c` can begin an `annotation` nonterminal +static bool isAnnotationStart(UChar32 c) { + return isFunctionStart(c) || isReservedStart(c); +} + +// Returns true iff `c` can begin either a `reserved-char` or `reserved-escape` +// literal +static bool reservedChunkFollows(UChar32 c) { + switch(c) { + // reserved-escape + case BACKSLASH: + // literal + case PIPE: { + return true; + } + default: { + // reserved-char + return (isReservedChar(c)); + } + } +} + +// Returns true iff `c` can begin a `literal` nonterminal +static bool isLiteralStart(UChar32 c) { + return (c == PIPE || isNameStart(c) || c == HYPHEN || isDigit(c)); +} + +// Returns true iff `c` can begin a `key` nonterminal +static bool isKeyStart(UChar32 c) { + return (c == ASTERISK || isLiteralStart(c)); +} + +inline bool isDeclarationStart(const UnicodeString& source, int32_t index) { + int32_t len = source.length(); + int32_t next = index + 1; + return (source[index] == ID_LOCAL[0] + && next < len + && source[next] == ID_LOCAL[1]) + || (source[index] == ID_INPUT[0] + && next < len + && source[next] == ID_INPUT[1]); +} + +// ------------------------------------- +// Parsing functions + + +/* + TODO: Since handling the whitespace ambiguities needs to be repeated + in several different places and is hard to factor out, + it probably would be better to replace the parser with a lexer + parser + to separate tokenizing from parsing, which would simplify the code significantly. + This has the disadvantage that there is no token grammar for MessageFormat, + so one would have to be invented that isn't a component of the spec. + */ + +/* + This is a recursive-descent scannerless parser that, + with a few exceptions, uses 1 character of lookahead. + + This may not be an exhaustive list, as the additions of attributes and reserved + statements introduced several new ambiguities. + +All but three of the exceptions involve ambiguities about the meaning of whitespace. +One ambiguity not involving whitespace is: +identifier -> namespace ":" name +vs. +identifier -> name + +`namespace` and `name` can't be distinguished without arbitrary lookahead. +(For how this is handled, see parseIdentifier()) + +The second ambiguity not involving whitespace is: +complex-message -> *(declaration[s]) complex-body + -> declaration *(declaration[s]) complex-body + -> declaration complex-body + -> reserved-statement complex-body + -> .foo {$x} .match // ... +When processing the '.', arbitrary lookahead is required to distinguish the +arbitrary-length unsupported keyword from `.match`. +(For how this is handled, see parseDeclarations()). + +The third ambiguity not involving whitespace is: +complex-message -> *(declaration [s]) complex-body + -> reserved-statement *(declaration [s]) complex-body + -> reserved-statement complex-body + -> reserved-statement quotedPattern + -> reserved-keyword [s reserved-body] 1*([s] expression) quoted-pattern + -> reserved-keyword expression quoted-pattern + Example: .foo {1} {{1}} + + Without lookahead, the opening '{' of the quoted pattern can't be distinguished + from the opening '{' of another expression in the unsupported statement. + (Though this only requires 1 character of lookahead.) + + Otherwise: + +There are at least seven ambiguities in the grammar that can't be resolved with finite +lookahead (since whitespace sequences can be arbitrarily long). They are resolved +with a form of backtracking (early exit). No state needs to be saved/restored +since whitespace doesn't affect the shape of the resulting parse tree, so it's +not true backtracking. + +In addition, the grammar has been refactored +in a semantics-preserving way in some cases to make the code easier to structure. + +First: variant = when 1*(s key) [s] pattern + Example: when k {a} + When reading the first space after 'k', it's ambiguous whether it's the + required space before another key, or the optional space before `pattern`. + (See comments in parseNonEmptyKeys()) + +Second: expression = "{" [s] (((literal / variable) [s annotation]) / annotation) [s] "}" + annotation = (function *(s option)) / reserved + Example: {:f } + When reading the first space after 'f', it's ambiguous whether it's the + required space before an option, or the optional trailing space after an options list + (in this case, the options list is empty). + (See comments in parseOptions() -- handling this case also meant it was easier to base + the code on a slightly refactored grammar, which should be semantically equivalent.) + +Third: expression = "{" [s] (((literal / variable) [s annotation]) / annotation) [s] "}" + annotation = (function *(s option)) / reserved + Example: {@a } + Similar to the previous case; see comments in parseReserved() + +Fourth: expression = "{" [s] (((literal / variable) [s annotation]) / annotation) [s] "}" + Example: {|foo| } + When reading the first space after the '|', it's ambiguous whether it's the required + space before an annotation, or the optional trailing space before the '}'. + (See comments in parseLiteralOrVariableWithAnnotation(); handling this case relies on + the same grammar refactoring as the second exception.) + + Most functions match a non-terminal in the grammar, except as explained + in comments. + +Fifth: matcher = match-statement 1*([s] variant) + -> match 1 *([s] selector) 1*([s] variant) + Example: match {42} * {{_}} + When reading the space after the first '}', it's unclear whether + it's the optional space before another selector, or the optional space + before a variant. + +Sixth: annotation-expression = "{" [s] annotation *(s attribute) [s] "}" + -> "{" [s] function *(s attribute) [s] "}" + -> "{" [s] ":" identifier *(s option) *(s attribute) [s] "}" + -> "{" [s] ":" identifier s attribute *(s attribute) [s] "}" + + Example: {:func @foo} +(Note: the same ambiguity is present with variable-expression and literal-expression) + +Seventh: + + +When parsing the space, it's unclear whether it's the optional space before an +option, or the optional space before an attribute. + + Unless otherwise noted in a comment, all helper functions that take + a `source` string, an `index` unsigned int, and an `errorCode` `UErrorCode` + have the precondition: + `index` < `source.length()` + and the postcondition: + `U_FAILURE(errorCode)` || `index < `source.length()` +*/ + +/* + No pre, no post. + A message may end with whitespace, so `index` may equal `source.length()` on exit. +*/ +void Parser::parseWhitespaceMaybeRequired(bool required, UErrorCode& errorCode) { + bool sawWhitespace = false; + + // The loop exits either when we consume all the input, + // or when we see a non-whitespace character. + while (true) { + // Check if all input has been consumed + if (!inBounds(source, index)) { + // If whitespace isn't required -- or if we saw it already -- + // then the caller is responsible for checking this case and + // setting an error if necessary. + if (!required || sawWhitespace) { + // Not an error. + return; + } + // Otherwise, whitespace is required; the end of the input has + // been reached without whitespace. This is an error. + ERROR(parseError, errorCode, index); + return; + } + + // Input remains; process the next character if it's whitespace, + // exit the loop otherwise + if (isWhitespace(source[index])) { + sawWhitespace = true; + // Increment line number in parse error if we consume a newline + maybeAdvanceLine(); + index++; + } else { + break; + } + } + + if (!sawWhitespace && required) { + ERROR(parseError, errorCode, index); + } +} + +/* + No pre, no post, for the same reason as `parseWhitespaceMaybeRequired()`. +*/ +void Parser::parseRequiredWhitespace(UErrorCode& errorCode) { + parseWhitespaceMaybeRequired(true, errorCode); + normalizedInput += SPACE; +} + +/* + No pre, no post, for the same reason as `parseWhitespaceMaybeRequired()`. +*/ +void Parser::parseOptionalWhitespace(UErrorCode& errorCode) { + parseWhitespaceMaybeRequired(false, errorCode); +} + +// Consumes a single character, signaling an error if `source[index]` != `c` +// No postcondition -- a message can end with a '}' token +void Parser::parseToken(UChar32 c, UErrorCode& errorCode) { + CHECK_BOUNDS(source, index, parseError, errorCode); + + if (source[index] == c) { + index++; + normalizedInput += c; + return; + } + // Next character didn't match -- error out + ERROR(parseError, errorCode, index); +} + +/* + Consumes a fixed-length token, signaling an error if the token isn't a prefix of + the string beginning at `source[index]` + No postcondition -- a message can end with a '}' token +*/ +template <int32_t N> +void Parser::parseToken(const UChar32 (&token)[N], UErrorCode& errorCode) { + U_ASSERT(inBounds(source, index)); + + int32_t tokenPos = 0; + while (tokenPos < N - 1) { + if (source[index] != token[tokenPos]) { + ERROR(parseError, errorCode, index); + return; + } + normalizedInput += token[tokenPos]; + index++; + tokenPos++; + } +} + +/* + Consumes optional whitespace, possibly advancing `index` to `index'`, + then consumes a fixed-length token (signaling an error if the token isn't a prefix of + the string beginning at `source[index']`), + then consumes optional whitespace again +*/ +template <int32_t N> +void Parser::parseTokenWithWhitespace(const UChar32 (&token)[N], UErrorCode& errorCode) { + // No need for error check or bounds check before parseOptionalWhitespace + parseOptionalWhitespace(errorCode); + // Establish precondition + CHECK_BOUNDS(source, index, parseError, errorCode); + parseToken(token); + parseOptionalWhitespace(errorCode); + // Guarantee postcondition + CHECK_BOUNDS(source, index, parseError, errorCode); +} + +/* + Consumes optional whitespace, possibly advancing `index` to `index'`, + then consumes a single character (signaling an error if it doesn't match + `source[index']`), + then consumes optional whitespace again +*/ +void Parser::parseTokenWithWhitespace(UChar32 c, UErrorCode& errorCode) { + // No need for error check or bounds check before parseOptionalWhitespace(errorCode) + parseOptionalWhitespace(errorCode); + // Establish precondition + CHECK_BOUNDS(source, index, parseError, errorCode); + parseToken(c, errorCode); + parseOptionalWhitespace(errorCode); + // Guarantee postcondition + CHECK_BOUNDS(source, index, parseError, errorCode); +} + +/* + Consumes a non-empty sequence of `name-char`s, the first of which is + also a `name-start`. + that begins with a character `start` such that `isNameStart(start)`. + + Returns this sequence. + + (Matches the `name` nonterminal in the grammar.) +*/ +UnicodeString Parser::parseName(UErrorCode& errorCode) { + UnicodeString name; + + U_ASSERT(inBounds(source, index)); + + if (!isNameStart(source[index])) { + ERROR(parseError, errorCode, index); + return name; + } + + while (isNameChar(source[index])) { + name += source[index]; + normalizedInput += source[index]; + index++; + if (!inBounds(source, index)) { + ERROR(parseError, errorCode, index); + break; + } + } + return name; +} + +/* + Consumes a '$' followed by a `name`, returning a VariableName + with `name` as its name + + (Matches the `variable` nonterminal in the grammar.) +*/ +VariableName Parser::parseVariableName(UErrorCode& errorCode) { + VariableName result; + + U_ASSERT(inBounds(source, index)); + // If the '$' is missing, we don't want a binding + // for this variable to be created. + bool valid = source[index] == DOLLAR; + parseToken(DOLLAR, errorCode); + if (!inBounds(source, index)) { + ERROR(parseError, errorCode, index); + return result; + } + UnicodeString varName = parseName(errorCode); + // Set the name to "" if the variable wasn't + // declared correctly + if (!valid) { + varName.remove(); + } + return VariableName(varName); +} + +/* + Corresponds to the `identifier` nonterminal in the grammar +*/ +UnicodeString Parser::parseIdentifier(UErrorCode& errorCode) { + U_ASSERT(inBounds(source, index)); + + UnicodeString result; + // The following is a hack to get around ambiguity in the grammar: + // identifier -> namespace ":" name + // vs. + // identifier -> name + // can't be distinguished without arbitrary lookahead. + // Instead, we treat the production as: + // identifier -> namespace *(":"name) + // and then check for multiple colons. + + // Parse namespace + result += parseName(errorCode); + int32_t firstColon = -1; + while (inBounds(source, index) && source[index] == COLON) { + // Parse ':' separator + if (firstColon == -1) { + firstColon = index; + } + parseToken(COLON, errorCode); + result += COLON; + // Check for message ending with something like "foo:" + if (!inBounds(source, index)) { + ERROR(parseError, errorCode, index); + } else { + // Parse name part + result += parseName(errorCode); + } + } + + // If there's at least one ':', scan from the first ':' + // to the end of the name to check for multiple ':'s + if (firstColon != -1) { + for (int32_t i = firstColon + 1; i < result.length(); i++) { + if (result[i] == COLON) { + ERROR(parseError, errorCode, i); + return {}; + } + } + } + + return result; +} + +/* + Consumes a reference to a function, matching the ": identifier" + in the `function` nonterminal in the grammar. + + Returns the function name. +*/ +FunctionName Parser::parseFunction(UErrorCode& errorCode) { + U_ASSERT(inBounds(source, index)); + if (!isFunctionStart(source[index])) { + ERROR(parseError, errorCode, index); + return FunctionName(); + } + + normalizedInput += source[index]; + index++; // Consume the function start character + if (!inBounds(source, index)) { + ERROR(parseError, errorCode, index); + return FunctionName(); + } + return parseIdentifier(errorCode); +} + + +/* + Precondition: source[index] == BACKSLASH + + Consume an escaped character. + + Generalized to handle `reserved-escape`, `text-escape`, + or `literal-escape`, depending on the `kind` argument. + + Appends result to `str` +*/ +void Parser::parseEscapeSequence(EscapeKind kind, + UnicodeString &str, + UErrorCode& errorCode) { + U_ASSERT(inBounds(source, index)); + U_ASSERT(source[index] == BACKSLASH); + normalizedInput += BACKSLASH; + index++; // Skip the initial backslash + CHECK_BOUNDS(source, index, parseError, errorCode); + + #define SUCCEED \ + /* Append to the output string */ \ + str += source[index]; \ + /* Update normalizedInput */ \ + normalizedInput += source[index]; \ + /* Consume the character */ \ + index++; \ + /* Guarantee postcondition */ \ + CHECK_BOUNDS(source, index, parseError, errorCode); \ + return; + + // Expect a '{', '|' or '}' + switch (source[index]) { + case LEFT_CURLY_BRACE: + case RIGHT_CURLY_BRACE: { + // Allowed in a `text-escape` or `reserved-escape` + switch (kind) { + case TEXT: + case RESERVED: { + SUCCEED; + } + default: { + break; + } + } + break; + } + case PIPE: { + // Allowed in a `literal-escape` or `reserved-escape` + switch (kind) { + case LITERAL: + case RESERVED: { + SUCCEED; + } + default: { + break; + } + } + break; + } + case BACKSLASH: { + // Allowed in any escape sequence + SUCCEED; + } + default: { + // No other characters are allowed here + break; + } + } + // If control reaches here, there was an error + ERROR(parseError, errorCode, index); +} + +/* + Consume an escaped pipe or backslash, matching the `literal-escape` + nonterminal in the grammar +*/ +void Parser::parseLiteralEscape(UnicodeString &str, UErrorCode& errorCode) { + parseEscapeSequence(LITERAL, str, errorCode); +} + + +/* + Consume and return a quoted literal, matching the `literal` nonterminal in the grammar. +*/ +Literal Parser::parseQuotedLiteral(UErrorCode& errorCode) { + bool error = false; + + UnicodeString contents; + if (U_SUCCESS(errorCode)) { + // Parse the opening '|' + parseToken(PIPE, errorCode); + if (!inBounds(source, index)) { + ERROR(parseError, errorCode, index); + error = true; + } else { + // Parse the contents + bool done = false; + while (!done) { + if (source[index] == BACKSLASH) { + parseLiteralEscape(contents, errorCode); + } else if (isQuotedChar(source[index])) { + contents += source[index]; + normalizedInput += source[index]; + index++; // Consume this character + maybeAdvanceLine(); + } else { + // Assume the sequence of literal characters ends here + done = true; + } + if (!inBounds(source, index)) { + ERROR(parseError, errorCode, index); + error = true; + break; + } + } + } + } + + if (error) { + return {}; + } + + // Parse the closing '|' + parseToken(PIPE, errorCode); + + return Literal(true, contents); +} + +// Parse (1*DIGIT) +UnicodeString Parser::parseDigits(UErrorCode& errorCode) { + if (U_FAILURE(errorCode)) { + return {}; + } + + U_ASSERT(isDigit(source[index])); + + UnicodeString contents; + do { + contents += source[index]; + normalizedInput += source[index]; + index++; + if (!inBounds(source, index)) { + ERROR(parseError, errorCode, index); + return {}; + } + } while (isDigit(source[index])); + + return contents; +} +/* + Consume and return an unquoted literal, matching the `unquoted` nonterminal in the grammar. +*/ +Literal Parser::parseUnquotedLiteral(UErrorCode& errorCode) { + if (U_FAILURE(errorCode)) { + return {}; + } + + // unquoted -> name + if (isNameStart(source[index])) { + return Literal(false, parseName(errorCode)); + } + + // unquoted -> number + // Parse the contents + UnicodeString contents; + + // Parse the sign + if (source[index] == HYPHEN) { + contents += source[index]; + normalizedInput += source[index]; + index++; + } + if (!inBounds(source, index)) { + ERROR(parseError, errorCode, index); + return {}; + } + + // Parse the integer part + if (source[index] == ((UChar32)0x0030) /* 0 */) { + contents += source[index]; + normalizedInput += source[index]; + index++; + } else if (isDigit(source[index])) { + contents += parseDigits(errorCode); + } else { + // Error -- nothing else can start a number literal + ERROR(parseError, errorCode, index); + return {}; + } + + // Parse the decimal point if present + if (source[index] == PERIOD) { + contents += source[index]; + normalizedInput += source[index]; + index++; + if (!inBounds(source, index)) { + ERROR(parseError, errorCode, index); + return {}; + } + // Parse the fraction part + if (isDigit(source[index])) { + contents += parseDigits(errorCode); + } else { + // '.' not followed by digit is a parse error + ERROR(parseError, errorCode, index); + return {}; + } + } + + if (!inBounds(source, index)) { + ERROR(parseError, errorCode, index); + return {}; + } + + // Parse the exponent part if present + if (source[index] == UPPERCASE_E || source[index] == LOWERCASE_E) { + contents += source[index]; + normalizedInput += source[index]; + index++; + if (!inBounds(source, index)) { + ERROR(parseError, errorCode, index); + return {}; + } + // Parse sign if present + if (source[index] == PLUS || source[index] == HYPHEN) { + contents += source[index]; + normalizedInput += source[index]; + index++; + if (!inBounds(source, index)) { + ERROR(parseError, errorCode, index); + return {}; + } + } + // Parse exponent digits + if (!isDigit(source[index])) { + ERROR(parseError, errorCode, index); + return {}; + } + contents += parseDigits(errorCode); + } + + return Literal(false, contents); +} + +/* + Consume and return a literal, matching the `literal` nonterminal in the grammar. +*/ +Literal Parser::parseLiteral(UErrorCode& errorCode) { + Literal result; + if (!inBounds(source, index)) { + ERROR(parseError, errorCode, index); + } else { + if (source[index] == PIPE) { + result = parseQuotedLiteral(errorCode); + } else { + result = parseUnquotedLiteral(errorCode); + } + // Guarantee postcondition + if (!inBounds(source, index)) { + ERROR(parseError, errorCode, index); + } + } + + return result; +} + +/* + Consume a @name-value pair, matching the `attribute` nonterminal in the grammar. + + Adds the option to `options` +*/ +template<class T> +void Parser::parseAttribute(AttributeAdder<T>& attrAdder, UErrorCode& errorCode) { + U_ASSERT(inBounds(source, index)); + + U_ASSERT(source[index] == AT); + // Consume the '@' + parseToken(AT, errorCode); + + // Parse LHS + UnicodeString lhs = parseIdentifier(errorCode); + + // Prepare to "backtrack" to resolve ambiguity + // about whether whitespace precedes another + // attribute, or the '=' sign + int32_t savedIndex = index; + parseOptionalWhitespace(errorCode); + + Operand rand; + if (source[index] == EQUALS) { + // Parse '=' + parseTokenWithWhitespace(EQUALS, errorCode); + + UnicodeString rhsStr; + // Parse RHS, which is either a literal or variable + switch (source[index]) { + case DOLLAR: { + rand = Operand(parseVariableName(errorCode)); + break; + } + default: { + // Must be a literal + rand = Operand(parseLiteral(errorCode)); + break; + } + } + U_ASSERT(!rand.isNull()); + } else { + // attribute -> "@" identifier [[s] "=" [s]] + // Use null operand, which `rand` is already set to + // "Backtrack" by restoring the whitespace (if there was any) + index = savedIndex; + } + + attrAdder.addAttribute(lhs, std::move(rand), errorCode); +} + +/* + Consume a name-value pair, matching the `option` nonterminal in the grammar. + + Adds the option to `optionList` +*/ +template<class T> +void Parser::parseOption(OptionAdder<T>& addOption, UErrorCode& errorCode) { + U_ASSERT(inBounds(source, index)); + + // Parse LHS + UnicodeString lhs = parseIdentifier(errorCode); + + // Parse '=' + parseTokenWithWhitespace(EQUALS, errorCode); + + UnicodeString rhsStr; + Operand rand; + // Parse RHS, which is either a literal or variable + switch (source[index]) { + case DOLLAR: { + rand = Operand(parseVariableName(errorCode)); + break; + } + default: { + // Must be a literal + rand = Operand(parseLiteral(errorCode)); + break; + } + } + U_ASSERT(!rand.isNull()); + + // Finally, add the key=value mapping + // Use a local error code, check for duplicate option error and + // record it as with other errors + UErrorCode status = U_ZERO_ERROR; + addOption.addOption(lhs, std::move(rand), status); + if (U_FAILURE(status)) { + U_ASSERT(status == U_MF_DUPLICATE_OPTION_NAME_ERROR); + errors.setDuplicateOptionName(errorCode); + } +} + +/* + Note: there are multiple overloads of parseOptions() for parsing + options within markup, vs. within an expression, vs. parsing + attributes. This should be refactored. TODO + */ + +/* + Consume optional whitespace followed by a sequence of options + (possibly empty), separated by whitespace +*/ +template <class T> +void Parser::parseOptions(OptionAdder<T>& addOption, UErrorCode& errorCode) { + // Early exit if out of bounds -- no more work is possible + CHECK_BOUNDS(source, index, parseError, errorCode); + +/* +Arbitrary lookahead is required to parse option lists. To see why, consider +these rules from the grammar: + +expression = "{" [s] (((literal / variable) [s annotation]) / annotation) [s] "}" +annotation = (function *(s option)) / reserved + +And this example: +{:foo } + +Derivation: +expression -> "{" [s] (((literal / variable) [s annotation]) / annotation) [s] "}" + -> "{" [s] annotation [s] "}" + -> "{" [s] ((function *(s option)) / reserved) [s] "}" + -> "{" [s] function *(s option) [s] "}" + +In this example, knowing whether to expect a '}' or the start of another option +after the whitespace would require arbitrary lookahead -- in other words, which +rule should we apply? + *(s option) -> s option *(s option) + or + *(s option) -> + +The same would apply to the example {:foo k=v } (note the trailing space after "v"). + +This is addressed using a form of backtracking and (to make the backtracking easier +to apply) a slight refactoring to the grammar. + +This code is written as if the grammar is: + expression = "{" [s] (((literal / variable) ([s] / [s annotation])) / annotation) "}" + annotation = (function *(s option) [s]) / (reserved [s]) + +Parsing the `*(s option) [s]` sequence can be done within `parseOptions()`, meaning +that `parseExpression()` can safely require a '}' after `parseOptions()` finishes. + +Note that when "backtracking" really just means early exit, since only whitespace +is involved and there's no state to save. + +There is a separate but similar ambiguity as to whether the space precedes +an option or an attribute. +*/ + + while(true) { + // If the next character is not whitespace, that means we've already + // parsed the entire options list (which may have been empty) and there's + // no trailing whitespace. In that case, exit. + if (!isWhitespace(source[index])) { + break; + } + int32_t firstWhitespace = index; + + // In any case other than an empty options list, there must be at least + // one whitespace character. + parseRequiredWhitespace(errorCode); + // Restore precondition + CHECK_BOUNDS(source, index, parseError, errorCode); + + // If a name character follows, then at least one more option remains + // in the list. + // Otherwise, we've consumed all the options and any trailing whitespace, + // and can exit. + // Note that exiting is sort of like backtracking: "(s option)" doesn't apply, + // so we back out to [s]. + if (!isNameStart(source[index])) { + // We've consumed all the options (meaning that either we consumed non-empty + // whitespace, or consumed at least one option.) + // Done. + // Remove the required whitespace from normalizedInput + normalizedInput.truncate(normalizedInput.length() - 1); + // "Backtrack" so as to leave the optional whitespace there + // when parsing attributes + index = firstWhitespace; + break; + } + parseOption(addOption, errorCode); + } +} + +/* + Consume optional whitespace followed by a sequence of attributes + (possibly empty), separated by whitespace +*/ +template<class T> +void Parser::parseAttributes(AttributeAdder<T>& attrAdder, UErrorCode& errorCode) { + + // Early exit if out of bounds -- no more work is possible + if (!inBounds(source, index)) { + ERROR(parseError, errorCode, index); + return; + } + +/* +Arbitrary lookahead is required to parse attribute lists, similarly to option lists. +(See comment in parseOptions()). +*/ + + while(true) { + // If the next character is not whitespace, that means we've already + // parsed the entire attributes list (which may have been empty) and there's + // no trailing whitespace. In that case, exit. + if (!isWhitespace(source[index])) { + break; + } + + // In any case other than an empty attributes list, there must be at least + // one whitespace character. + parseRequiredWhitespace(errorCode); + // Restore precondition + if (!inBounds(source, index)) { + ERROR(parseError, errorCode, index); + break; + } + + // If an '@' follows, then at least one more attribute remains + // in the list. + // Otherwise, we've consumed all the attributes and any trailing whitespace, + // and can exit. + // Note that exiting is sort of like backtracking: "(s attributes)" doesn't apply, + // so we back out to [s]. + if (source[index] != AT) { + // We've consumed all the attributes (meaning that either we consumed non-empty + // whitespace, or consumed at least one attribute.) + // Done. + // Remove the whitespace from normalizedInput + normalizedInput.truncate(normalizedInput.length() - 1); + break; + } + parseAttribute(attrAdder, errorCode); + } +} + +void Parser::parseReservedEscape(UnicodeString &str, UErrorCode& errorCode) { + parseEscapeSequence(RESERVED, str, errorCode); +} + +/* + Consumes a non-empty sequence of reserved-chars, reserved-escapes, and + literals (as in 1*(reserved-char / reserved-escape / literal) in the `reserved-body` rule) + + Appends it to `str` +*/ +void Parser::parseReservedChunk(Reserved::Builder& result, UErrorCode& status) { + CHECK_ERROR(status); + + bool empty = true; + UnicodeString chunk; + while(reservedChunkFollows(source[index])) { + empty = false; + // reserved-char + if (isReservedChar(source[index])) { + chunk += source[index]; + normalizedInput += source[index]; + // consume the char + index++; + // Restore precondition + CHECK_BOUNDS(source, index, parseError, status); + continue; + } + + if (chunk.length() > 0) { + result.add(Literal(false, chunk), status); + chunk.setTo(u"", 0); + } + + if (source[index] == BACKSLASH) { + // reserved-escape + parseReservedEscape(chunk, status); + result.add(Literal(false, chunk), status); + chunk.setTo(u"", 0); + } else if (source[index] == PIPE || isUnquotedStart(source[index])) { + result.add(parseLiteral(status), status); + } else { + // The reserved chunk ends here + break; + } + + CHECK_ERROR(status); // Avoid looping infinitely + } + + // Add the last chunk if necessary + if (chunk.length() > 0) { + result.add(Literal(false, chunk), status); + } + + if (empty) { + ERROR(parseError, status, index); + } +} + +/* + Consume a `reserved-start` character followed by a possibly-empty sequence + of non-empty sequences of reserved characters, separated by whitespace. + Matches the `reserved` nonterminal in the grammar + +*/ +Reserved Parser::parseReserved(UErrorCode& status) { + Reserved::Builder builder(status); + + if (U_FAILURE(status)) { + return {}; + } + + U_ASSERT(inBounds(source, index)); + + // Require a `reservedStart` character + if (!isReservedStart(source[index])) { + ERROR(parseError, status, index); + return Reserved(); + } + + // Add the start char as a separate text chunk + UnicodeString firstCharString(source[index]); + builder.add(Literal(false, firstCharString), status); + if (U_FAILURE(status)) { + return {}; + } + // Consume reservedStart + normalizedInput += source[index]; + index++; + return parseReservedBody(builder, status); +} + +Reserved Parser::parseReservedBody(Reserved::Builder& builder, UErrorCode& status) { + if (U_FAILURE(status)) { + return {}; + } + +/* + Arbitrary lookahead is required to parse a `reserved`, for similar reasons + to why it's required for parsing function annotations. + + In the grammar: + + annotation = (function *(s option)) / reserved + expression = "{" [s] (((literal / variable) [s annotation]) / annotation) [s] "}" + reserved = reserved-start reserved-body + reserved-body = *( [s] 1*(reserved-char / reserved-escape / literal)) + + When reading a whitespace character, it's ambiguous whether it's the optional + whitespace in this rule, or the optional whitespace that precedes a '}' in an + expression. + + The ambiguity is resolved using the same grammar refactoring as shown in + the comment in `parseOptions()`. +*/ + // Consume reserved characters / literals / reserved escapes + // until a character that can't be in a `reserved-body` is seen + while (true) { + /* + First, if there is whitespace, it means either a chunk follows it, + or this is the trailing whitespace before the '}' that terminates an + expression. + + Next, if the next character can start a reserved-char, reserved-escape, + or literal, then parse a "chunk" of reserved things. + In any other case, we exit successfully, since per the refactored + grammar rule: + annotation = (function *(s option) [s]) / (reserved [s]) + it's valid to consume whitespace after a `reserved`. + (`parseExpression()` is responsible for checking that the next + character is in fact a '}'.) + */ + if (!inBounds(source, index)) { + break; + } + int32_t numWhitespaceChars = 0; + int32_t savedIndex = index; + if (isWhitespace(source[index])) { + parseOptionalWhitespace(status); + numWhitespaceChars = index - savedIndex; + // Restore precondition + if (!inBounds(source, index)) { + break; + } + } + + if (reservedChunkFollows(source[index])) { + parseReservedChunk(builder, status); + + // Avoid looping infinitely + if (U_FAILURE(status) || !inBounds(source, index)) { + break; + } + } else { + if (numWhitespaceChars > 0) { + if (source[index] == LEFT_CURLY_BRACE) { + // Resolve even more ambiguity (space preceding another piece of + // a `reserved-body`, vs. space preceding an expression in `reserved-statement` + // "Backtrack" + index -= numWhitespaceChars; + break; + } + if (source[index] == RIGHT_CURLY_BRACE) { + // Not an error: just means there's no trailing whitespace + // after this `reserved` + break; + } + if (source[index] == AT) { + // Not an error, but we have to "backtrack" due to the ambiguity + // between an `s` preceding another reserved chunk + // and an `s` preceding an attribute list + index -= numWhitespaceChars; + break; + } + // Error: if there's whitespace, it must either be followed + // by a non-empty sequence or by '}' + ERROR(parseError, status, index); + break; + } + // If there was no whitespace, it's not an error, + // just the end of the reserved string + break; + } + } + + return builder.build(status); +} + +/* + Consume a function call or reserved string, matching the `annotation` + nonterminal in the grammar + + Returns an `Operator` representing this (a reserved is a parse error) +*/ +Operator Parser::parseAnnotation(UErrorCode& status) { + U_ASSERT(inBounds(source, index)); + Operator::Builder ratorBuilder(status); + if (U_FAILURE(status)) { + return {}; + } + if (isFunctionStart(source[index])) { + // Consume the function name + FunctionName func = parseFunction(status); + ratorBuilder.setFunctionName(std::move(func)); + + OptionAdder<Operator::Builder> addOptions(ratorBuilder); + // Consume the options (which may be empty) + parseOptions(addOptions, status); + } else { + // Must be reserved + // A reserved sequence is not a parse error, but might be a formatting error + Reserved rator = parseReserved(status); + ratorBuilder.setReserved(std::move(rator)); + } + UErrorCode localStatus = U_ZERO_ERROR; + Operator result = ratorBuilder.build(localStatus); + // Either `setReserved` or `setFunctionName` was called, + // so there shouldn't be an error. + U_ASSERT(U_SUCCESS(localStatus)); + return result; +} + +/* + Consume a literal or variable (depending on `isVariable`), + followed by either required whitespace followed by an annotation, + or optional whitespace. +*/ +void Parser::parseLiteralOrVariableWithAnnotation(bool isVariable, + Expression::Builder& builder, + UErrorCode& status) { + CHECK_ERROR(status); + + U_ASSERT(inBounds(source, index)); + + Operand rand; + if (isVariable) { + rand = Operand(parseVariableName(status)); + } else { + rand = Operand(parseLiteral(status)); + } + + builder.setOperand(std::move(rand)); + +/* +Parsing a literal or variable with an optional annotation requires arbitrary lookahead. +To see why, consider this rule from the grammar: + +expression = "{" [s] (((literal / variable) [s annotation]) / annotation) [s] "}" + +And this example: + +{|foo| } + +Derivation: +expression -> "{" [s] (((literal / variable) [s annotation]) / annotation) [s] "}" + -> "{" [s] ((literal / variable) [s annotation]) [s] "}" + -> "{" [s] (literal [s annotation]) [s] "}" + +When reading the ' ' after the second '|', it's ambiguous whether that's the required +space before an annotation, or the optional space before the '}'. + +To make this ambiguity easier to handle, this code is based on the same grammar +refactoring for the `expression` nonterminal that `parseOptions()` relies on. See +the comment in `parseOptions()` for details. +*/ + + if (isWhitespace(source[index])) { + int32_t firstWhitespace = index; + + // If the next character is whitespace, either [s annotation] or [s] applies + // (the character is either the required space before an annotation, or optional + // trailing space after the literal or variable). It's still ambiguous which + // one does apply. + parseOptionalWhitespace(status); + // Restore precondition + CHECK_BOUNDS(source, index, parseError, status); + + // This next check resolves the ambiguity between [s annotation] and [s] + bool isSAnnotation = isAnnotationStart(source[index]); + + if (isSAnnotation) { + normalizedInput += SPACE; + } + + if (isSAnnotation) { + // The previously consumed whitespace precedes an annotation + builder.setOperator(parseAnnotation(status)); + } else { + // Either there's a right curly brace (will be consumed by the caller), + // or there's an error and the trailing whitespace should be + // handled by the caller. However, this is not an error + // here because we're just parsing `literal [s annotation]`. + index = firstWhitespace; + } + } else { + // Either there was never whitespace, or + // the previously consumed whitespace is the optional trailing whitespace; + // either the next character is '}' or the error will be handled by parseExpression. + // Do nothing, since the operand was already set + } + + // At the end of this code, the next character should either be '}', + // whitespace followed by a '}', + // or end-of-input +} + +/* + Consume an expression, matching the `expression` nonterminal in the grammar +*/ + +static void exprFallback(Expression::Builder& exprBuilder) { + // Construct a literal consisting just of The U+FFFD REPLACEMENT CHARACTER + // per https://github.com/unicode-org/message-format-wg/blob/main/spec/formatting.md#fallback-resolution + exprBuilder.setOperand(Operand(Literal(false, UnicodeString(REPLACEMENT)))); +} + +static Expression exprFallback(UErrorCode& status) { + Expression result; + if (U_SUCCESS(status)) { + Expression::Builder exprBuilder(status); + if (U_SUCCESS(status)) { + // Construct a literal consisting just of The U+FFFD REPLACEMENT CHARACTER + // per https://github.com/unicode-org/message-format-wg/blob/main/spec/formatting.md#fallback-resolution + exprBuilder.setOperand(Operand(Literal(false, UnicodeString(REPLACEMENT)))); + UErrorCode status = U_ZERO_ERROR; + result = exprBuilder.build(status); + // An operand was set, so there can't be an error + U_ASSERT(U_SUCCESS(status)); + } + } + return result; +} + +Expression Parser::parseExpression(UErrorCode& status) { + if (U_FAILURE(status)) { + return {}; + } + + // Early return if out of input -- no more work is possible + U_ASSERT(inBounds(source, index)); + + // Parse opening brace + parseToken(LEFT_CURLY_BRACE, status); + // Optional whitespace after opening brace + parseOptionalWhitespace(status); + + Expression::Builder exprBuilder(status); + // Restore precondition + if (!inBounds(source, index)) { + exprFallback(exprBuilder); + } else { + // literal '|', variable '$' or annotation + switch (source[index]) { + case PIPE: { + // Quoted literal + parseLiteralOrVariableWithAnnotation(false, exprBuilder, status); + break; + } + case DOLLAR: { + // Variable + parseLiteralOrVariableWithAnnotation(true, exprBuilder, status); + break; + } + default: { + if (isAnnotationStart(source[index])) { + Operator rator = parseAnnotation(status); + exprBuilder.setOperator(std::move(rator)); + } else if (isUnquotedStart(source[index])) { + // Unquoted literal + parseLiteralOrVariableWithAnnotation(false, exprBuilder, status); + } else { + // Not a literal, variable or annotation -- error out + ERROR(parseError, status, index); + exprFallback(exprBuilder); + break; + } + break; + } + } + } + + // Parse attributes + AttributeAdder attrAdder(exprBuilder); + parseAttributes(attrAdder, status); + + // Parse optional space + // (the last [s] in e.g. "{" [s] literal [s annotation] *(s attribute) [s] "}") + parseOptionalWhitespace(status); + + // Either an operand or operator (or both) must have been set already, + // so there can't be an error + UErrorCode localStatus = U_ZERO_ERROR; + Expression result = exprBuilder.build(localStatus); + U_ASSERT(U_SUCCESS(localStatus)); + + // Check for end-of-input and missing '}' + if (!inBounds(source, index)) { + ERROR(parseError, status, index); + } else { + // Otherwise, it's safe to check for the '}' + parseToken(RIGHT_CURLY_BRACE, status); + } + return result; +} + +/* + Parse a .local declaration, matching the `local-declaration` + production in the grammar +*/ +void Parser::parseLocalDeclaration(UErrorCode& status) { + // End-of-input here would be an error; even empty + // declarations must be followed by a body + CHECK_BOUNDS(source, index, parseError, status); + + parseToken(ID_LOCAL, status); + parseRequiredWhitespace(status); + + // Restore precondition + CHECK_BOUNDS(source, index, parseError, status); + VariableName lhs = parseVariableName(status); + parseTokenWithWhitespace(EQUALS, status); + // Restore precondition before calling parseExpression() + CHECK_BOUNDS(source, index, parseError, status); + + Expression rhs = parseExpression(status); + + // Add binding from lhs to rhs, unless there was an error + // (This ensures that if there was a correct lhs but a + // parse error in rhs, the fallback for uses of the + // lhs will be its own name rather than the rhs) + /* This affects the behavior of this test case, which the spec + is ambiguous about: + + .local $bar {|foo|} {{{$bar}}} + + Should `$bar` still be bound to a value although + its declaration is syntactically incorrect (missing the '=')? + This code says no, but it needs to change if + https://github.com/unicode-org/message-format-wg/issues/703 + is resolved differently. + */ + CHECK_ERROR(status); + if (!errors.hasSyntaxError()) { + dataModel.addBinding(Binding(std::move(lhs), std::move(rhs)), status); + // Check if status is U_DUPLICATE_DECLARATION_ERROR + // and add that as an internal error if so + if (status == U_MF_DUPLICATE_DECLARATION_ERROR) { + status = U_ZERO_ERROR; + errors.addError(StaticErrorType::DuplicateDeclarationError, status); + } + } +} + +/* + Parse an .input declaration, matching the `local-declaration` + production in the grammar +*/ +void Parser::parseInputDeclaration(UErrorCode& status) { + // End-of-input here would be an error; even empty + // declarations must be followed by a body + CHECK_BOUNDS(source, index, parseError, status); + + parseToken(ID_INPUT, status); + parseOptionalWhitespace(status); + + // Restore precondition before calling parseExpression() + CHECK_BOUNDS(source, index, parseError, status); + + // Save the index for error diagnostics + int32_t exprIndex = index; + Expression rhs = parseExpression(status); + + // Here we have to check that the rhs is a variable-expression + if (!rhs.getOperand().isVariable()) { + // This case is a syntax error; report it at the beginning + // of the expression + ERROR(parseError, status, exprIndex); + return; + } + + VariableName lhs = rhs.getOperand().asVariable(); + + // Add binding from lhs to rhs + // This just adds a new local variable that shadows the message + // argument referred to, which is harmless. + // When evaluating the RHS, the new local is not in scope + // and the message argument will be correctly referred to. + CHECK_ERROR(status); + if (!errors.hasSyntaxError()) { + dataModel.addBinding(Binding::input(std::move(lhs), std::move(rhs), status), status); + // Check if status is U_MF_DUPLICATE_DECLARATION_ERROR + // and add that as an internal error if so + if (status == U_MF_DUPLICATE_DECLARATION_ERROR) { + status = U_ZERO_ERROR; + errors.addError(StaticErrorType::DuplicateDeclarationError, status); + } + } +} + +/* + Parses a `reserved-statement` per the grammar + */ +void Parser::parseUnsupportedStatement(UErrorCode& status) { + U_ASSERT(inBounds(source, index) && source[index] == PERIOD); + + UnsupportedStatement::Builder builder(status); + CHECK_ERROR(status); + + // Parse the keyword + UnicodeString keyword(PERIOD); + normalizedInput += UnicodeString(PERIOD); + index++; + keyword += parseName(status); + builder.setKeyword(keyword); + + // Parse the body, which is optional + // Lookahead is required to distinguish the `s` in reserved-body + // from the `s` in `[s] expression` + // Next character may be: + // * whitespace (followed by either a reserved-body start or + // a '{') + // * a '{' + + CHECK_BOUNDS(source, index, parseError, status); + + if (source[index] != LEFT_CURLY_BRACE) { + if (!isWhitespace(source[index])) { + ERROR(parseError, status, index); + return; + } + // Expect a reserved-body start + int32_t savedIndex = index; + parseRequiredWhitespace(status); + CHECK_BOUNDS(source, index, parseError, status); + if (isReservedBodyStart(source[index])) { + // There is a reserved body + Reserved::Builder r(status); + builder.setBody(parseReservedBody(r, status)); + } else { + // No body -- backtrack so we can parse 1*([s] expression) + index = savedIndex; + normalizedInput.truncate(normalizedInput.length() - 1); + } + // Otherwise, the next character must be a '{' + // to open the required expression (or optional whitespace) + if (source[index] != LEFT_CURLY_BRACE && !isWhitespace(source[index])) { + ERROR(parseError, status, index); + return; + } + } + + // Finally, parse the expressions + + // Need to look ahead to disambiguate a '{' beginning + // an expression from one beginning with a quoted pattern + int32_t expressionCount = 0; + while (source[index] == LEFT_CURLY_BRACE || isWhitespace(source[index])) { + parseOptionalWhitespace(status); + + bool nextIsLbrace = source[index] == LEFT_CURLY_BRACE; + bool nextIsQuotedPattern = nextIsLbrace && inBounds(source, index + 1) + && source[index + 1] == LEFT_CURLY_BRACE; + if (nextIsQuotedPattern) { + break; + } + + builder.addExpression(parseExpression(status), status); + expressionCount++; + } + if (expressionCount <= 0) { + // At least one expression is required + ERROR(parseError, status, index); + return; + } + dataModel.addUnsupportedStatement(builder.build(status), status); +} + +// Terrible hack to get around the ambiguity between `matcher` and `reserved-statement` +bool Parser::nextIsMatch() const { + for(int32_t i = 0; i < 6; i++) { + if (!inBounds(source, index + i) || source[index + i] != ID_MATCH[i]) { + return false; + } + } + return true; +} +/* + Consume a possibly-empty sequence of declarations separated by whitespace; + each declaration matches the `declaration` nonterminal in the grammar + + Builds up an environment representing those declarations +*/ +void Parser::parseDeclarations(UErrorCode& status) { + // End-of-input here would be an error; even empty + // declarations must be followed by a body + CHECK_BOUNDS(source, index, parseError, status); + + while (source[index] == PERIOD) { + CHECK_BOUNDS(source, index + 1, parseError, status); + if (source[index + 1] == ID_LOCAL[1]) { + parseLocalDeclaration(status); + } else if (source[index + 1] == ID_INPUT[1]) { + parseInputDeclaration(status); + } else { + // Unsupported statement + // Lookahead is needed to disambiguate this from a `match` + if (!nextIsMatch()) { + parseUnsupportedStatement(status); + } else { + // Done parsing declarations + break; + } + } + + // Avoid looping infinitely + CHECK_ERROR(status); + + parseOptionalWhitespace(status); + // Restore precondition + CHECK_BOUNDS(source, index, parseError, status); + } +} + +/* + Consume an escaped curly brace, or backslash, matching the `text-escape` + nonterminal in the grammar +*/ +void Parser::parseTextEscape(UnicodeString &str, UErrorCode& status) { + parseEscapeSequence(TEXT, str, status); +} + +/* + Consume a non-empty sequence of text characters and escaped text characters, + matching the `text` nonterminal in the grammar + + No postcondition (a message can end with a text) +*/ +UnicodeString Parser::parseText(UErrorCode& status) { + UnicodeString str; + if (!inBounds(source, index)) { + // Text can be empty + return str; + } + + if (!(isTextChar(source[index] || source[index] == BACKSLASH))) { + // Error -- text is expected here + ERROR(parseError, status, index); + return str; + } + + while (true) { + if (source[index] == BACKSLASH) { + parseTextEscape(str, status); + } else if (isTextChar(source[index])) { + normalizedInput += source[index]; + str += source[index]; + index++; + maybeAdvanceLine(); + } else { + break; + } + if (!inBounds(source, index)) { + // OK for text to end a message + break; + } + } + + return str; +} + +/* + Consume an `nmtoken`, `literal`, or the string "*", matching + the `key` nonterminal in the grammar +*/ +Key Parser::parseKey(UErrorCode& status) { + U_ASSERT(inBounds(source, index)); + + Key k; // wildcard by default + // Literal | '*' + switch (source[index]) { + case ASTERISK: { + index++; + normalizedInput += ASTERISK; + // Guarantee postcondition + if (!inBounds(source, index)) { + ERROR(parseError, status, index); + return k; + } + break; + } + default: { + // Literal + k = Key(parseLiteral(status)); + break; + } + } + return k; +} + +/* + Consume a non-empty sequence of `key`s separated by whitespace + + Takes ownership of `keys` +*/ +SelectorKeys Parser::parseNonEmptyKeys(UErrorCode& status) { + SelectorKeys result; + + if (U_FAILURE(status)) { + return result; + } + + U_ASSERT(inBounds(source, index)); + +/* +Arbitrary lookahead is required to parse key lists. To see why, consider +this rule from the grammar: + +variant = key *(s key) [s] quoted-pattern + +And this example: +when k1 k2 {a} + +Derivation: + variant -> key *(s key) [s] quoted-pattern + -> key s key *(s key) quoted-pattern + +After matching ' ' to `s` and 'k2' to `key`, it would require arbitrary lookahead +to know whether to expect the start of a pattern or the start of another key. +In other words: is the second whitespace sequence the required space in *(s key), +or the optional space in [s] quoted-pattern? + +This is addressed using "backtracking" (similarly to `parseOptions()`). +*/ + + SelectorKeys::Builder keysBuilder(status); + if (U_FAILURE(status)) { + return result; + } + + // Since the first key is required, it's simplest to parse it separately. + keysBuilder.add(parseKey(status), status); + + // Restore precondition + if (!inBounds(source, index)) { + ERROR(parseError, status, index); + return result; + } + + // We've seen at least one whitespace-key pair, so now we can parse + // *(s key) [s] + while (source[index] != LEFT_CURLY_BRACE || isWhitespace(source[index])) { // Try to recover from errors + bool wasWhitespace = isWhitespace(source[index]); + parseRequiredWhitespace(status); + if (!wasWhitespace) { + // Avoid infinite loop when parsing something like: + // when * @{!... + index++; + } + + // Restore precondition + if (!inBounds(source, index)) { + ERROR(parseError, status, index); + return result; + } + + // At this point, it's ambiguous whether we are inside (s key) or [s]. + // This check resolves that ambiguity. + if (source[index] == LEFT_CURLY_BRACE) { + // A pattern follows, so what we just parsed was the optional + // trailing whitespace. All the keys have been parsed. + + // Unpush the whitespace from `normalizedInput` + normalizedInput.truncate(normalizedInput.length() - 1); + break; + } + keysBuilder.add(parseKey(status), status); + } + + return keysBuilder.build(status); +} + +Pattern Parser::parseQuotedPattern(UErrorCode& status) { + U_ASSERT(inBounds(source, index)); + + parseToken(LEFT_CURLY_BRACE, status); + parseToken(LEFT_CURLY_BRACE, status); + Pattern p = parseSimpleMessage(status); + parseToken(RIGHT_CURLY_BRACE, status); + parseToken(RIGHT_CURLY_BRACE, status); + return p; +} + +/* + Consume a `placeholder`, matching the nonterminal in the grammar + No postcondition (a markup can end a message) +*/ +Markup Parser::parseMarkup(UErrorCode& status) { + U_ASSERT(inBounds(source, index + 1)); + + U_ASSERT(source[index] == LEFT_CURLY_BRACE); + + Markup::Builder builder(status); + if (U_FAILURE(status)) { + return {}; + } + + // Consume the '{' + index++; + normalizedInput += LEFT_CURLY_BRACE; + parseOptionalWhitespace(status); + bool closing = false; + switch (source[index]) { + case NUMBER_SIGN: { + // Open or standalone; consume the '#' + normalizedInput += source[index]; + index++; + break; + } + case SLASH: { + // Closing + normalizedInput += source[index]; + closing = true; + index++; + break; + } + default: { + ERROR(parseError, status, index); + return {}; + } + } + + // Parse the markup identifier + builder.setName(parseIdentifier(status)); + + // Parse the options, which must begin with a ' ' + // if present + if (inBounds(source, index) && isWhitespace(source[index])) { + OptionAdder<Markup::Builder> optionAdder(builder); + parseOptions(optionAdder, status); + } + + // Parse the attributes, which also must begin + // with a ' ' + if (inBounds(source, index) && isWhitespace(source[index])) { + AttributeAdder attrAdder(builder); + parseAttributes(attrAdder, status); + } + + parseOptionalWhitespace(status); + + bool standalone = false; + // Check if this is a standalone or not + if (!closing) { + if (inBounds(source, index) && source[index] == SLASH) { + standalone = true; + normalizedInput += SLASH; + index++; + } + } + + parseToken(RIGHT_CURLY_BRACE, status); + + if (standalone) { + builder.setStandalone(); + } else if (closing) { + builder.setClose(); + } else { + builder.setOpen(); + } + + return builder.build(status); +} + +/* + Consume a `placeholder`, matching the nonterminal in the grammar + No postcondition (a placeholder can end a message) +*/ +std::variant<Expression, Markup> Parser::parsePlaceholder(UErrorCode& status) { + U_ASSERT(source[index] == LEFT_CURLY_BRACE); + + if (!inBounds(source, index)) { + ERROR(parseError, status, index); + return exprFallback(status); + } + + // Check if it's markup or an expression + if (source[index + 1] == NUMBER_SIGN || source[index + 1] == SLASH) { + // Markup + return parseMarkup(status); + } + return parseExpression(status); +} + +/* + Consume a `simple-message`, matching the nonterminal in the grammar + Postcondition: `index == source.length()` or U_FAILURE(status); + for a syntactically correct message, this will consume the entire input +*/ +Pattern Parser::parseSimpleMessage(UErrorCode& status) { + Pattern::Builder result(status); + + if (U_SUCCESS(status)) { + Expression expression; + while (inBounds(source, index)) { + switch (source[index]) { + case LEFT_CURLY_BRACE: { + // Must be placeholder + std::variant<Expression, Markup> piece = parsePlaceholder(status); + if (std::holds_alternative<Expression>(piece)) { + Expression expr = *std::get_if<Expression>(&piece); + result.add(std::move(expr), status); + } else { + Markup markup = *std::get_if<Markup>(&piece); + result.add(std::move(markup), status); + } + break; + } + default: { + // Must be text + result.add(parseText(status), status); + break; + } + } + if (source[index] == RIGHT_CURLY_BRACE) { + // End of quoted pattern + break; + } + // Don't loop infinitely + if (errors.hasSyntaxError()) { + break; + } + } + } + return result.build(status); +} + + +/* + Consume a `selectors` (matching the nonterminal in the grammar), + followed by a non-empty sequence of `variant`s (matching the nonterminal + in the grammar) preceded by whitespace + No postcondition (on return, `index` might equal `source.length()` with no syntax error + because a message can end with a variant) +*/ +void Parser::parseSelectors(UErrorCode& status) { + CHECK_ERROR(status); + + U_ASSERT(inBounds(source, index)); + + parseToken(ID_MATCH, status); + + bool empty = true; + // Parse selectors + // "Backtracking" is required here. It's not clear if whitespace is + // (`[s]` selector) or (`[s]` variant) + while (isWhitespace(source[index]) || source[index] == LEFT_CURLY_BRACE) { + parseOptionalWhitespace(status); + // Restore precondition + CHECK_BOUNDS(source, index, parseError, status); + if (source[index] != LEFT_CURLY_BRACE) { + // This is not necessarily an error, but rather, + // means the whitespace we parsed was the optional + // whitespace preceding the first variant, not the + // optional whitespace preceding a subsequent expression. + break; + } + Expression expression; + expression = parseExpression(status); + empty = false; + + dataModel.addSelector(std::move(expression), status); + CHECK_ERROR(status); + } + + // At least one selector is required + if (empty) { + ERROR(parseError, status, index); + return; + } + + #define CHECK_END_OF_INPUT \ + if (((int32_t)index) >= source.length()) { \ + break; \ + } \ + + // Parse variants + while (isWhitespace(source[index]) || isKeyStart(source[index])) { + if (isWhitespace(source[index])) { + int32_t whitespaceStart = index; + parseOptionalWhitespace(status); + // Restore the precondition. + // Error out if we reached the end of input. The message + // cannot end with trailing whitespace if there are variants. + if (!inBounds(source, index)) { + // Use index of first whitespace for error message + index = whitespaceStart; + ERROR(parseError, status, index); + return; + } + } + + // At least one key is required + SelectorKeys keyList(parseNonEmptyKeys(status)); + + CHECK_ERROR(status); + + // parseNonEmptyKeys() consumes any trailing whitespace, + // so the pattern can be consumed next. + + // Restore precondition before calling parsePattern() + // (which must return a non-null value) + CHECK_BOUNDS(source, index, parseError, status); + Pattern rhs = parseQuotedPattern(status); + + dataModel.addVariant(std::move(keyList), std::move(rhs), status); + + // Restore the precondition, *without* erroring out if we've + // reached the end of input. That's because it's valid for the + // message to end with a variant that has no trailing whitespace. + // Why do we need to check this condition twice inside the loop? + // Because if we don't check it here, the `isWhitespace()` call in + // the loop head will read off the end of the input string. + CHECK_END_OF_INPUT + } +} + +/* + Consume a `body` (matching the nonterminal in the grammar), + No postcondition (on return, `index` might equal `source.length()` with no syntax error, + because a message can end with a body (trailing whitespace is optional) +*/ + +void Parser::errorPattern(UErrorCode& status) { + errors.addSyntaxError(status); + // Set to empty pattern + Pattern::Builder result = Pattern::Builder(status); + CHECK_ERROR(status); + + // If still in bounds, then add the remaining input as a single text part + // to the pattern + /* + TODO: this behavior isn't documented in the spec, but it comes from + https://github.com/messageformat/messageformat/blob/e0087bff312d759b67a9129eac135d318a1f0ce7/packages/mf2-messageformat/src/__fixtures/test-messages.json#L236 + and a pending pull request https://github.com/unicode-org/message-format-wg/pull/462 will clarify + whether this is the intent behind the spec + */ + UnicodeString partStr(LEFT_CURLY_BRACE); + while (inBounds(source, index)) { + partStr += source[index++]; + } + // Add curly braces around the entire output (same comment as above) + partStr += RIGHT_CURLY_BRACE; + result.add(std::move(partStr), status); + dataModel.setPattern(result.build(status)); +} + +void Parser::parseBody(UErrorCode& status) { + CHECK_ERROR(status); + + // Out-of-input is a syntax warning + if (!inBounds(source, index)) { + errorPattern(status); + return; + } + + // Body must be either a pattern or selectors + switch (source[index]) { + case LEFT_CURLY_BRACE: { + // Pattern + dataModel.setPattern(parseQuotedPattern(status)); + break; + } + case ID_MATCH[0]: { + // Selectors + parseSelectors(status); + return; + } + default: { + ERROR(parseError, status, index); + errorPattern(status); + return; + } + } +} + +// ------------------------------------- +// Parses the source pattern. + +void Parser::parse(UParseError &parseErrorResult, UErrorCode& status) { + CHECK_ERROR(status); + + bool simple = true; + // Message can be empty, so we need to only look ahead + // if we know it's non-empty + if (inBounds(source, index)) { + if (source[index] == PERIOD + || (index < ((uint32_t) source.length() + 1) + && source[index] == LEFT_CURLY_BRACE + && source[index + 1] == LEFT_CURLY_BRACE)) { + // A complex message begins with a '.' or '{' + parseDeclarations(status); + parseBody(status); + simple = false; + } + } + if (simple) { + // Simple message + // For normalization, quote the pattern + normalizedInput += LEFT_CURLY_BRACE; + normalizedInput += LEFT_CURLY_BRACE; + dataModel.setPattern(parseSimpleMessage(status)); + normalizedInput += RIGHT_CURLY_BRACE; + normalizedInput += RIGHT_CURLY_BRACE; + } + + CHECK_ERROR(status); + + // There are no errors; finally, check that the entire input was consumed + if (((int32_t)index) != source.length()) { + ERROR(parseError, status, index); + } + + // Finally, copy the relevant fields of the internal `MessageParseError` + // into the `UParseError` argument + translateParseError(parseError, parseErrorResult); +} + +Parser::~Parser() {} + +} // namespace message2 +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_MF2 */ + +#endif /* #if !UCONFIG_NO_FORMATTING */ + diff --git a/contrib/libs/icu/i18n/messageformat2_parser.h b/contrib/libs/icu/i18n/messageformat2_parser.h new file mode 100644 index 0000000000..92c0475d67 --- /dev/null +++ b/contrib/libs/icu/i18n/messageformat2_parser.h @@ -0,0 +1,184 @@ +// © 2024 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#ifndef U_HIDE_DEPRECATED_API + +#ifndef MESSAGEFORMAT_PARSER_H +#define MESSAGEFORMAT_PARSER_H + +#include "unicode/messageformat2_data_model.h" +#include "unicode/parseerr.h" + +#include "messageformat2_allocation.h" +#include "messageformat2_errors.h" + +#if U_SHOW_CPLUSPLUS_API + +#if !UCONFIG_NO_FORMATTING + +#if !UCONFIG_NO_MF2 + +U_NAMESPACE_BEGIN + +namespace message2 { + + using namespace data_model; + + // Used for parameterizing options parsing code + // over the two builders that use it (Operator and Markup) + template <class T> + class OptionAdder { + private: + T& builder; + public: + OptionAdder(T& b) : builder(b) {} + void addOption(const UnicodeString& k, Operand&& r, UErrorCode& s) { + builder.addOption(k, std::move(r), s); + } + }; + + // Used for parameterizing attributes parsing code + // over the two builders that use it (Expression and Markup) + // Unfortunately the same OptionAdder class can't just be reused, + // becaues duplicate options are forbidden while duplicate attributes are not + template <class T> + class AttributeAdder { + private: + T& builder; + public: + AttributeAdder(T& b) : builder(b) {} + void addAttribute(const UnicodeString& k, Operand&& r, UErrorCode& s) { + builder.addAttribute(k, std::move(r), s); + } + }; + + // Parser class (private) + class Parser : public UMemory { + public: + virtual ~Parser(); + private: + friend class MessageFormatter; + + void parse(UParseError&, UErrorCode&); + + /* + Use an internal "parse error" structure to make it easier to translate + absolute offsets to line offsets. + This is translated back to a `UParseError` at the end of parsing. + */ + typedef struct MessageParseError { + // The line on which the error occurred + uint32_t line; + // The offset, relative to the erroneous line, on which the error occurred + uint32_t offset; + // The total number of characters seen before advancing to the current line. It has a value of 0 if line == 0. + // It includes newline characters, because the index does too. + uint32_t lengthBeforeCurrentLine; + + // This parser doesn't yet use the last two fields. + UChar preContext[U_PARSE_CONTEXT_LEN]; + UChar postContext[U_PARSE_CONTEXT_LEN]; + } MessageParseError; + + Parser(const UnicodeString &input, MFDataModel::Builder& dataModelBuilder, StaticErrors& e, UnicodeString& normalizedInputRef) + : source(input), index(0), errors(e), normalizedInput(normalizedInputRef), dataModel(dataModelBuilder) { + parseError.line = 0; + parseError.offset = 0; + parseError.lengthBeforeCurrentLine = 0; + parseError.preContext[0] = '\0'; + parseError.postContext[0] = '\0'; + } + + // Used so `parseEscapeSequence()` can handle all types of escape sequences + // (literal, text, and reserved) + typedef enum { LITERAL, TEXT, RESERVED } EscapeKind; + + static void translateParseError(const MessageParseError&, UParseError&); + static void setParseError(MessageParseError&, uint32_t); + void maybeAdvanceLine(); + Pattern parseSimpleMessage(UErrorCode&); + void parseBody(UErrorCode&); + void parseDeclarations(UErrorCode&); + void parseUnsupportedStatement(UErrorCode&); + void parseLocalDeclaration(UErrorCode&); + void parseInputDeclaration(UErrorCode&); + void parseSelectors(UErrorCode&); + + void parseWhitespaceMaybeRequired(bool, UErrorCode&); + void parseRequiredWhitespace(UErrorCode&); + void parseOptionalWhitespace(UErrorCode&); + void parseToken(UChar32, UErrorCode&); + void parseTokenWithWhitespace(UChar32, UErrorCode&); + template <int32_t N> + void parseToken(const UChar32 (&)[N], UErrorCode&); + template <int32_t N> + void parseTokenWithWhitespace(const UChar32 (&)[N], UErrorCode&); + bool nextIsMatch() const; + UnicodeString parseName(UErrorCode&); + UnicodeString parseIdentifier(UErrorCode&); + UnicodeString parseDigits(UErrorCode&); + VariableName parseVariableName(UErrorCode&); + FunctionName parseFunction(UErrorCode&); + void parseEscapeSequence(EscapeKind, UnicodeString&, UErrorCode&); + void parseLiteralEscape(UnicodeString&, UErrorCode&); + Literal parseUnquotedLiteral(UErrorCode&); + Literal parseQuotedLiteral(UErrorCode&); + Literal parseLiteral(UErrorCode&); + template<class T> + void parseAttribute(AttributeAdder<T>&, UErrorCode&); + template<class T> + void parseAttributes(AttributeAdder<T>&, UErrorCode&); + template<class T> + void parseOption(OptionAdder<T>&, UErrorCode&); + template<class T> + void parseOptions(OptionAdder<T>&, UErrorCode&); + void parseReservedEscape(UnicodeString&, UErrorCode&); + void parseReservedChunk(Reserved::Builder&, UErrorCode&); + Reserved parseReserved(UErrorCode&); + Reserved parseReservedBody(Reserved::Builder&, UErrorCode&); + Operator parseAnnotation(UErrorCode&); + void parseLiteralOrVariableWithAnnotation(bool, Expression::Builder&, UErrorCode&); + Markup parseMarkup(UErrorCode&); + Expression parseExpression(UErrorCode&); + std::variant<Expression, Markup> parsePlaceholder(UErrorCode&); + void parseTextEscape(UnicodeString&, UErrorCode&); + UnicodeString parseText(UErrorCode&); + Key parseKey(UErrorCode&); + SelectorKeys parseNonEmptyKeys(UErrorCode&); + void errorPattern(UErrorCode& status); + Pattern parseQuotedPattern(UErrorCode&); + + // The input string + const UnicodeString &source; + // The current position within the input string + uint32_t index; + // Represents the current line (and when an error is indicated), + // character offset within the line of the parse error + MessageParseError parseError; + + // The structure to use for recording errors + StaticErrors& errors; + + // Normalized version of the input string (optional whitespace removed) + UnicodeString& normalizedInput; + + // The parent builder + MFDataModel::Builder &dataModel; + }; // class Parser + +} // namespace message2 + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_MF2 */ + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif /* U_SHOW_CPLUSPLUS_API */ + +#endif // MESSAGEFORMAT_PARSER_H + +#endif // U_HIDE_DEPRECATED_API +// eof diff --git a/contrib/libs/icu/i18n/messageformat2_serializer.cpp b/contrib/libs/icu/i18n/messageformat2_serializer.cpp new file mode 100644 index 0000000000..b55c55ab7c --- /dev/null +++ b/contrib/libs/icu/i18n/messageformat2_serializer.cpp @@ -0,0 +1,340 @@ +// © 2024 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#if !UCONFIG_NO_MF2 + +#include "unicode/messageformat2_data_model.h" +#include "messageformat2_macros.h" +#include "messageformat2_serializer.h" +#include "uvector.h" // U_ASSERT + +U_NAMESPACE_BEGIN + +namespace message2 { + +// Generates a string representation of a data model +// ------------------------------------------------ + +using namespace data_model; + +// Private helper methods + +void Serializer::whitespace() { + result += SPACE; +} + +void Serializer::emit(UChar32 c) { + result += c; +} + +void Serializer::emit(const UnicodeString& s) { + result += s; +} + +template <int32_t N> +void Serializer::emit(const UChar32 (&token)[N]) { + // Don't emit the terminator + for (int32_t i = 0; i < N - 1; i++) { + emit(token[i]); + } +} + +void Serializer::emit(const Literal& l) { + if (l.isQuoted()) { + emit(PIPE); + const UnicodeString& contents = l.unquoted(); + for (int32_t i = 0; ((int32_t) i) < contents.length(); i++) { + // Re-escape any PIPE or BACKSLASH characters + switch(contents[i]) { + case BACKSLASH: + case PIPE: { + emit(BACKSLASH); + break; + } + default: { + break; + } + } + emit(contents[i]); + } + emit(PIPE); + } else { + emit(l.unquoted()); + } +} + +void Serializer::emit(const Key& k) { + if (k.isWildcard()) { + emit(ASTERISK); + return; + } + emit(k.asLiteral()); +} + +void Serializer::emit(const SelectorKeys& k) { + const Key* ks = k.getKeysInternal(); + int32_t len = k.len; + // It would be an error for `keys` to be empty; + // that would mean this is the single `pattern` + // variant, and in that case, this method shouldn't be called + U_ASSERT(len > 0); + for (int32_t i = 0; i < len; i++) { + if (i != 0) { + whitespace(); + } + emit(ks[i]); + } +} + +void Serializer::emit(const Operand& rand) { + U_ASSERT(!rand.isNull()); + + if (rand.isVariable()) { + emit(DOLLAR); + emit(rand.asVariable()); + } else { + // Literal: quoted or unquoted + emit(rand.asLiteral()); + } +} + +void Serializer::emit(const OptionMap& options) { + // Errors should have been checked before this point + UErrorCode localStatus = U_ZERO_ERROR; + U_ASSERT(!options.bogus); + for (int32_t i = 0; i < options.size(); i++) { + const Option& opt = options.getOption(i, localStatus); + // No need to check error code, since we already checked + // that !bogus + whitespace(); + emit(opt.getName()); + emit(EQUALS); + emit(opt.getValue()); + } +} + +void Serializer::emitAttributes(const OptionMap& attributes) { + // Errors should have been checked before this point + UErrorCode localStatus = U_ZERO_ERROR; + U_ASSERT(!attributes.bogus); + for (int32_t i = 0; i < attributes.size(); i++) { + const Option& attr = attributes.getOption(i, localStatus); + // No need to check error code, since we already checked + // that !bogus + whitespace(); + emit(AT); + emit(attr.getName()); + const Operand& v = attr.getValue(); + if (!v.isNull()) { + emit(EQUALS); + emit(v); + } + } +} + +void Serializer::emit(const Reserved& reserved) { + // Re-escape '\' / '{' / '|' / '}' + for (int32_t i = 0; i < reserved.numParts(); i++) { + const Literal& l = reserved.getPart(i); + if (l.isQuoted()) { + emit(l); + } else { + const UnicodeString& s = l.unquoted(); + for (int32_t j = 0; ((int32_t) j) < s.length(); j++) { + switch(s[j]) { + case LEFT_CURLY_BRACE: + case PIPE: + case RIGHT_CURLY_BRACE: + case BACKSLASH: { + emit(BACKSLASH); + break; + } + default: + break; + } + emit(s[j]); + } + } + } +} + + void Serializer::emit(const Expression& expr) { + emit(LEFT_CURLY_BRACE); + + if (!expr.isReserved() && !expr.isFunctionCall()) { + // Literal or variable, no annotation + emit(expr.getOperand()); + } else { + // Function call or reserved + if (!expr.isStandaloneAnnotation()) { + // Must be a function call that has an operand + emit(expr.getOperand()); + whitespace(); + } + UErrorCode localStatus = U_ZERO_ERROR; + const Operator* rator = expr.getOperator(localStatus); + U_ASSERT(U_SUCCESS(localStatus)); + if (rator->isReserved()) { + const Reserved& reserved = rator->asReserved(); + emit(reserved); + } else { + emit(COLON); + emit(rator->getFunctionName()); + // No whitespace after function name, in case it has + // no options. (when there are options, emit(OptionMap) will + // emit the leading whitespace) + emit(rator->getOptionsInternal()); + } + } + emitAttributes(expr.getAttributesInternal()); + emit(RIGHT_CURLY_BRACE); +} + +void Serializer::emit(const PatternPart& part) { + if (part.isText()) { + // Raw text + const UnicodeString& text = part.asText(); + // Re-escape '{'/'}'/'\' + for (int32_t i = 0; ((int32_t) i) < text.length(); i++) { + switch(text[i]) { + case BACKSLASH: + case LEFT_CURLY_BRACE: + case RIGHT_CURLY_BRACE: { + emit(BACKSLASH); + break; + } + default: + break; + } + emit(text[i]); + } + return; + } + // Markup + if (part.isMarkup()) { + const Markup& markup = part.asMarkup(); + emit(LEFT_CURLY_BRACE); + if (markup.isClose()) { + emit(SLASH); + } else { + emit(NUMBER_SIGN); + } + emit(markup.getName()); + emit(markup.getOptionsInternal()); + emitAttributes(markup.getAttributesInternal()); + if (markup.isStandalone()) { + emit(SLASH); + } + emit(RIGHT_CURLY_BRACE); + return; + } + // Expression + emit(part.contents()); +} + +void Serializer::emit(const Pattern& pat) { + int32_t len = pat.numParts(); + // Always quote pattern, which should match the normalized input + // if the parser is constructing it correctly + emit(LEFT_CURLY_BRACE); + emit(LEFT_CURLY_BRACE); + for (int32_t i = 0; i < len; i++) { + // No whitespace is needed here -- see the `pattern` nonterminal in the grammar + emit(pat.getPart(i)); + } + emit(RIGHT_CURLY_BRACE); + emit(RIGHT_CURLY_BRACE); +} + +void Serializer::serializeDeclarations() { + const Binding* bindings = dataModel.getLocalVariablesInternal(); + U_ASSERT(bindings != nullptr); + + for (int32_t i = 0; i < dataModel.bindingsLen; i++) { + const Binding& b = bindings[i]; + if (b.isLocal()) { + // No whitespace needed here -- see `message` in the grammar + emit(ID_LOCAL); + whitespace(); + emit(DOLLAR); + emit(b.getVariable()); + // No whitespace needed here -- see `local-declaration` in the grammar + emit(EQUALS); + // No whitespace needed here -- see `local-declaration` in the grammar + } else { + // Input declaration + emit(ID_INPUT); + // No whitespace needed here -- see `input-declaration` in the grammar + } + emit(b.getValue()); + } +} + +void Serializer::serializeUnsupported() { + const UnsupportedStatement* statements = dataModel.getUnsupportedStatementsInternal(); + U_ASSERT(statements != nullptr); + + for (int32_t i = 0; i < dataModel.unsupportedStatementsLen; i++) { + const UnsupportedStatement& s = statements[i]; + emit(s.getKeyword()); + UErrorCode localErrorCode = U_ZERO_ERROR; + const Reserved* r = s.getBody(localErrorCode); + if (U_SUCCESS(localErrorCode)) { + whitespace(); + emit(*r); + } + const Expression* e = s.getExpressionsInternal(); + for (int32_t j = 0; j < s.expressionsLen; j++) { + emit(e[j]); + } + } +} + +void Serializer::serializeSelectors() { + U_ASSERT(!dataModel.hasPattern()); + const Expression* selectors = dataModel.getSelectorsInternal(); + + emit(ID_MATCH); + for (int32_t i = 0; i < dataModel.numSelectors(); i++) { + // No whitespace needed here -- see `selectors` in the grammar + emit(selectors[i]); + } +} + +void Serializer::serializeVariants() { + U_ASSERT(!dataModel.hasPattern()); + const Variant* variants = dataModel.getVariantsInternal(); + for (int32_t i = 0; i < dataModel.numVariants(); i++) { + const Variant& v = variants[i]; + emit(v.getKeys()); + // No whitespace needed here -- see `variant` in the grammar + emit(v.getPattern()); + } +} + + +// Main (public) serializer method +void Serializer::serialize() { + serializeDeclarations(); + serializeUnsupported(); + // Pattern message + if (dataModel.hasPattern()) { + emit(dataModel.getPattern()); + } else { + // Selectors message + serializeSelectors(); + serializeVariants(); + } +} + +} // namespace message2 +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_MF2 */ + +#endif /* #if !UCONFIG_NO_FORMATTING */ + diff --git a/contrib/libs/icu/i18n/messageformat2_serializer.h b/contrib/libs/icu/i18n/messageformat2_serializer.h new file mode 100644 index 0000000000..4b72d1ca71 --- /dev/null +++ b/contrib/libs/icu/i18n/messageformat2_serializer.h @@ -0,0 +1,75 @@ +// © 2024 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#ifndef U_HIDE_DEPRECATED_API + +#ifndef MESSAGEFORMAT_SERIALIZER_H +#define MESSAGEFORMAT_SERIALIZER_H + +#if U_SHOW_CPLUSPLUS_API + +#if !UCONFIG_NO_FORMATTING + +#if !UCONFIG_NO_MF2 + +#include "unicode/messageformat2_data_model.h" + +U_NAMESPACE_BEGIN + +namespace message2 { + + using namespace data_model; + + // Serializer class (private) + // Converts a data model back to a string + // TODO: Should be private; made public so tests + // can use it + class U_I18N_API Serializer : public UMemory { + public: + Serializer(const MFDataModel& m, UnicodeString& s) : dataModel(m), result(s) {} + void serialize(); + + const MFDataModel& dataModel; + UnicodeString& result; + + private: + + void whitespace(); + void emit(UChar32); + template <int32_t N> + void emit(const UChar32 (&)[N]); + void emit(const UnicodeString&); + void emit(const Literal&); + void emit(const Key&); + void emit(const SelectorKeys&); + void emit(const Operand&); + void emit(const Reserved&); + void emit(const Expression&); + void emit(const PatternPart&); + void emit(const Pattern&); + void emit(const Variant*); + void emitAttributes(const OptionMap&); + void emit(const OptionMap&); + void serializeUnsupported(); + void serializeDeclarations(); + void serializeSelectors(); + void serializeVariants(); + }; // class Serializer + +} // namespace message2 + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_MF2 */ + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif /* U_SHOW_CPLUSPLUS_API */ + +#endif // MESSAGEFORMAT_SERIALIZER_H + +#endif // U_HIDE_DEPRECATED_API +// eof + diff --git a/contrib/libs/icu/i18n/msgfmt.cpp b/contrib/libs/icu/i18n/msgfmt.cpp index 29fb4b3a01..0413dc7465 100644 --- a/contrib/libs/icu/i18n/msgfmt.cpp +++ b/contrib/libs/icu/i18n/msgfmt.cpp @@ -1086,7 +1086,7 @@ void MessageFormat::format(int32_t msgStart, const void *plNumber, // that formats the number without subtracting the offset. appendTo.formatAndAppend(pluralNumber.formatter, *arg, success); } - } else if ((formatter = getCachedFormatter(i -2)) != 0) { + } else if ((formatter = getCachedFormatter(i - 2)) != nullptr) { // Handles all ArgType.SIMPLE, and formatters from setFormat() and its siblings. if (dynamic_cast<const ChoiceFormat*>(formatter) || dynamic_cast<const PluralFormat*>(formatter) || @@ -1983,7 +1983,7 @@ UnicodeString MessageFormat::PluralSelectorProvider::select(void *ctx, double nu return UnicodeString(false, OTHER_STRING, 5); } context.formatter->format(context.number, context.numberString, ec); - auto* decFmt = dynamic_cast<const DecimalFormat *>(context.formatter); + const auto* decFmt = dynamic_cast<const DecimalFormat*>(context.formatter); if(decFmt != nullptr) { number::impl::DecimalQuantity dq; decFmt->formatToDecimalQuantity(context.number, dq, ec); diff --git a/contrib/libs/icu/i18n/name2uni.h b/contrib/libs/icu/i18n/name2uni.h index 6881c6bc85..ba8fbc8239 100644 --- a/contrib/libs/icu/i18n/name2uni.h +++ b/contrib/libs/icu/i18n/name2uni.h @@ -33,7 +33,7 @@ public: * Constructs a transliterator. * @param adoptedFilter the filter for this transliterator. */ - NameUnicodeTransliterator(UnicodeFilter* adoptedFilter = 0); + NameUnicodeTransliterator(UnicodeFilter* adoptedFilter = nullptr); /** * Destructor. diff --git a/contrib/libs/icu/i18n/nfrule.cpp b/contrib/libs/icu/i18n/nfrule.cpp index 51bd4c974f..1c78e6b1a2 100644 --- a/contrib/libs/icu/i18n/nfrule.cpp +++ b/contrib/libs/icu/i18n/nfrule.cpp @@ -118,7 +118,7 @@ NFRule::makeRules(UnicodeString& description, // description string) NFRule* rule1 = new NFRule(rbnf, description, status); /* test for nullptr */ - if (rule1 == 0) { + if (rule1 == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return; } @@ -162,7 +162,7 @@ NFRule::makeRules(UnicodeString& description, // goes SECOND in the rule set's rule list) rule2 = new NFRule(rbnf, UnicodeString(), status); /* test for nullptr */ - if (rule2 == 0) { + if (rule2 == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return; } @@ -721,6 +721,14 @@ int64_t NFRule::getDivisor() const return util64_pow(radix, exponent); } +/** + * Internal function to facilitate numerical rounding. See the explanation in MultiplierSubstitution::transformNumber(). + */ +bool NFRule::hasModulusSubstitution() const +{ + return (sub1 != nullptr && sub1->isModulusSubstitution()) || (sub2 != nullptr && sub2->isModulusSubstitution()); +} + //----------------------------------------------------------------------- // formatting diff --git a/contrib/libs/icu/i18n/nfrule.h b/contrib/libs/icu/i18n/nfrule.h index fda74fabf2..2ae074cd86 100644 --- a/contrib/libs/icu/i18n/nfrule.h +++ b/contrib/libs/icu/i18n/nfrule.h @@ -66,6 +66,8 @@ public: char16_t getDecimalPoint() const { return decimalPoint; } int64_t getDivisor() const; + + bool hasModulusSubstitution() const; void doFormat(int64_t number, UnicodeString& toAppendTo, int32_t pos, int32_t recursionCount, UErrorCode& status) const; void doFormat(double number, UnicodeString& toAppendTo, int32_t pos, int32_t recursionCount, UErrorCode& status) const; @@ -117,6 +119,9 @@ private: NFRule(const NFRule &other); // forbid copying of this class NFRule &operator=(const NFRule &other); // forbid copying of this class + + // TODO: temporary hack to allow MultiplierSubstitution to get to formatter's rounding mode + friend class MultiplierSubstitution; }; U_NAMESPACE_END diff --git a/contrib/libs/icu/i18n/nfsubs.cpp b/contrib/libs/icu/i18n/nfsubs.cpp index 4f3247ce50..ecd3b7b68f 100644 --- a/contrib/libs/icu/i18n/nfsubs.cpp +++ b/contrib/libs/icu/i18n/nfsubs.cpp @@ -73,6 +73,7 @@ SameValueSubstitution::~SameValueSubstitution() {} class MultiplierSubstitution : public NFSubstitution { int64_t divisor; + const NFRule* owningRule; public: MultiplierSubstitution(int32_t _pos, @@ -80,7 +81,7 @@ public: const NFRuleSet* _ruleSet, const UnicodeString& description, UErrorCode& status) - : NFSubstitution(_pos, _ruleSet, description, status), divisor(rule->getDivisor()) + : NFSubstitution(_pos, _ruleSet, description, status), divisor(rule->getDivisor()), owningRule(rule) { if (divisor == 0) { status = U_PARSE_ERROR; @@ -103,7 +104,22 @@ public: } virtual double transformNumber(double number) const override { - if (getRuleSet()) { + // Most of the time, when a number is handled by an NFSubstitution, we do a floor() on it, but + // if a substitution uses a DecimalFormat to format the number instead of a ruleset, we generally + // don't want to do a floor()-- we want to keep the value intact so that the DecimalFormat can + // either include the fractional part or round properly. The big exception to this is here in + // MultiplierSubstitution. If the rule includes two substitutions, the MultiplierSubstitution + // (which is handling the larger part of the number) really _does_ want to do a floor(), because + // the ModulusSubstitution (which is handling the smaller part of the number) will take + // care of the fractional part. (Consider something like `1/12: <0< feet >0.0> inches;`.) + // But if there is no ModulusSubstitution, we're shortening the number in some way-- the "larger part" + // of the number is the only part we're keeping. Even if the DecimalFormat doesn't include the + // fractional part in its output, we still want it to round. (Consider something like `1/1000: <0<K;`.) + // (TODO: The kRoundFloor thing is a kludge to preserve the previous floor-always behavior. What we + // probably really want to do is just set the rounding mode on the DecimalFormat to match the rounding + // mode on the RuleBasedNumberFormat and then pass the number to it whole and let it do its own rounding. + // But before making that change, we'd have to make sure it didn't have undesirable side effects.) + if (getRuleSet() != nullptr || owningRule->hasModulusSubstitution() || owningRule->formatter->getRoundingMode() == NumberFormat::kRoundFloor) { return uprv_floor(number / divisor); } else { return number / divisor; @@ -580,17 +596,11 @@ NFSubstitution::doSubstitution(int64_t number, UnicodeString& toInsertInto, int3 ruleSet->format(transformNumber(number), toInsertInto, _pos + this->pos, recursionCount, status); } else if (numberFormat != nullptr) { if (number <= MAX_INT64_IN_DOUBLE) { - // or perform the transformation on the number (preserving - // the result's fractional part if the formatter it set - // to show it), then use that formatter's format() method + // or perform the transformation on the number, + // then use that formatter's format() method // to format the result - double numberToFormat = transformNumber((double)number); - if (numberFormat->getMaximumFractionDigits() == 0) { - numberToFormat = uprv_floor(numberToFormat); - } - UnicodeString temp; - numberFormat->format(numberToFormat, temp, status); + numberFormat->format(transformNumber((double)number), temp, status); toInsertInto.insert(_pos + this->pos, temp); } else { diff --git a/contrib/libs/icu/i18n/nortrans.cpp b/contrib/libs/icu/i18n/nortrans.cpp index d793433b3d..e2452cd37c 100644 --- a/contrib/libs/icu/i18n/nortrans.cpp +++ b/contrib/libs/icu/i18n/nortrans.cpp @@ -75,7 +75,7 @@ Transliterator* NormalizationTransliterator::_create(const UnicodeString& ID, */ NormalizationTransliterator::NormalizationTransliterator(const UnicodeString& id, const Normalizer2 &norm2) : - Transliterator(id, 0), fNorm2(norm2) {} + Transliterator(id, nullptr), fNorm2(norm2) {} /** * Destructor. diff --git a/contrib/libs/icu/i18n/nultrans.cpp b/contrib/libs/icu/i18n/nultrans.cpp index 439cc55d38..de128857e1 100644 --- a/contrib/libs/icu/i18n/nultrans.cpp +++ b/contrib/libs/icu/i18n/nultrans.cpp @@ -20,7 +20,7 @@ U_NAMESPACE_BEGIN UOBJECT_DEFINE_RTTI_IMPLEMENTATION(NullTransliterator) -NullTransliterator::NullTransliterator() : Transliterator(UNICODE_STRING_SIMPLE("Any-Null"), 0) {} +NullTransliterator::NullTransliterator() : Transliterator(UNICODE_STRING_SIMPLE("Any-Null"), nullptr) {} NullTransliterator::~NullTransliterator() {} diff --git a/contrib/libs/icu/i18n/number_affixutils.h b/contrib/libs/icu/i18n/number_affixutils.h index 5cfde61ffd..e59096546e 100644 --- a/contrib/libs/icu/i18n/number_affixutils.h +++ b/contrib/libs/icu/i18n/number_affixutils.h @@ -14,8 +14,8 @@ #include "formatted_string_builder.h" #include "unicode/uniset.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { +U_NAMESPACE_BEGIN +namespace number::impl { enum AffixPatternState { STATE_BASE = 0, @@ -234,8 +234,7 @@ class U_I18N_API AffixUtils { } }; -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END diff --git a/contrib/libs/icu/i18n/number_asformat.cpp b/contrib/libs/icu/i18n/number_asformat.cpp index 8f2314d689..aac765f3fb 100644 --- a/contrib/libs/icu/i18n/number_asformat.cpp +++ b/contrib/libs/icu/i18n/number_asformat.cpp @@ -33,7 +33,7 @@ LocalizedNumberFormatterAsFormat::LocalizedNumberFormatterAsFormat( LocalizedNumberFormatterAsFormat::~LocalizedNumberFormatterAsFormat() = default; bool LocalizedNumberFormatterAsFormat::operator==(const Format& other) const { - auto* _other = dynamic_cast<const LocalizedNumberFormatterAsFormat*>(&other); + const auto* _other = dynamic_cast<const LocalizedNumberFormatterAsFormat*>(&other); if (_other == nullptr) { return false; } diff --git a/contrib/libs/icu/i18n/number_asformat.h b/contrib/libs/icu/i18n/number_asformat.h index f921b42942..f447e0c4b0 100644 --- a/contrib/libs/icu/i18n/number_asformat.h +++ b/contrib/libs/icu/i18n/number_asformat.h @@ -18,8 +18,8 @@ #include "decNumber.h" #include "charstr.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { +U_NAMESPACE_BEGIN +namespace number::impl { /** * A wrapper around LocalizedNumberFormatter implementing the Format interface, enabling improved @@ -97,8 +97,7 @@ class U_I18N_API LocalizedNumberFormatterAsFormat : public Format { Locale fLocale; }; -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END #endif // __NUMBER_ASFORMAT_H__ diff --git a/contrib/libs/icu/i18n/number_capi.cpp b/contrib/libs/icu/i18n/number_capi.cpp index abada9ad86..b91a9760e2 100644 --- a/contrib/libs/icu/i18n/number_capi.cpp +++ b/contrib/libs/icu/i18n/number_capi.cpp @@ -25,8 +25,7 @@ using namespace icu::number::impl; U_NAMESPACE_BEGIN -namespace number { -namespace impl { +namespace number::impl { /** * Implementation class for UNumberFormatter. Wraps a LocalizedNumberFormatter. @@ -84,8 +83,7 @@ void UFormattedNumberImpl::setTo(FormattedNumber value) { fData = std::move(*value.fData); } -} -} +} // namespace number::impl U_NAMESPACE_END @@ -98,7 +96,7 @@ UPRV_FORMATTED_VALUE_CAPI_NO_IMPLTYPE_AUTO_IMPL( const DecimalQuantity* icu::number::impl::validateUFormattedNumberToDecimalQuantity( const UFormattedNumber* uresult, UErrorCode& status) { - auto* result = UFormattedNumberApiHelper::validate(uresult, status); + const auto* result = UFormattedNumberApiHelper::validate(uresult, status); if (U_FAILURE(status)) { return nullptr; } @@ -311,12 +309,17 @@ usnum_setMinimumFractionDigits(USimpleNumber* unumber, int32_t minimumFractionDi } U_CAPI void U_EXPORT2 -usnum_truncateStart(USimpleNumber* unumber, int32_t maximumIntegerDigits, UErrorCode* ec) { +usnum_setMaximumIntegerDigits(USimpleNumber* unumber, int32_t maximumIntegerDigits, UErrorCode* ec) { auto* number = USimpleNumberData::validate(unumber, *ec); if (U_FAILURE(*ec)) { return; } - number->fNumber.truncateStart(maximumIntegerDigits, *ec); + number->fNumber.setMaximumIntegerDigits(maximumIntegerDigits, *ec); +} + +U_CAPI void U_EXPORT2 +usnum_truncateStart(USimpleNumber* unumber, int32_t maximumIntegerDigits, UErrorCode* ec) { + usnum_setMaximumIntegerDigits(unumber, maximumIntegerDigits, ec); } U_CAPI void U_EXPORT2 @@ -357,7 +360,7 @@ usnumf_format( USimpleNumber* unumber, UFormattedNumber* uresult, UErrorCode* ec) { - auto* formatter = USimpleNumberFormatterData::validate(uformatter, *ec); + const auto* formatter = USimpleNumberFormatterData::validate(uformatter, *ec); auto* number = USimpleNumberData::validate(unumber, *ec); auto* result = UFormattedNumberApiHelper::validate(uresult, *ec); if (U_FAILURE(*ec)) { @@ -376,7 +379,7 @@ usnumf_formatInt64( int64_t value, UFormattedNumber* uresult, UErrorCode* ec) { - auto* formatter = USimpleNumberFormatterData::validate(uformatter, *ec); + const auto* formatter = USimpleNumberFormatterData::validate(uformatter, *ec); auto* result = UFormattedNumberApiHelper::validate(uresult, *ec); if (U_FAILURE(*ec)) { return; diff --git a/contrib/libs/icu/i18n/number_compact.cpp b/contrib/libs/icu/i18n/number_compact.cpp index 2cfa65a031..63180f213e 100644 --- a/contrib/libs/icu/i18n/number_compact.cpp +++ b/contrib/libs/icu/i18n/number_compact.cpp @@ -143,7 +143,7 @@ void CompactData::getUniquePatterns(UVector &output, UErrorCode &status) const { U_ASSERT(output.isEmpty()); // NOTE: In C++, this is done more manually with a UVector. // In Java, we can take advantage of JDK HashSet. - for (auto pattern : patterns) { + for (const auto* pattern : patterns) { if (pattern == nullptr || pattern == USE_FALLBACK) { continue; } @@ -279,7 +279,7 @@ void CompactHandler::precomputeAllModifiers(MutablePatternModifier &buildReferen } for (int32_t i = 0; i < precomputedModsLength; i++) { - auto patternString = static_cast<const char16_t *>(allPatterns[i]); + const auto* patternString = static_cast<const char16_t*>(allPatterns[i]); UnicodeString hello(patternString); CompactModInfo &info = precomputedMods[i]; ParsedPatternInfo patternInfo; diff --git a/contrib/libs/icu/i18n/number_compact.h b/contrib/libs/icu/i18n/number_compact.h index aee1df7452..95896c029a 100644 --- a/contrib/libs/icu/i18n/number_compact.h +++ b/contrib/libs/icu/i18n/number_compact.h @@ -14,8 +14,8 @@ #include "resource.h" #include "number_patternmodifier.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { +U_NAMESPACE_BEGIN +namespace number::impl { static const int32_t COMPACT_MAX_DIGITS = 20; @@ -90,9 +90,7 @@ class CompactHandler : public MicroPropsGenerator, public UMemory { void precomputeAllModifiers(MutablePatternModifier &buildReference, UErrorCode &status); }; - -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END #endif //__NUMBER_COMPACT_H__ diff --git a/contrib/libs/icu/i18n/number_currencysymbols.cpp b/contrib/libs/icu/i18n/number_currencysymbols.cpp index 8d5127556b..7687efbbc7 100644 --- a/contrib/libs/icu/i18n/number_currencysymbols.cpp +++ b/contrib/libs/icu/i18n/number_currencysymbols.cpp @@ -126,7 +126,7 @@ icu::number::impl::resolveCurrency(const DecimalFormatProperties& properties, co return CurrencyUnit(buf, status); } else { // Default currency (XXX) - return CurrencyUnit(); + return {}; } } } diff --git a/contrib/libs/icu/i18n/number_currencysymbols.h b/contrib/libs/icu/i18n/number_currencysymbols.h index c2223bd0f0..13b9a9691b 100644 --- a/contrib/libs/icu/i18n/number_currencysymbols.h +++ b/contrib/libs/icu/i18n/number_currencysymbols.h @@ -11,9 +11,8 @@ #include "charstr.h" #include "number_decimfmtprops.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { - +U_NAMESPACE_BEGIN +namespace number::impl { // Exported as U_I18N_API for tests class U_I18N_API CurrencySymbols : public UMemory { @@ -62,9 +61,7 @@ class U_I18N_API CurrencySymbols : public UMemory { CurrencyUnit resolveCurrency(const DecimalFormatProperties& properties, const Locale& locale, UErrorCode& status); - -} // namespace impl -} // namespace numparse +} // namespace number::impl U_NAMESPACE_END #endif //__SOURCE_NUMBER_CURRENCYSYMBOLS_H__ diff --git a/contrib/libs/icu/i18n/number_decimalquantity.cpp b/contrib/libs/icu/i18n/number_decimalquantity.cpp index 659465d087..227ead4e20 100644 --- a/contrib/libs/icu/i18n/number_decimalquantity.cpp +++ b/contrib/libs/icu/i18n/number_decimalquantity.cpp @@ -44,7 +44,7 @@ inline int32_t safeSubtract(int32_t a, int32_t b) { return diff; } -static double DOUBLE_MULTIPLIERS[] = { +double DOUBLE_MULTIPLIERS[] = { 1e0, 1e1, 1e2, @@ -131,18 +131,24 @@ void DecimalQuantity::clear() { setBcdToZero(); // sets scale, precision, hasDouble, origDouble, origDelta, and BCD data } -void DecimalQuantity::setMinInteger(int32_t minInt) { +void DecimalQuantity::decreaseMinIntegerTo(int32_t minInt) { + // Validation should happen outside of DecimalQuantity, e.g., in the Precision class. + U_ASSERT(minInt >= 0); + + if (lReqPos > minInt) { + lReqPos = minInt; + } +} + +void DecimalQuantity::increaseMinIntegerTo(int32_t minInt) { // Validation should happen outside of DecimalQuantity, e.g., in the Precision class. U_ASSERT(minInt >= 0); // Special behavior: do not set minInt to be less than what is already set. // This is so significant digits rounding can set the integer length. - if (minInt < lReqPos) { - minInt = lReqPos; + if (lReqPos < minInt) { + lReqPos = minInt; } - - // Save values into internal state - lReqPos = minInt; } void DecimalQuantity::setMinFraction(int32_t minFrac) { @@ -1322,7 +1328,7 @@ void DecimalQuantity::ensureCapacity(int32_t capacity) { // Initialize the byte array to zeros (this is done automatically in Java) uprv_memset(fBCD.bcdBytes.ptr, 0, capacity * sizeof(int8_t)); } else if (oldCapacity < capacity) { - auto bcd1 = static_cast<int8_t*>(uprv_malloc(capacity * 2 * sizeof(int8_t))); + auto* bcd1 = static_cast<int8_t*>(uprv_malloc(capacity * 2 * sizeof(int8_t))); uprv_memcpy(bcd1, fBCD.bcdBytes.ptr, oldCapacity * sizeof(int8_t)); // Initialize the rest of the byte array to zeros (this is done automatically in Java) uprv_memset(bcd1 + oldCapacity, 0, (capacity - oldCapacity) * sizeof(int8_t)); diff --git a/contrib/libs/icu/i18n/number_decimalquantity.h b/contrib/libs/icu/i18n/number_decimalquantity.h index 2211fe9c19..2303186c6d 100644 --- a/contrib/libs/icu/i18n/number_decimalquantity.h +++ b/contrib/libs/icu/i18n/number_decimalquantity.h @@ -13,8 +13,8 @@ #include "plurrule_impl.h" #include "number_types.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { +U_NAMESPACE_BEGIN +namespace number::impl { // Forward-declare (maybe don't want number_utils.h included here): class DecNum; @@ -53,12 +53,20 @@ class U_I18N_API DecimalQuantity : public IFixedDecimal, public UMemory { DecimalQuantity &operator=(DecimalQuantity&& src) noexcept; /** + * If the minimum integer digits are greater than `minInt`, + * sets it to `minInt`. + * + * @param minInt The minimum number of integer digits. + */ + void decreaseMinIntegerTo(int32_t minInt); + + /** * Sets the minimum integer digits that this {@link DecimalQuantity} should generate. * This method does not perform rounding. * * @param minInt The minimum number of integer digits. */ - void setMinInteger(int32_t minInt); + void increaseMinIntegerTo(int32_t minInt); /** * Sets the minimum fraction digits that this {@link DecimalQuantity} should generate. @@ -549,8 +557,7 @@ class U_I18N_API DecimalQuantity : public IFixedDecimal, public UMemory { void switchStorage(); }; -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END diff --git a/contrib/libs/icu/i18n/number_decimfmtprops.h b/contrib/libs/icu/i18n/number_decimfmtprops.h index 5f72f64984..6cf4b4c108 100644 --- a/contrib/libs/icu/i18n/number_decimfmtprops.h +++ b/contrib/libs/icu/i18n/number_decimfmtprops.h @@ -33,8 +33,7 @@ template class U_I18N_API LocalPointer<CurrencyPluralInfo>; #endif #endif -namespace number { -namespace impl { +namespace number::impl { // Exported as U_I18N_API because it is a public member field of exported DecimalFormatProperties // Using this wrapper is rather unfortunate, but is needed on Windows platforms in order to allow @@ -166,8 +165,8 @@ struct U_I18N_API DecimalFormatProperties : public UMemory { bool _equals(const DecimalFormatProperties& other, bool ignoreForFastFormat) const; }; -} // namespace impl -} // namespace number +} // namespace number::impl + U_NAMESPACE_END diff --git a/contrib/libs/icu/i18n/number_decnum.h b/contrib/libs/icu/i18n/number_decnum.h index 94a0b31bcb..2bf9fd39cd 100644 --- a/contrib/libs/icu/i18n/number_decnum.h +++ b/contrib/libs/icu/i18n/number_decnum.h @@ -22,8 +22,7 @@ U_NAMESPACE_BEGIN template class U_I18N_API MaybeStackHeaderAndArray<decNumber, char, DECNUM_INITIAL_CAPACITY>; #endif -namespace number { -namespace impl { +namespace number::impl { /** A very thin C++ wrapper around decNumber.h */ // Exported as U_I18N_API for tests @@ -84,8 +83,7 @@ class U_I18N_API DecNum : public UMemory { void _setTo(const char* str, int32_t maxDigits, UErrorCode& status); }; -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END diff --git a/contrib/libs/icu/i18n/number_fluent.cpp b/contrib/libs/icu/i18n/number_fluent.cpp index 45d6b06c6d..0ce01c854c 100644 --- a/contrib/libs/icu/i18n/number_fluent.cpp +++ b/contrib/libs/icu/i18n/number_fluent.cpp @@ -430,6 +430,14 @@ UnlocalizedNumberFormatter::UnlocalizedNumberFormatter(const NFS<UNF>& other) // No additional fields to assign } +UnlocalizedNumberFormatter::UnlocalizedNumberFormatter(const impl::MacroProps ¯os) { + fMacros = macros; +} + +UnlocalizedNumberFormatter::UnlocalizedNumberFormatter(impl::MacroProps &¯os) { + fMacros = macros; +} + // Make default copy constructor call the NumberFormatterSettings copy constructor. UnlocalizedNumberFormatter::UnlocalizedNumberFormatter(UNF&& src) noexcept : UNF(static_cast<NFS<UNF>&&>(src)) {} @@ -565,7 +573,7 @@ LocalizedNumberFormatter UnlocalizedNumberFormatter::locale(const Locale& locale FormattedNumber LocalizedNumberFormatter::formatInt(int64_t value, UErrorCode& status) const { if (U_FAILURE(status)) { return FormattedNumber(U_ILLEGAL_ARGUMENT_ERROR); } - auto results = new UFormattedNumberData(); + auto* results = new UFormattedNumberData(); if (results == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return FormattedNumber(status); @@ -584,7 +592,7 @@ FormattedNumber LocalizedNumberFormatter::formatInt(int64_t value, UErrorCode& s FormattedNumber LocalizedNumberFormatter::formatDouble(double value, UErrorCode& status) const { if (U_FAILURE(status)) { return FormattedNumber(U_ILLEGAL_ARGUMENT_ERROR); } - auto results = new UFormattedNumberData(); + auto* results = new UFormattedNumberData(); if (results == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return FormattedNumber(status); @@ -603,7 +611,7 @@ FormattedNumber LocalizedNumberFormatter::formatDouble(double value, UErrorCode& FormattedNumber LocalizedNumberFormatter::formatDecimal(StringPiece value, UErrorCode& status) const { if (U_FAILURE(status)) { return FormattedNumber(U_ILLEGAL_ARGUMENT_ERROR); } - auto results = new UFormattedNumberData(); + auto* results = new UFormattedNumberData(); if (results == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return FormattedNumber(status); @@ -623,7 +631,7 @@ FormattedNumber LocalizedNumberFormatter::formatDecimal(StringPiece value, UErro FormattedNumber LocalizedNumberFormatter::formatDecimalQuantity(const DecimalQuantity& dq, UErrorCode& status) const { if (U_FAILURE(status)) { return FormattedNumber(U_ILLEGAL_ARGUMENT_ERROR); } - auto results = new UFormattedNumberData(); + auto* results = new UFormattedNumberData(); if (results == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return FormattedNumber(status); @@ -726,6 +734,18 @@ int32_t LocalizedNumberFormatter::getCallCount() const { // Note: toFormat defined in number_asformat.cpp +UnlocalizedNumberFormatter LocalizedNumberFormatter::withoutLocale() const & { + MacroProps macros(fMacros); + macros.locale = Locale(); + return UnlocalizedNumberFormatter(macros); +} + +UnlocalizedNumberFormatter LocalizedNumberFormatter::withoutLocale() && { + MacroProps macros(std::move(fMacros)); + macros.locale = Locale(); + return UnlocalizedNumberFormatter(std::move(macros)); +} + const DecimalFormatSymbols* LocalizedNumberFormatter::getDecimalFormatSymbols() const { return fMacros.symbols.getDecimalFormatSymbols(); } diff --git a/contrib/libs/icu/i18n/number_formatimpl.cpp b/contrib/libs/icu/i18n/number_formatimpl.cpp index 53bac49a55..45baa94615 100644 --- a/contrib/libs/icu/i18n/number_formatimpl.cpp +++ b/contrib/libs/icu/i18n/number_formatimpl.cpp @@ -229,7 +229,7 @@ NumberFormatterImpl::macrosToMicroGenerator(const MacroProps& macros, bool safe, return nullptr; } } - auto patternInfo = new ParsedPatternInfo(); + auto* patternInfo = new ParsedPatternInfo(); if (patternInfo == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return nullptr; @@ -252,12 +252,12 @@ NumberFormatterImpl::macrosToMicroGenerator(const MacroProps& macros, bool safe, status = U_ILLEGAL_ARGUMENT_ERROR; return nullptr; } - auto usagePrefsHandler = + auto* usagePrefsHandler = new UsagePrefsHandler(macros.locale, macros.unit, macros.usage.fValue, chain, status); fUsagePrefsHandler.adoptInsteadAndCheckErrorCode(usagePrefsHandler, status); chain = fUsagePrefsHandler.getAlias(); } else if (isMixedUnit) { - auto unitConversionHandler = new UnitConversionHandler(macros.unit, chain, status); + auto* unitConversionHandler = new UnitConversionHandler(macros.unit, chain, status); fUnitConversionHandler.adoptInsteadAndCheckErrorCode(unitConversionHandler, status); chain = fUnitConversionHandler.getAlias(); } @@ -333,7 +333,8 @@ NumberFormatterImpl::macrosToMicroGenerator(const MacroProps& macros, bool safe, // Inner modifier (scientific notation) if (macros.notation.fType == Notation::NTN_SCIENTIFIC) { - auto newScientificHandler = new ScientificHandler(¯os.notation, fMicros.simple.symbols, chain); + auto* newScientificHandler = + new ScientificHandler(¯os.notation, fMicros.simple.symbols, chain); if (newScientificHandler == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return nullptr; @@ -346,7 +347,7 @@ NumberFormatterImpl::macrosToMicroGenerator(const MacroProps& macros, bool safe, } // Middle modifier (patterns, positive/negative, currency symbols, percent) - auto patternModifier = new MutablePatternModifier(false); + auto* patternModifier = new MutablePatternModifier(false); if (patternModifier == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return nullptr; @@ -444,7 +445,7 @@ NumberFormatterImpl::macrosToMicroGenerator(const MacroProps& macros, bool safe, if (isCompactNotation) { CompactType compactType = (isCurrency && unitWidth != UNUM_UNIT_WIDTH_FULL_NAME) ? CompactType::TYPE_CURRENCY : CompactType::TYPE_DECIMAL; - auto newCompactHandler = new CompactHandler( + auto* newCompactHandler = new CompactHandler( macros.notation.fUnion.compactStyle, macros.locale, nsName, diff --git a/contrib/libs/icu/i18n/number_formatimpl.h b/contrib/libs/icu/i18n/number_formatimpl.h index 62d5321261..ba979d8bdc 100644 --- a/contrib/libs/icu/i18n/number_formatimpl.h +++ b/contrib/libs/icu/i18n/number_formatimpl.h @@ -18,8 +18,8 @@ #include "number_microprops.h" #include "number_utypes.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { +U_NAMESPACE_BEGIN +namespace number::impl { /** * This is the "brain" of the number formatting pipeline. It ties all the pieces together, taking in a MacroProps and a @@ -170,8 +170,7 @@ class NumberFormatterImpl : public UMemory { UErrorCode &status); }; -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END diff --git a/contrib/libs/icu/i18n/number_integerwidth.cpp b/contrib/libs/icu/i18n/number_integerwidth.cpp index 10b853423c..a0fc2b192f 100644 --- a/contrib/libs/icu/i18n/number_integerwidth.cpp +++ b/contrib/libs/icu/i18n/number_integerwidth.cpp @@ -46,14 +46,14 @@ void IntegerWidth::apply(impl::DecimalQuantity& quantity, UErrorCode& status) co if (fHasError) { status = U_ILLEGAL_ARGUMENT_ERROR; } else if (fUnion.minMaxInt.fMaxInt == -1) { - quantity.setMinInteger(fUnion.minMaxInt.fMinInt); + quantity.increaseMinIntegerTo(fUnion.minMaxInt.fMinInt); } else { // Enforce the backwards-compatibility feature "FormatFailIfMoreThanMaxDigits" if (fUnion.minMaxInt.fFormatFailIfMoreThanMaxDigits && fUnion.minMaxInt.fMaxInt < quantity.getMagnitude()) { status = U_ILLEGAL_ARGUMENT_ERROR; } - quantity.setMinInteger(fUnion.minMaxInt.fMinInt); + quantity.increaseMinIntegerTo(fUnion.minMaxInt.fMinInt); quantity.applyMaxInteger(fUnion.minMaxInt.fMaxInt); } } diff --git a/contrib/libs/icu/i18n/number_longnames.cpp b/contrib/libs/icu/i18n/number_longnames.cpp index 96c6ca6bf8..4ef4efd701 100644 --- a/contrib/libs/icu/i18n/number_longnames.cpp +++ b/contrib/libs/icu/i18n/number_longnames.cpp @@ -89,7 +89,7 @@ const char *getGenderString(UnicodeString uGender, UErrorCode status) { } // Returns the array index that corresponds to the given pluralKeyword. -static int32_t getIndex(const char* pluralKeyword, UErrorCode& status) { +int32_t getIndex(const char* pluralKeyword, UErrorCode& status) { // pluralKeyword can also be "dnam", "per", or "gender" switch (*pluralKeyword) { case 'd': @@ -119,7 +119,7 @@ static int32_t getIndex(const char* pluralKeyword, UErrorCode& status) { // // The `strings` array must have ARRAY_LENGTH items: one corresponding to each // of the plural forms, plus a display name ("dnam") and a "per" form. -static UnicodeString getWithPlural( +UnicodeString getWithPlural( const UnicodeString* strings, StandardPlural::Form plural, UErrorCode& status) { diff --git a/contrib/libs/icu/i18n/number_longnames.h b/contrib/libs/icu/i18n/number_longnames.h index 56d8c9b24e..ef1ce74104 100644 --- a/contrib/libs/icu/i18n/number_longnames.h +++ b/contrib/libs/icu/i18n/number_longnames.h @@ -13,8 +13,8 @@ #include "number_utils.h" #include "number_modifiers.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { +U_NAMESPACE_BEGIN +namespace number::impl { // LongNameHandler takes care of formatting currency and measurement unit names, // as well as populating the gender of measure units. @@ -263,8 +263,7 @@ class LongNameMultiplexer : public MicroPropsGenerator, public UMemory { } }; -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END #endif //__NUMBER_LONGNAMES_H__ diff --git a/contrib/libs/icu/i18n/number_mapper.h b/contrib/libs/icu/i18n/number_mapper.h index c01607e568..fc5617cb46 100644 --- a/contrib/libs/icu/i18n/number_mapper.h +++ b/contrib/libs/icu/i18n/number_mapper.h @@ -16,9 +16,7 @@ #include "numparse_impl.h" U_NAMESPACE_BEGIN -namespace number { -namespace impl { - +namespace number::impl { class AutoAffixPatternProvider; class CurrencyPluralInfoAffixProvider; @@ -142,9 +140,9 @@ class AutoAffixPatternProvider { } inline void setTo(const AffixPatternProvider* provider, UErrorCode& status) { - if (auto ptr = dynamic_cast<const PropertiesAffixPatternProvider*>(provider)) { + if (const auto* ptr = dynamic_cast<const PropertiesAffixPatternProvider*>(provider)) { propertiesAPP = *ptr; - } else if (auto ptr = dynamic_cast<const CurrencyPluralInfoAffixProvider*>(provider)) { + } else if (const auto* ptr = dynamic_cast<const CurrencyPluralInfoAffixProvider*>(provider)) { currencyPluralInfoAPP = *ptr; } else { status = U_INTERNAL_PROGRAM_ERROR; @@ -257,9 +255,7 @@ class NumberPropertyMapper { DecimalFormatProperties* exportedProperties, UErrorCode& status); }; - -} // namespace impl -} // namespace numparse +} // namespace number::impl U_NAMESPACE_END #endif //__NUMBER_MAPPER_H__ diff --git a/contrib/libs/icu/i18n/number_microprops.h b/contrib/libs/icu/i18n/number_microprops.h index 18addaae08..6d58bc3c36 100644 --- a/contrib/libs/icu/i18n/number_microprops.h +++ b/contrib/libs/icu/i18n/number_microprops.h @@ -20,8 +20,8 @@ #include "charstr.h" #include "util.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { +U_NAMESPACE_BEGIN +namespace number::impl { /** * A copyable container for the integer values of mixed unit measurements. @@ -188,8 +188,7 @@ struct MicroProps : public MicroPropsGenerator { bool exhausted = false; }; -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END #endif // __NUMBER_MICROPROPS_H__ diff --git a/contrib/libs/icu/i18n/number_modifiers.cpp b/contrib/libs/icu/i18n/number_modifiers.cpp index 0f6fdafb09..9982a715ba 100644 --- a/contrib/libs/icu/i18n/number_modifiers.cpp +++ b/contrib/libs/icu/i18n/number_modifiers.cpp @@ -60,6 +60,41 @@ Modifier::Parameters::Parameters( const ModifierStore* _obj, Signum _signum, StandardPlural::Form _plural) : obj(_obj), signum(_signum), plural(_plural) {} +bool Modifier::semanticallyEquivalent(const Modifier& other) const { + Parameters paramsThis; + Parameters paramsOther; + getParameters(paramsThis); + other.getParameters(paramsOther); + if (paramsThis.obj == nullptr && paramsOther.obj == nullptr) { + return strictEquals(other); + } else if (paramsThis.obj == nullptr || paramsOther.obj == nullptr) { + return false; + } + for (size_t i=0; i<SIGNUM_COUNT; i++) { + auto signum = static_cast<Signum>(i); + for (size_t j=0; j<StandardPlural::COUNT; j++) { + auto plural = static_cast<StandardPlural::Form>(j); + const auto* mod1 = paramsThis.obj->getModifier(signum, plural); + const auto* mod2 = paramsOther.obj->getModifier(signum, plural); + if (mod1 == mod2) { + // Equal pointers + continue; + } else if (mod1 == nullptr || mod2 == nullptr) { + // One pointer is null but not the other + return false; + } else if (!mod1->strictEquals(*mod2)) { + // The modifiers are NOT equivalent + return false; + } else { + // The modifiers are equivalent + continue; + } + } + } + return true; +} + + ModifierStore::~ModifierStore() = default; AdoptingSignumModifierStore::~AdoptingSignumModifierStore() { @@ -110,8 +145,8 @@ void ConstantAffixModifier::getParameters(Parameters& output) const { UPRV_UNREACHABLE_EXIT; } -bool ConstantAffixModifier::semanticallyEquivalent(const Modifier& other) const { - auto* _other = dynamic_cast<const ConstantAffixModifier*>(&other); +bool ConstantAffixModifier::strictEquals(const Modifier& other) const { + const auto* _other = dynamic_cast<const ConstantAffixModifier*>(&other); if (_other == nullptr) { return false; } @@ -197,14 +232,11 @@ void SimpleModifier::getParameters(Parameters& output) const { output = fParameters; } -bool SimpleModifier::semanticallyEquivalent(const Modifier& other) const { - auto* _other = dynamic_cast<const SimpleModifier*>(&other); +bool SimpleModifier::strictEquals(const Modifier& other) const { + const auto* _other = dynamic_cast<const SimpleModifier*>(&other); if (_other == nullptr) { return false; } - if (fParameters.obj != nullptr) { - return fParameters.obj == _other->fParameters.obj; - } return fCompiledPattern == _other->fCompiledPattern && fField == _other->fField && fStrong == _other->fStrong; @@ -327,14 +359,11 @@ void ConstantMultiFieldModifier::getParameters(Parameters& output) const { output = fParameters; } -bool ConstantMultiFieldModifier::semanticallyEquivalent(const Modifier& other) const { - auto* _other = dynamic_cast<const ConstantMultiFieldModifier*>(&other); +bool ConstantMultiFieldModifier::strictEquals(const Modifier& other) const { + const auto* _other = dynamic_cast<const ConstantMultiFieldModifier*>(&other); if (_other == nullptr) { return false; } - if (fParameters.obj != nullptr) { - return fParameters.obj == _other->fParameters.obj; - } return fPrefix.contentEquals(_other->fPrefix) && fSuffix.contentEquals(_other->fSuffix) && fOverwrite == _other->fOverwrite @@ -469,7 +498,7 @@ CurrencySpacingEnabledModifier::getUnicodeSet(const DecimalFormatSymbols &symbol // Ensure the static defaults are initialized: umtx_initOnce(gDefaultCurrencySpacingInitOnce, &initDefaultCurrencySpacing, status); if (U_FAILURE(status)) { - return UnicodeSet(); + return {}; } const UnicodeString& pattern = symbols.getPatternForCurrencySpacing( diff --git a/contrib/libs/icu/i18n/number_modifiers.h b/contrib/libs/icu/i18n/number_modifiers.h index da6956bcfb..1afee495de 100644 --- a/contrib/libs/icu/i18n/number_modifiers.h +++ b/contrib/libs/icu/i18n/number_modifiers.h @@ -15,8 +15,8 @@ #include "formatted_string_builder.h" #include "number_types.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { +U_NAMESPACE_BEGIN +namespace number::impl { /** * The canonical implementation of {@link Modifier}, containing a prefix and suffix string. @@ -41,7 +41,7 @@ class U_I18N_API ConstantAffixModifier : public Modifier, public UObject { void getParameters(Parameters& output) const override; - bool semanticallyEquivalent(const Modifier& other) const override; + bool strictEquals(const Modifier& other) const override; private: UnicodeString fPrefix; @@ -77,7 +77,7 @@ class U_I18N_API SimpleModifier : public Modifier, public UMemory { void getParameters(Parameters& output) const override; - bool semanticallyEquivalent(const Modifier& other) const override; + bool strictEquals(const Modifier& other) const override; /** * TODO: This belongs in SimpleFormatterImpl. The only reason I haven't moved it there yet is because @@ -170,7 +170,7 @@ class U_I18N_API ConstantMultiFieldModifier : public Modifier, public UMemory { void getParameters(Parameters& output) const override; - bool semanticallyEquivalent(const Modifier& other) const override; + bool strictEquals(const Modifier& other) const override; protected: // NOTE: In Java, these are stored as array pointers. In C++, the FormattedStringBuilder is stored by @@ -264,7 +264,7 @@ class U_I18N_API EmptyModifier : public Modifier, public UMemory { output.obj = nullptr; } - bool semanticallyEquivalent(const Modifier& other) const override { + bool strictEquals(const Modifier& other) const override { return other.getCodePointCount() == 0; } @@ -350,8 +350,7 @@ class U_I18N_API AdoptingModifierStore : public ModifierStore, public UMemory { AdoptingSignumModifierStore mods[StandardPlural::COUNT] = {}; }; -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END diff --git a/contrib/libs/icu/i18n/number_multiplier.cpp b/contrib/libs/icu/i18n/number_multiplier.cpp index dd5b3f8e06..e6bc2a1e38 100644 --- a/contrib/libs/icu/i18n/number_multiplier.cpp +++ b/contrib/libs/icu/i18n/number_multiplier.cpp @@ -66,9 +66,7 @@ Scale::Scale(Scale&& src) noexcept Scale& Scale::operator=(Scale&& src) noexcept { fMagnitude = src.fMagnitude; - if (fArbitrary != nullptr) { - delete fArbitrary; - } + delete fArbitrary; fArbitrary = src.fArbitrary; fError = src.fError; // Take ownership away from src if necessary diff --git a/contrib/libs/icu/i18n/number_multiplier.h b/contrib/libs/icu/i18n/number_multiplier.h index c752935b78..62b04778e8 100644 --- a/contrib/libs/icu/i18n/number_multiplier.h +++ b/contrib/libs/icu/i18n/number_multiplier.h @@ -10,9 +10,8 @@ #include "numparse_types.h" #include "number_decimfmtprops.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { - +U_NAMESPACE_BEGIN +namespace number::impl { /** * Wraps a {@link Multiplier} for use in the number formatting pipeline. @@ -48,9 +47,7 @@ static inline Scale scaleFromProperties(const DecimalFormatProperties& propertie } } - -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END #endif //__SOURCE_NUMBER_MULTIPLIER_H__ diff --git a/contrib/libs/icu/i18n/number_patternmodifier.cpp b/contrib/libs/icu/i18n/number_patternmodifier.cpp index 6f398c6acf..a5a2155709 100644 --- a/contrib/libs/icu/i18n/number_patternmodifier.cpp +++ b/contrib/libs/icu/i18n/number_patternmodifier.cpp @@ -85,7 +85,7 @@ ImmutablePatternModifier* MutablePatternModifier::createImmutable(UErrorCode& st StandardPlural::Form::MANY, StandardPlural::Form::OTHER}; - auto pm = new AdoptingModifierStore(); + auto* pm = new AdoptingModifierStore(); if (pm == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return nullptr; @@ -176,7 +176,7 @@ void MutablePatternModifier::processQuantity(DecimalQuantity& fq, MicroProps& mi } // The unsafe code path performs self-mutation, so we need a const_cast. // This method needs to be const because it overrides a const method in the parent class. - auto nonConstThis = const_cast<MutablePatternModifier*>(this); + auto* nonConstThis = const_cast<MutablePatternModifier*>(this); if (needsPlurals()) { StandardPlural::Form pluralForm = utils::getPluralSafe(micros.rounder, fRules, fq, status); nonConstThis->setNumberProperties(fq.signum(), pluralForm); @@ -190,7 +190,7 @@ int32_t MutablePatternModifier::apply(FormattedStringBuilder& output, int32_t le UErrorCode& status) const { // The unsafe code path performs self-mutation, so we need a const_cast. // This method needs to be const because it overrides a const method in the parent class. - auto nonConstThis = const_cast<MutablePatternModifier*>(this); + auto* nonConstThis = const_cast<MutablePatternModifier*>(this); int32_t prefixLen = nonConstThis->insertPrefix(output, leftIndex, status); int32_t suffixLen = nonConstThis->insertSuffix(output, rightIndex + prefixLen, status); // If the pattern had no decimal stem body (like #,##0.00), overwrite the value. @@ -219,7 +219,7 @@ int32_t MutablePatternModifier::apply(FormattedStringBuilder& output, int32_t le int32_t MutablePatternModifier::getPrefixLength() const { // The unsafe code path performs self-mutation, so we need a const_cast. // This method needs to be const because it overrides a const method in the parent class. - auto nonConstThis = const_cast<MutablePatternModifier*>(this); + auto* nonConstThis = const_cast<MutablePatternModifier*>(this); // Enter and exit CharSequence Mode to get the length. UErrorCode status = U_ZERO_ERROR; // status fails only with an iilegal argument exception @@ -231,7 +231,7 @@ int32_t MutablePatternModifier::getPrefixLength() const { int32_t MutablePatternModifier::getCodePointCount() const { // The unsafe code path performs self-mutation, so we need a const_cast. // This method needs to be const because it overrides a const method in the parent class. - auto nonConstThis = const_cast<MutablePatternModifier*>(this); + auto* nonConstThis = const_cast<MutablePatternModifier*>(this); // Render the affixes to get the length UErrorCode status = U_ZERO_ERROR; // status fails only with an iilegal argument exception @@ -258,7 +258,7 @@ void MutablePatternModifier::getParameters(Parameters& output) const { UPRV_UNREACHABLE_EXIT; } -bool MutablePatternModifier::semanticallyEquivalent(const Modifier& other) const { +bool MutablePatternModifier::strictEquals(const Modifier& other) const { (void)other; // This method is not currently used. UPRV_UNREACHABLE_EXIT; @@ -334,7 +334,7 @@ UnicodeString MutablePatternModifier::getCurrencySymbolForUnitWidth(UErrorCode& case UNumberUnitWidth::UNUM_UNIT_WIDTH_VARIANT: return fCurrencySymbols.getVariantCurrencySymbol(status); case UNumberUnitWidth::UNUM_UNIT_WIDTH_HIDDEN: - return UnicodeString(); + return {}; default: return fCurrencySymbols.getCurrencySymbol(status); } diff --git a/contrib/libs/icu/i18n/number_patternmodifier.h b/contrib/libs/icu/i18n/number_patternmodifier.h index ee38c20c9c..4cae160049 100644 --- a/contrib/libs/icu/i18n/number_patternmodifier.h +++ b/contrib/libs/icu/i18n/number_patternmodifier.h @@ -33,8 +33,7 @@ template class U_I18N_API LocalPointer<number::impl::AdoptingModifierStore>; #endif #endif -namespace number { -namespace impl { +namespace number::impl { // Forward declaration class MutablePatternModifier; @@ -191,7 +190,7 @@ class U_I18N_API MutablePatternModifier void getParameters(Parameters& output) const override; - bool semanticallyEquivalent(const Modifier& other) const override; + bool strictEquals(const Modifier& other) const override; /** * Returns the string that substitutes a given symbol type in a pattern. @@ -255,9 +254,8 @@ class U_I18N_API MutablePatternModifier void prepareAffix(bool isPrefix); }; +} // namespace number::impl -} // namespace impl -} // namespace number U_NAMESPACE_END #endif //__NUMBER_PATTERNMODIFIER_H__ diff --git a/contrib/libs/icu/i18n/number_patternstring.cpp b/contrib/libs/icu/i18n/number_patternstring.cpp index aa082be5a8..75e5062082 100644 --- a/contrib/libs/icu/i18n/number_patternstring.cpp +++ b/contrib/libs/icu/i18n/number_patternstring.cpp @@ -66,7 +66,7 @@ int32_t ParsedPatternInfo::getLengthFromEndpoints(const Endpoints& endpoints) { UnicodeString ParsedPatternInfo::getString(int32_t flags) const { const Endpoints& endpoints = getEndpoints(flags); if (endpoints.start == endpoints.end) { - return UnicodeString(); + return {}; } // Create a new UnicodeString return UnicodeString(pattern, endpoints.start, endpoints.end - endpoints.start); @@ -768,7 +768,7 @@ UnicodeString PatternStringUtils::propertiesToPatternString(const DecimalFormatP incrementQuantity.roundToInfinity(); digitsStringScale = incrementQuantity.getLowerDisplayMagnitude(); incrementQuantity.adjustMagnitude(-digitsStringScale); - incrementQuantity.setMinInteger(minInt - digitsStringScale); + incrementQuantity.increaseMinIntegerTo(minInt - digitsStringScale); UnicodeString str = incrementQuantity.toPlainString(); if (str.charAt(0) == u'-') { // TODO: Unsupported operation exception or fail silently? diff --git a/contrib/libs/icu/i18n/number_patternstring.h b/contrib/libs/icu/i18n/number_patternstring.h index 989d0d3464..2b3ab02be0 100644 --- a/contrib/libs/icu/i18n/number_patternstring.h +++ b/contrib/libs/icu/i18n/number_patternstring.h @@ -16,8 +16,8 @@ #include "number_decimfmtprops.h" #include "number_affixutils.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { +U_NAMESPACE_BEGIN +namespace number::impl { // Forward declaration class PatternParser; @@ -330,8 +330,7 @@ class U_I18N_API PatternStringUtils { UErrorCode& status); }; -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END diff --git a/contrib/libs/icu/i18n/number_rounding.cpp b/contrib/libs/icu/i18n/number_rounding.cpp index e6bb509ffd..8f1aa453ad 100644 --- a/contrib/libs/icu/i18n/number_rounding.cpp +++ b/contrib/libs/icu/i18n/number_rounding.cpp @@ -437,7 +437,7 @@ void RoundingImpl::apply(impl::DecimalQuantity &value, UErrorCode& status) const uprv_max(0, -getDisplayMagnitudeSignificant(value, fPrecision.fUnion.fracSig.fMinSig)); // Make sure that digits are displayed on zero. if (value.isZeroish() && fPrecision.fUnion.fracSig.fMinSig > 0) { - value.setMinInteger(1); + value.increaseMinIntegerTo(1); } break; diff --git a/contrib/libs/icu/i18n/number_roundingutils.h b/contrib/libs/icu/i18n/number_roundingutils.h index 6657127254..08c62dd6ae 100644 --- a/contrib/libs/icu/i18n/number_roundingutils.h +++ b/contrib/libs/icu/i18n/number_roundingutils.h @@ -11,8 +11,7 @@ #include "string_segment.h" U_NAMESPACE_BEGIN -namespace number { -namespace impl { +namespace number::impl { namespace roundingutils { enum Section { @@ -238,8 +237,7 @@ class RoundingImpl { */ void parseIncrementOption(const StringSegment &segment, Precision &outPrecision, UErrorCode &status); -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END #endif //__NUMBER_ROUNDINGUTILS_H__ diff --git a/contrib/libs/icu/i18n/number_scientific.cpp b/contrib/libs/icu/i18n/number_scientific.cpp index d365d982d4..f7c5434b79 100644 --- a/contrib/libs/icu/i18n/number_scientific.cpp +++ b/contrib/libs/icu/i18n/number_scientific.cpp @@ -104,8 +104,8 @@ void ScientificModifier::getParameters(Parameters& output) const { output.obj = nullptr; } -bool ScientificModifier::semanticallyEquivalent(const Modifier& other) const { - auto* _other = dynamic_cast<const ScientificModifier*>(&other); +bool ScientificModifier::strictEquals(const Modifier& other) const { + const auto* _other = dynamic_cast<const ScientificModifier*>(&other); if (_other == nullptr) { return false; } diff --git a/contrib/libs/icu/i18n/number_scientific.h b/contrib/libs/icu/i18n/number_scientific.h index 22140a09af..60122b1551 100644 --- a/contrib/libs/icu/i18n/number_scientific.h +++ b/contrib/libs/icu/i18n/number_scientific.h @@ -9,8 +9,8 @@ #include "number_types.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { +U_NAMESPACE_BEGIN +namespace number::impl { // Forward-declare class ScientificHandler; @@ -34,7 +34,7 @@ class U_I18N_API ScientificModifier : public UMemory, public Modifier { void getParameters(Parameters& output) const override; - bool semanticallyEquivalent(const Modifier& other) const override; + bool strictEquals(const Modifier& other) const override; private: int32_t fExponent; @@ -59,8 +59,7 @@ class ScientificHandler : public UMemory, public MicroPropsGenerator, public Mul friend class ScientificModifier; }; -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END #endif //__NUMBER_SCIENTIFIC_H__ diff --git a/contrib/libs/icu/i18n/number_simple.cpp b/contrib/libs/icu/i18n/number_simple.cpp index a2af6be42d..7daeb66dc2 100644 --- a/contrib/libs/icu/i18n/number_simple.cpp +++ b/contrib/libs/icu/i18n/number_simple.cpp @@ -20,12 +20,12 @@ using namespace icu::number::impl; SimpleNumber SimpleNumber::forInt64(int64_t value, UErrorCode& status) { if (U_FAILURE(status)) { - return SimpleNumber(); + return {}; } - auto results = new UFormattedNumberData(); + auto* results = new UFormattedNumberData(); if (results == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; - return SimpleNumber(); + return {}; } results->quantity.setToLong(value); return SimpleNumber(results, status); @@ -81,7 +81,8 @@ void SimpleNumber::setMinimumIntegerDigits(uint32_t position, UErrorCode& status status = U_INVALID_STATE_ERROR; return; } - fData->quantity.setMinInteger(position); + fData->quantity.decreaseMinIntegerTo(position); + fData->quantity.increaseMinIntegerTo(position); } void SimpleNumber::setMinimumFractionDigits(uint32_t position, UErrorCode& status) { @@ -95,7 +96,7 @@ void SimpleNumber::setMinimumFractionDigits(uint32_t position, UErrorCode& statu fData->quantity.setMinFraction(position); } -void SimpleNumber::truncateStart(uint32_t position, UErrorCode& status) { +void SimpleNumber::setMaximumIntegerDigits(uint32_t position, UErrorCode& status) { if (U_FAILURE(status)) { return; } @@ -103,9 +104,14 @@ void SimpleNumber::truncateStart(uint32_t position, UErrorCode& status) { status = U_INVALID_STATE_ERROR; return; } + fData->quantity.decreaseMinIntegerTo(position); fData->quantity.applyMaxInteger(position); } +void SimpleNumber::truncateStart(uint32_t position, UErrorCode& status) { + setMaximumIntegerDigits(position, status); +} + void SimpleNumber::setSign(USimpleNumberSign sign, UErrorCode& status) { if (U_FAILURE(status)) { return; @@ -176,7 +182,7 @@ void SimpleNumberFormatter::initialize( } fMicros->symbols = &symbols; - auto pattern = utils::getPatternForStyle( + const auto* pattern = utils::getPatternForStyle( locale, symbols.getNumberingSystemName(), CLDR_PATTERN_STYLE_DECIMAL, @@ -203,7 +209,6 @@ void SimpleNumberFormatter::initialize( fPatternModifier = new AdoptingSignumModifierStore(patternModifier.createImmutableForPlural(StandardPlural::COUNT, status)); fGroupingStrategy = groupingStrategy; - return; } FormattedNumber SimpleNumberFormatter::format(SimpleNumber value, UErrorCode &status) const { @@ -211,7 +216,7 @@ FormattedNumber SimpleNumberFormatter::format(SimpleNumber value, UErrorCode &st // Do not save the results object if we encountered a failure. if (U_SUCCESS(status)) { - auto temp = value.fData; + auto* temp = value.fData; value.fData = nullptr; return FormattedNumber(temp); } else { diff --git a/contrib/libs/icu/i18n/number_skeletons.cpp b/contrib/libs/icu/i18n/number_skeletons.cpp index ef3befbffa..562a8663d0 100644 --- a/contrib/libs/icu/i18n/number_skeletons.cpp +++ b/contrib/libs/icu/i18n/number_skeletons.cpp @@ -184,7 +184,7 @@ Notation stem_to_object::notation(skeleton::StemEnum stem) { MeasureUnit stem_to_object::unit(skeleton::StemEnum stem) { switch (stem) { case STEM_BASE_UNIT: - return MeasureUnit(); + return {}; case STEM_PERCENT: return MeasureUnit::getPercent(); case STEM_PERMILLE: @@ -1287,7 +1287,6 @@ void blueprint_helpers::parseScientificStem(const StringSegment& segment, MacroP fail: void(); // throw new SkeletonSyntaxException("Invalid scientific stem", segment); status = U_NUMBER_SKELETON_SYNTAX_ERROR; - return; } void blueprint_helpers::parseIntegerStem(const StringSegment& segment, MacroProps& macros, UErrorCode& status) { @@ -1305,7 +1304,6 @@ void blueprint_helpers::parseIntegerStem(const StringSegment& segment, MacroProp return; } macros.integerWidth = IntegerWidth::zeroFillTo(offset); - return; } bool blueprint_helpers::parseFracSigOption(const StringSegment& segment, MacroProps& macros, @@ -1344,7 +1342,7 @@ bool blueprint_helpers::parseFracSigOption(const StringSegment& segment, MacroPr // @, @@, @@@ maxSig = minSig; } - auto& oldPrecision = static_cast<const FractionPrecision&>(macros.precision); + const auto& oldPrecision = static_cast<const FractionPrecision&>(macros.precision); if (offset < segment.length()) { UNumberRoundingPriority priority; if (maxSig == -1) { diff --git a/contrib/libs/icu/i18n/number_skeletons.h b/contrib/libs/icu/i18n/number_skeletons.h index 27f69cd48c..47a1a7ace8 100644 --- a/contrib/libs/icu/i18n/number_skeletons.h +++ b/contrib/libs/icu/i18n/number_skeletons.h @@ -13,8 +13,7 @@ #include "string_segment.h" U_NAMESPACE_BEGIN -namespace number { -namespace impl { +namespace number::impl { // Forward-declaration struct SeenMacroProps; @@ -385,8 +384,7 @@ UPRV_BLOCK_MACRO_BEGIN { \ } // namespace -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END #endif //__SOURCE_NUMBER_SKELETONS_H__ diff --git a/contrib/libs/icu/i18n/number_types.h b/contrib/libs/icu/i18n/number_types.h index 84846efb92..a67099e5e3 100644 --- a/contrib/libs/icu/i18n/number_types.h +++ b/contrib/libs/icu/i18n/number_types.h @@ -20,8 +20,7 @@ #include "formatted_string_builder.h" U_NAMESPACE_BEGIN -namespace number { -namespace impl { +namespace number::impl { // For convenience and historical reasons, import the Field typedef to the namespace. typedef FormattedStringBuilder::Field Field; @@ -225,10 +224,15 @@ class U_I18N_API Modifier { virtual void getParameters(Parameters& output) const = 0; /** + * Returns whether this Modifier equals another Modifier. + */ + virtual bool strictEquals(const Modifier& other) const = 0; + + /** * Returns whether this Modifier is *semantically equivalent* to the other Modifier; * in many cases, this is the same as equal, but parameters should be ignored. */ - virtual bool semanticallyEquivalent(const Modifier& other) const = 0; + bool semanticallyEquivalent(const Modifier& other) const; }; @@ -364,9 +368,7 @@ class U_I18N_API NullableValue { T fValue; }; - -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END #endif //__NUMBER_TYPES_H__ diff --git a/contrib/libs/icu/i18n/number_usageprefs.h b/contrib/libs/icu/i18n/number_usageprefs.h index e90df99d39..9aebc3140c 100644 --- a/contrib/libs/icu/i18n/number_usageprefs.h +++ b/contrib/libs/icu/i18n/number_usageprefs.h @@ -23,8 +23,7 @@ U_NAMESPACE_BEGIN using ::icu::units::ComplexUnitsConverter; using ::icu::units::UnitsRouter; -namespace number { -namespace impl { +namespace number::impl { /** * A MicroPropsGenerator which uses UnitsRouter to produce output converted to a @@ -62,8 +61,7 @@ class U_I18N_API UsagePrefsHandler : public MicroPropsGenerator, public UMemory const MicroPropsGenerator *fParent; }; -} // namespace impl -} // namespace number +} // namespace number::impl // Export explicit template instantiations of LocalPointerBase and LocalPointer. // This is required when building DLLs for Windows. (See datefmt.h, @@ -84,8 +82,7 @@ template class U_I18N_API LocalPointer<ComplexUnitsConverter>; #endif #endif -namespace number { -namespace impl { +namespace number::impl { /** * A MicroPropsGenerator which converts a measurement from one MeasureUnit to @@ -118,8 +115,8 @@ class U_I18N_API UnitConversionHandler : public MicroPropsGenerator, public UMem const MicroPropsGenerator *fParent; }; -} // namespace impl -} // namespace number +} // namespace number::impl + U_NAMESPACE_END #endif // __NUMBER_USAGEPREFS_H__ diff --git a/contrib/libs/icu/i18n/number_utils.h b/contrib/libs/icu/i18n/number_utils.h index bc369c940f..39c56f4d18 100644 --- a/contrib/libs/icu/i18n/number_utils.h +++ b/contrib/libs/icu/i18n/number_utils.h @@ -21,8 +21,7 @@ U_NAMESPACE_BEGIN -namespace number { -namespace impl { +namespace number::impl { enum CldrPatternStyle { CLDR_PATTERN_STYLE_DECIMAL, @@ -102,8 +101,7 @@ inline StandardPlural::Form getPluralSafe( } // namespace utils -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END diff --git a/contrib/libs/icu/i18n/number_utypes.h b/contrib/libs/icu/i18n/number_utypes.h index 0c13040189..9f606f1789 100644 --- a/contrib/libs/icu/i18n/number_utypes.h +++ b/contrib/libs/icu/i18n/number_utypes.h @@ -13,9 +13,8 @@ #include "formatted_string_builder.h" #include "formattedval_impl.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { - +U_NAMESPACE_BEGIN +namespace number::impl { /** Helper function used in upluralrules.cpp */ const DecimalQuantity* validateUFormattedNumberToDecimalQuantity( @@ -50,9 +49,7 @@ public: const char *gender = ""; }; - -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END #endif //__SOURCE_NUMBER_UTYPES_H__ diff --git a/contrib/libs/icu/i18n/numparse_affixes.cpp b/contrib/libs/icu/i18n/numparse_affixes.cpp index ad3d48b473..8333600f9e 100644 --- a/contrib/libs/icu/i18n/numparse_affixes.cpp +++ b/contrib/libs/icu/i18n/numparse_affixes.cpp @@ -29,7 +29,7 @@ namespace { * Either both arguments must be null or the pattern string inside the AffixPatternMatcher must equal * the given pattern string. */ -static bool matched(const AffixPatternMatcher* affix, const UnicodeString& patternString) { +bool matched(const AffixPatternMatcher* affix, const UnicodeString& patternString) { return (affix == nullptr && patternString.isBogus()) || (affix != nullptr && affix->getPattern() == patternString); } @@ -37,7 +37,7 @@ static bool matched(const AffixPatternMatcher* affix, const UnicodeString& patte /** * Helper method to return the length of the given AffixPatternMatcher. Returns 0 for null. */ -static int32_t length(const AffixPatternMatcher* matcher) { +int32_t length(const AffixPatternMatcher* matcher) { return matcher == nullptr ? 0 : matcher->getPattern().length(); } @@ -45,7 +45,7 @@ static int32_t length(const AffixPatternMatcher* matcher) { * Helper method to return whether (1) both lhs and rhs are null/invalid, or (2) if they are both * valid, whether they are equal according to operator==. Similar to Java Objects.equals() */ -static bool equals(const AffixPatternMatcher* lhs, const AffixPatternMatcher* rhs) { +bool equals(const AffixPatternMatcher* lhs, const AffixPatternMatcher* rhs) { if (lhs == nullptr && rhs == nullptr) { return true; } diff --git a/contrib/libs/icu/i18n/numparse_affixes.h b/contrib/libs/icu/i18n/numparse_affixes.h index 81b633c262..a9e1c414e8 100644 --- a/contrib/libs/icu/i18n/numparse_affixes.h +++ b/contrib/libs/icu/i18n/numparse_affixes.h @@ -16,8 +16,8 @@ #include "number_currencysymbols.h" U_NAMESPACE_BEGIN -namespace numparse { -namespace impl { + +namespace numparse::impl { // Forward-declaration of implementation classes for friending class AffixPatternMatcherBuilder; @@ -44,8 +44,7 @@ class U_I18N_API CodePointMatcher : public NumberParseMatcher, public UMemory { UChar32 fCp; }; -} // namespace impl -} // namespace numparse +} // namespace numparse::impl // Export a explicit template instantiations of MaybeStackArray, MemoryPool and CompactUnicodeString. // When building DLLs for Windows this is required even though no direct access leaks out of the i18n library. @@ -58,8 +57,7 @@ template class U_I18N_API MemoryPool<numparse::impl::CodePointMatcher, 8>; template class U_I18N_API numparse::impl::CompactUnicodeString<4>; #endif -namespace numparse { -namespace impl { +namespace numparse::impl { struct AffixTokenMatcherSetupData { const CurrencySymbols& currencySymbols; @@ -221,9 +219,8 @@ class AffixMatcherWarehouse { parse_flags_t parseFlags, UErrorCode& status); }; +} // namespace numparse::impl -} // namespace impl -} // namespace numparse U_NAMESPACE_END #endif //__NUMPARSE_AFFIXES_H__ diff --git a/contrib/libs/icu/i18n/numparse_compositions.cpp b/contrib/libs/icu/i18n/numparse_compositions.cpp index 2f7e1ab28d..259e566d46 100644 --- a/contrib/libs/icu/i18n/numparse_compositions.cpp +++ b/contrib/libs/icu/i18n/numparse_compositions.cpp @@ -24,7 +24,7 @@ bool SeriesMatcher::match(StringSegment& segment, ParsedNumber& result, UErrorCo int32_t initialOffset = segment.getOffset(); bool maybeMore = true; - for (auto* it = begin(); it < end();) { + for (const auto* it = begin(); it < end();) { const NumberParseMatcher* matcher = *it; int matcherOffset = segment.getOffset(); if (segment.length() != 0) { @@ -64,7 +64,7 @@ bool SeriesMatcher::match(StringSegment& segment, ParsedNumber& result, UErrorCo bool SeriesMatcher::smokeTest(const StringSegment& segment) const { // NOTE: The range-based for loop calls the virtual begin() and end() methods. // NOTE: We only want the first element. Use the for loop for boundary checking. - for (auto& matcher : *this) { + for (const auto& matcher : *this) { // SeriesMatchers are never allowed to start with a Flexible matcher. U_ASSERT(!matcher->isFlexible()); return matcher->smokeTest(segment); @@ -74,7 +74,7 @@ bool SeriesMatcher::smokeTest(const StringSegment& segment) const { void SeriesMatcher::postProcess(ParsedNumber& result) const { // NOTE: The range-based for loop calls the virtual begin() and end() methods. - for (auto* matcher : *this) { + for (const auto* matcher : *this) { matcher->postProcess(result); } } diff --git a/contrib/libs/icu/i18n/numparse_compositions.h b/contrib/libs/icu/i18n/numparse_compositions.h index f085912def..b21941deec 100644 --- a/contrib/libs/icu/i18n/numparse_compositions.h +++ b/contrib/libs/icu/i18n/numparse_compositions.h @@ -18,8 +18,7 @@ U_NAMESPACE_BEGIN template class U_I18N_API MaybeStackArray<const numparse::impl::NumberParseMatcher*, 3>; #endif -namespace numparse { -namespace impl { +namespace numparse::impl { /** * Base class for AnyMatcher and SeriesMatcher. @@ -115,9 +114,8 @@ class U_I18N_API ArraySeriesMatcher : public SeriesMatcher { int32_t fMatchersLen; }; +} // namespace numparse::impl -} // namespace impl -} // namespace numparse U_NAMESPACE_END #endif //__SOURCE_NUMPARSE_COMPOSITIONS__ diff --git a/contrib/libs/icu/i18n/numparse_currency.h b/contrib/libs/icu/i18n/numparse_currency.h index 4e99334a31..4d71d4fbc9 100644 --- a/contrib/libs/icu/i18n/numparse_currency.h +++ b/contrib/libs/icu/i18n/numparse_currency.h @@ -13,8 +13,8 @@ #include "number_currencysymbols.h" #include "unicode/uniset.h" -U_NAMESPACE_BEGIN namespace numparse { -namespace impl { +U_NAMESPACE_BEGIN +namespace numparse::impl { using ::icu::number::impl::CurrencySymbols; @@ -65,9 +65,7 @@ class U_I18N_API CombinedCurrencyMatcher : public NumberParseMatcher, public UMe bool matchCurrency(StringSegment& segment, ParsedNumber& result, UErrorCode& status) const; }; - -} // namespace impl -} // namespace numparse +} // namespace numparse::impl U_NAMESPACE_END #endif //__NUMPARSE_CURRENCY_H__ diff --git a/contrib/libs/icu/i18n/numparse_decimal.cpp b/contrib/libs/icu/i18n/numparse_decimal.cpp index 8b99fd7ad4..aedca60586 100644 --- a/contrib/libs/icu/i18n/numparse_decimal.cpp +++ b/contrib/libs/icu/i18n/numparse_decimal.cpp @@ -74,7 +74,7 @@ DecimalMatcher::DecimalMatcher(const DecimalFormatSymbols& symbols, const Groupe UChar32 cpZero = symbols.getCodePointZero(); if (cpZero == -1 || !u_isdigit(cpZero) || u_digit(cpZero, 10) != 0) { // Uncommon case: okay to allocate. - auto digitStrings = new UnicodeString[10]; + auto* digitStrings = new UnicodeString[10]; fLocalDigitStrings.adoptInstead(digitStrings); for (int32_t i = 0; i <= 9; i++) { digitStrings[i] = symbols.getConstDigitSymbol(i); diff --git a/contrib/libs/icu/i18n/numparse_decimal.h b/contrib/libs/icu/i18n/numparse_decimal.h index 07c9afeccc..b770749fa0 100644 --- a/contrib/libs/icu/i18n/numparse_decimal.h +++ b/contrib/libs/icu/i18n/numparse_decimal.h @@ -10,8 +10,8 @@ #include "unicode/uniset.h" #include "numparse_types.h" -U_NAMESPACE_BEGIN namespace numparse { -namespace impl { +U_NAMESPACE_BEGIN +namespace numparse::impl { using ::icu::number::impl::Grouper; @@ -67,9 +67,7 @@ class DecimalMatcher : public NumberParseMatcher, public UMemory { bool validateGroup(int32_t sepType, int32_t count, bool isPrimary) const; }; - -} // namespace impl -} // namespace numparse +} // namespace numparse::impl U_NAMESPACE_END #endif //__NUMPARSE_DECIMAL_H__ diff --git a/contrib/libs/icu/i18n/numparse_impl.h b/contrib/libs/icu/i18n/numparse_impl.h index 380d9aa4c6..4695a624d6 100644 --- a/contrib/libs/icu/i18n/numparse_impl.h +++ b/contrib/libs/icu/i18n/numparse_impl.h @@ -29,8 +29,7 @@ U_NAMESPACE_BEGIN template class U_I18N_API MaybeStackArray<const numparse::impl::NumberParseMatcher*, 10>; #endif -namespace numparse { -namespace impl { +namespace numparse::impl { // Exported as U_I18N_API for tests class U_I18N_API NumberParserImpl : public MutableMatcherCollection, public UMemory { @@ -102,9 +101,8 @@ class U_I18N_API NumberParserImpl : public MutableMatcherCollection, public UMem StringSegment& segment, ParsedNumber& result, int32_t recursionLevels, UErrorCode& status) const; }; +} // namespace numparse::impl -} // namespace impl -} // namespace numparse U_NAMESPACE_END #endif //__NUMPARSE_IMPL_H__ diff --git a/contrib/libs/icu/i18n/numparse_scientific.h b/contrib/libs/icu/i18n/numparse_scientific.h index 5617c0c6a6..ed214b7171 100644 --- a/contrib/libs/icu/i18n/numparse_scientific.h +++ b/contrib/libs/icu/i18n/numparse_scientific.h @@ -14,9 +14,8 @@ using icu::number::impl::Grouper; -U_NAMESPACE_BEGIN namespace numparse { -namespace impl { - +U_NAMESPACE_BEGIN +namespace numparse::impl { class ScientificMatcher : public NumberParseMatcher, public UMemory { public: @@ -38,9 +37,7 @@ class ScientificMatcher : public NumberParseMatcher, public UMemory { UnicodeString fCustomPlusSign; }; - -} // namespace impl -} // namespace numparse +} // namespace numparse::impl U_NAMESPACE_END #endif //__NUMPARSE_SCIENTIFIC_H__ diff --git a/contrib/libs/icu/i18n/numparse_symbols.h b/contrib/libs/icu/i18n/numparse_symbols.h index beb133f7d0..3bc07b2be3 100644 --- a/contrib/libs/icu/i18n/numparse_symbols.h +++ b/contrib/libs/icu/i18n/numparse_symbols.h @@ -11,9 +11,8 @@ #include "unicode/uniset.h" #include "static_unicode_sets.h" -U_NAMESPACE_BEGIN namespace numparse { -namespace impl { - +U_NAMESPACE_BEGIN +namespace numparse::impl { /** * A base class for many matchers that performs a simple match against a UnicodeString and/or UnicodeSet. @@ -164,9 +163,7 @@ class U_I18N_API PlusSignMatcher : public SymbolMatcher { bool fAllowTrailing; }; - -} // namespace impl -} // namespace numparse +} // namespace numparse::impl U_NAMESPACE_END #endif //__NUMPARSE_SYMBOLS_H__ diff --git a/contrib/libs/icu/i18n/numparse_types.h b/contrib/libs/icu/i18n/numparse_types.h index 8e881793fd..d5a53379be 100644 --- a/contrib/libs/icu/i18n/numparse_types.h +++ b/contrib/libs/icu/i18n/numparse_types.h @@ -12,8 +12,7 @@ #include "string_segment.h" U_NAMESPACE_BEGIN -namespace numparse { -namespace impl { +namespace numparse::impl { // Forward-declarations class ParsedNumber; @@ -263,9 +262,7 @@ class U_I18N_API MutableMatcherCollection { virtual void addMatcher(NumberParseMatcher& matcher) = 0; }; - -} // namespace impl -} // namespace numparse +} // namespace numparse::impl U_NAMESPACE_END #endif //__NUMPARSE_TYPES_H__ diff --git a/contrib/libs/icu/i18n/numparse_utils.h b/contrib/libs/icu/i18n/numparse_utils.h index 8fda4f4369..a842c6fae0 100644 --- a/contrib/libs/icu/i18n/numparse_utils.h +++ b/contrib/libs/icu/i18n/numparse_utils.h @@ -10,10 +10,8 @@ #include "numparse_types.h" #include "unicode/uniset.h" -U_NAMESPACE_BEGIN namespace numparse { -namespace impl { -namespace utils { - +U_NAMESPACE_BEGIN +namespace numparse::impl::utils { inline static void putLeadCodePoints(const UnicodeSet* input, UnicodeSet* output) { for (int32_t i = 0; i < input->getRangeCount(); i++) { @@ -33,10 +31,7 @@ inline static void copyCurrencyCode(char16_t* dest, const char16_t* src) { dest[3] = 0; } - -} // namespace utils -} // namespace impl -} // namespace numparse +} // namespace numparse::impl::utils U_NAMESPACE_END #endif //__NUMPARSE_UTILS_H__ diff --git a/contrib/libs/icu/i18n/numparse_validators.h b/contrib/libs/icu/i18n/numparse_validators.h index 9bb4b482b5..3425bb07a7 100644 --- a/contrib/libs/icu/i18n/numparse_validators.h +++ b/contrib/libs/icu/i18n/numparse_validators.h @@ -10,9 +10,8 @@ #include "numparse_types.h" #include "static_unicode_sets.h" -U_NAMESPACE_BEGIN namespace numparse { -namespace impl { - +U_NAMESPACE_BEGIN +namespace numparse::impl { class ValidationMatcher : public NumberParseMatcher { public: @@ -86,9 +85,7 @@ class MultiplierParseHandler : public ValidationMatcher, public UMemory { ::icu::number::Scale fMultiplier; }; - -} // namespace impl -} // namespace numparse +} // namespace numparse::impl U_NAMESPACE_END #endif //__SOURCE_NUMPARSE_VALIDATORS_H__ diff --git a/contrib/libs/icu/i18n/numrange_capi.cpp b/contrib/libs/icu/i18n/numrange_capi.cpp index 9222969eb4..ef1a29e395 100644 --- a/contrib/libs/icu/i18n/numrange_capi.cpp +++ b/contrib/libs/icu/i18n/numrange_capi.cpp @@ -24,8 +24,7 @@ using namespace icu::number::impl; U_NAMESPACE_BEGIN -namespace number { -namespace impl { +namespace number::impl { /** * Implementation class for UNumberRangeFormatter. Wraps a LocalizedRangeNumberFormatter. @@ -59,8 +58,7 @@ UFormattedNumberRangeImpl::~UFormattedNumberRangeImpl() { fImpl.fData = nullptr; } -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END @@ -73,7 +71,7 @@ UPRV_FORMATTED_VALUE_CAPI_NO_IMPLTYPE_AUTO_IMPL( const UFormattedNumberRangeData* number::impl::validateUFormattedNumberRange( const UFormattedNumberRange* uresult, UErrorCode& status) { - auto* result = UFormattedNumberRangeApiHelper::validate(uresult, status); + const auto* result = UFormattedNumberRangeApiHelper::validate(uresult, status); if (U_FAILURE(status)) { return nullptr; } @@ -147,7 +145,7 @@ U_CAPI UNumberRangeIdentityResult U_EXPORT2 unumrf_resultGetIdentityResult( const UFormattedNumberRange* uresult, UErrorCode* ec) { - auto* result = UFormattedNumberRangeApiHelper::validate(uresult, *ec); + const auto* result = UFormattedNumberRangeApiHelper::validate(uresult, *ec); if (U_FAILURE(*ec)) { return UNUM_IDENTITY_RESULT_COUNT; } diff --git a/contrib/libs/icu/i18n/numrange_fluent.cpp b/contrib/libs/icu/i18n/numrange_fluent.cpp index 0944f3024f..e03701788c 100644 --- a/contrib/libs/icu/i18n/numrange_fluent.cpp +++ b/contrib/libs/icu/i18n/numrange_fluent.cpp @@ -212,6 +212,14 @@ UnlocalizedNumberRangeFormatter::UnlocalizedNumberRangeFormatter(NFS<UNF>&& src) // No additional fields to assign } +UnlocalizedNumberRangeFormatter::UnlocalizedNumberRangeFormatter(const impl::RangeMacroProps ¯os) { + fMacros = macros; +} + +UnlocalizedNumberRangeFormatter::UnlocalizedNumberRangeFormatter(impl::RangeMacroProps &¯os) { + fMacros = macros; +} + UnlocalizedNumberRangeFormatter& UnlocalizedNumberRangeFormatter::operator=(const UNF& other) { NFS<UNF>::operator=(static_cast<const NFS<UNF>&>(other)); // No additional fields to assign @@ -286,13 +294,26 @@ LocalizedNumberRangeFormatter UnlocalizedNumberRangeFormatter::locale(const Loca } +UnlocalizedNumberRangeFormatter LocalizedNumberRangeFormatter::withoutLocale() const & { + RangeMacroProps macros(fMacros); + macros.locale = Locale(); + return UnlocalizedNumberRangeFormatter(macros); +} + +UnlocalizedNumberRangeFormatter LocalizedNumberRangeFormatter::withoutLocale() && { + RangeMacroProps macros(std::move(fMacros)); + macros.locale = Locale(); + return UnlocalizedNumberRangeFormatter(std::move(macros)); +} + + FormattedNumberRange LocalizedNumberRangeFormatter::formatFormattableRange( const Formattable& first, const Formattable& second, UErrorCode& status) const { if (U_FAILURE(status)) { return FormattedNumberRange(U_ILLEGAL_ARGUMENT_ERROR); } - auto results = new UFormattedNumberRangeData(); + auto* results = new UFormattedNumberRangeData(); if (results == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return FormattedNumberRange(status); @@ -321,7 +342,7 @@ FormattedNumberRange LocalizedNumberRangeFormatter::formatFormattableRange( void LocalizedNumberRangeFormatter::formatImpl( UFormattedNumberRangeData& results, bool equalBeforeRounding, UErrorCode& status) const { - auto* impl = getFormatter(status); + const auto* impl = getFormatter(status); if (U_FAILURE(status)) { return; } diff --git a/contrib/libs/icu/i18n/numrange_impl.h b/contrib/libs/icu/i18n/numrange_impl.h index ac1d8a5897..cdee3d84ee 100644 --- a/contrib/libs/icu/i18n/numrange_impl.h +++ b/contrib/libs/icu/i18n/numrange_impl.h @@ -17,9 +17,8 @@ #include "formattedval_impl.h" #include "pluralranges.h" -U_NAMESPACE_BEGIN namespace number { -namespace impl { - +U_NAMESPACE_BEGIN +namespace number::impl { /** * Class similar to UFormattedNumberData. @@ -80,9 +79,7 @@ class NumberRangeFormatterImpl : public UMemory { const UFormattedNumberRangeData* validateUFormattedNumberRange( const UFormattedNumberRange* uresult, UErrorCode& status); - -} // namespace impl -} // namespace number +} // namespace number::impl U_NAMESPACE_END #endif //__SOURCE_NUMRANGE_TYPES_H__ diff --git a/contrib/libs/icu/i18n/numsys.cpp b/contrib/libs/icu/i18n/numsys.cpp index 0d5c43e4b2..4fb1b5af37 100644 --- a/contrib/libs/icu/i18n/numsys.cpp +++ b/contrib/libs/icu/i18n/numsys.cpp @@ -320,7 +320,6 @@ U_CFUNC void initNumsysNames(UErrorCode &status) { if (U_SUCCESS(status)) { gNumsysNames = numsysNames.orphan(); } - return; } } // end anonymous namespace diff --git a/contrib/libs/icu/i18n/olsontz.cpp b/contrib/libs/icu/i18n/olsontz.cpp index 260e345d79..924502f537 100644 --- a/contrib/libs/icu/i18n/olsontz.cpp +++ b/contrib/libs/icu/i18n/olsontz.cpp @@ -266,7 +266,7 @@ OlsonTimeZone::OlsonTimeZone(const UResourceBundle* top, * Copy constructor */ OlsonTimeZone::OlsonTimeZone(const OlsonTimeZone& other) : - BasicTimeZone(other), finalZone(0) { + BasicTimeZone(other), finalZone(nullptr) { *this = other; } @@ -290,7 +290,7 @@ OlsonTimeZone& OlsonTimeZone::operator=(const OlsonTimeZone& other) { typeMapData = other.typeMapData; delete finalZone; - finalZone = (other.finalZone != 0) ? other.finalZone->clone() : 0; + finalZone = other.finalZone != nullptr ? other.finalZone->clone() : nullptr; finalStartYear = other.finalStartYear; finalStartMillis = other.finalStartMillis; @@ -664,18 +664,10 @@ OlsonTimeZone::clearTransitionRules() { void OlsonTimeZone::deleteTransitionRules() { - if (initialRule != nullptr) { - delete initialRule; - } - if (firstTZTransition != nullptr) { - delete firstTZTransition; - } - if (firstFinalTZTransition != nullptr) { - delete firstFinalTZTransition; - } - if (finalZoneWithStartYear != nullptr) { - delete finalZoneWithStartYear; - } + delete initialRule; + delete firstTZTransition; + delete firstFinalTZTransition; + delete finalZoneWithStartYear; if (historicRules != nullptr) { for (int i = 0; i < historicRuleCount; i++) { if (historicRules[i] != nullptr) { diff --git a/contrib/libs/icu/i18n/persncal.cpp b/contrib/libs/icu/i18n/persncal.cpp index ab13f43434..c97a32197a 100644 --- a/contrib/libs/icu/i18n/persncal.cpp +++ b/contrib/libs/icu/i18n/persncal.cpp @@ -21,6 +21,7 @@ #if !UCONFIG_NO_FORMATTING +#include "uassert.h" #include "umutex.h" #include "gregoimp.h" // Math #include <float.h> @@ -110,17 +111,16 @@ int32_t PersianCalendar::handleGetLimit(UCalendarDateFields field, ELimitType li */ UBool PersianCalendar::isLeapYear(int32_t year) { - int32_t remainder; - ClockMath::floorDivide(25 * year + 11, 33, &remainder); - return (remainder < 8); + int64_t y = static_cast<int64_t>(year) * 25LL + 11LL; + return (y % 33L < 8); } /** * Return the day # on which the given year starts. Days are counted * from the Persian epoch, origin 0. */ -int32_t PersianCalendar::yearStart(int32_t year) { - return handleComputeMonthStart(year,0,false); +int32_t PersianCalendar::yearStart(int32_t year, UErrorCode& status) { + return handleComputeMonthStart(year,0,false, status); } /** @@ -130,8 +130,8 @@ int32_t PersianCalendar::yearStart(int32_t year) { * @param year The Persian year * @param year The Persian month, 0-based */ -int32_t PersianCalendar::monthStart(int32_t year, int32_t month) const { - return handleComputeMonthStart(year,month,true); +int32_t PersianCalendar::monthStart(int32_t year, int32_t month, UErrorCode& status) const { + return handleComputeMonthStart(year,month,true, status); } //---------------------------------------------------------------------- @@ -144,7 +144,7 @@ int32_t PersianCalendar::monthStart(int32_t year, int32_t month) const { * @param year The Persian year * @param year The Persian month, 0-based */ -int32_t PersianCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month) const { +int32_t PersianCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month, UErrorCode& /*status*/) const { // If the month is out of range, adjust it into range, and // modify the extended year value accordingly. if (month < 0 || month > 11) { @@ -166,14 +166,20 @@ int32_t PersianCalendar::handleGetYearLength(int32_t extendedYear) const { //------------------------------------------------------------------------- // Return JD of start of given month/year -int32_t PersianCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, UBool /*useMonth*/) const { +int64_t PersianCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, UBool /*useMonth*/, UErrorCode& status) const { + if (U_FAILURE(status)) { + return 0; + } // If the month is out of range, adjust it into range, and // modify the extended year value accordingly. if (month < 0 || month > 11) { - eyear += ClockMath::floorDivide(month, 12, &month); + if (uprv_add32_overflow(eyear, ClockMath::floorDivide(month, 12, &month), &eyear)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } } - int32_t julianDay = PERSIAN_EPOCH - 1 + 365 * (eyear - 1) + ClockMath::floorDivide(8 * eyear + 21, 33); + int64_t julianDay = PERSIAN_EPOCH - 1LL + 365LL * (eyear - 1LL) + ClockMath::floorDivide(8LL * eyear + 21, 33); if (month != 0) { julianDay += kPersianNumDays[month]; @@ -186,14 +192,14 @@ int32_t PersianCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, U // Functions for converting from milliseconds to field values //------------------------------------------------------------------------- -int32_t PersianCalendar::handleGetExtendedYear() { - int32_t year; +int32_t PersianCalendar::handleGetExtendedYear(UErrorCode& status) { + if (U_FAILURE(status)) { + return 0; + } if (newerField(UCAL_EXTENDED_YEAR, UCAL_YEAR) == UCAL_EXTENDED_YEAR) { - year = internalGet(UCAL_EXTENDED_YEAR, 1); // Default to year 1 - } else { - year = internalGet(UCAL_YEAR, 1); // Default to year 1 + return internalGet(UCAL_EXTENDED_YEAR, 1); // Default to year 1 } - return year; + return internalGet(UCAL_YEAR, 1); // Default to year 1 } /** @@ -210,20 +216,33 @@ int32_t PersianCalendar::handleGetExtendedYear() { * The DAY_OF_WEEK and DOW_LOCAL fields are already set when this * method is called. */ -void PersianCalendar::handleComputeFields(int32_t julianDay, UErrorCode &/*status*/) { - int32_t year, month, dayOfMonth, dayOfYear; - - int32_t daysSinceEpoch = julianDay - PERSIAN_EPOCH; - year = 1 + (int32_t)ClockMath::floorDivide(33 * (int64_t)daysSinceEpoch + 3, (int64_t)12053); +void PersianCalendar::handleComputeFields(int32_t julianDay, UErrorCode& status) { + int64_t daysSinceEpoch = julianDay - PERSIAN_EPOCH; + int64_t year = ClockMath::floorDivideInt64( + 33LL * daysSinceEpoch + 3LL, 12053LL) + 1LL; + if (year > INT32_MAX || year < INT32_MIN) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } - int32_t farvardin1 = 365 * (year - 1) + ClockMath::floorDivide(8 * year + 21, 33); - dayOfYear = (daysSinceEpoch - farvardin1); // 0-based + int64_t farvardin1 = 365LL * (year - 1) + ClockMath::floorDivide(8LL * year + 21, 33); + int32_t dayOfYear = daysSinceEpoch - farvardin1; // 0-based + U_ASSERT(dayOfYear >= 0); + U_ASSERT(dayOfYear < 366); + // + int32_t month; if (dayOfYear < 216) { // Compute 0-based month month = dayOfYear / 31; } else { month = (dayOfYear - 6) / 30; } - dayOfMonth = dayOfYear - kPersianNumDays[month] + 1; + U_ASSERT(month >= 0); + U_ASSERT(month < 12); + + int32_t dayOfMonth = dayOfYear - kPersianNumDays[month] + 1; + U_ASSERT(dayOfMonth > 0); + U_ASSERT(dayOfMonth <= 31); + ++dayOfYear; // Make it 1-based now internalSet(UCAL_ERA, 0); @@ -243,7 +262,11 @@ int32_t PersianCalendar::getRelatedYear(UErrorCode &status) const if (U_FAILURE(status)) { return 0; } - return year + kPersianRelatedYearDiff; + if (uprv_add32_overflow(year, kPersianRelatedYearDiff, &year)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + return year; } void PersianCalendar::setRelatedYear(int32_t year) @@ -252,50 +275,10 @@ void PersianCalendar::setRelatedYear(int32_t year) set(UCAL_EXTENDED_YEAR, year - kPersianRelatedYearDiff); } -// default century - -static UDate gSystemDefaultCenturyStart = DBL_MIN; -static int32_t gSystemDefaultCenturyStartYear = -1; -static icu::UInitOnce gSystemDefaultCenturyInit {}; - -UBool PersianCalendar::haveDefaultCentury() const -{ - return true; -} - -static void U_CALLCONV initializeSystemDefaultCentury() { - // initialize systemDefaultCentury and systemDefaultCenturyYear based - // on the current time. They'll be set to 80 years before - // the current time. - UErrorCode status = U_ZERO_ERROR; - PersianCalendar calendar(Locale("@calendar=persian"),status); - if (U_SUCCESS(status)) - { - calendar.setTime(Calendar::getNow(), status); - calendar.add(UCAL_YEAR, -80, status); - - gSystemDefaultCenturyStart = calendar.getTime(status); - gSystemDefaultCenturyStartYear = calendar.get(UCAL_YEAR, status); - } - // We have no recourse upon failure unless we want to propagate the failure - // out. -} - -UDate PersianCalendar::defaultCenturyStart() const { - // lazy-evaluate systemDefaultCenturyStart - umtx_initOnce(gSystemDefaultCenturyInit, &initializeSystemDefaultCentury); - return gSystemDefaultCenturyStart; -} - -int32_t PersianCalendar::defaultCenturyStartYear() const { - // lazy-evaluate systemDefaultCenturyStartYear - umtx_initOnce(gSystemDefaultCenturyInit, &initializeSystemDefaultCentury); - return gSystemDefaultCenturyStartYear; -} +IMPL_SYSTEM_DEFAULT_CENTURY(PersianCalendar, "@calendar=persian") UOBJECT_DEFINE_RTTI_IMPLEMENTATION(PersianCalendar) U_NAMESPACE_END #endif - diff --git a/contrib/libs/icu/i18n/persncal.h b/contrib/libs/icu/i18n/persncal.h index b943321a54..daf7508b70 100644 --- a/contrib/libs/icu/i18n/persncal.h +++ b/contrib/libs/icu/i18n/persncal.h @@ -176,7 +176,7 @@ class PersianCalendar : public Calendar { * Return the day # on which the given year starts. Days are counted * from the Hijri epoch, origin 0. */ - int32_t yearStart(int32_t year); + int32_t yearStart(int32_t year, UErrorCode& status); /** * Return the day # on which the given month starts. Days are counted @@ -185,7 +185,7 @@ class PersianCalendar : public Calendar { * @param year The hijri shamsi year * @param year The hijri shamsi month, 0-based */ - int32_t monthStart(int32_t year, int32_t month) const; + int32_t monthStart(int32_t year, int32_t month, UErrorCode& status) const; //---------------------------------------------------------------------- // Calendar framework @@ -203,7 +203,7 @@ class PersianCalendar : public Calendar { * @param year The hijri shamsi month, 0-based * @internal */ - virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month) const override; + virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month, UErrorCode& status) const override; /** * Return the number of days in the given Persian year @@ -219,7 +219,7 @@ class PersianCalendar : public Calendar { /** * @internal */ - virtual int32_t handleComputeMonthStart(int32_t eyear, int32_t month, UBool useMonth) const override; + virtual int64_t handleComputeMonthStart(int32_t eyear, int32_t month, UBool useMonth, UErrorCode& status) const override; //------------------------------------------------------------------------- // Functions for converting from milliseconds to field values @@ -228,7 +228,7 @@ class PersianCalendar : public Calendar { /** * @internal */ - virtual int32_t handleGetExtendedYear() override; + virtual int32_t handleGetExtendedYear(UErrorCode& status) override; /** * Override Calendar to compute several fields specific to the Persian @@ -296,24 +296,7 @@ class PersianCalendar : public Calendar { PersianCalendar(); // default constructor not implemented protected: - /** - * Returns true because the Persian Calendar does have a default century - * @internal - */ - virtual UBool haveDefaultCentury() const override; - - /** - * Returns the date of the start of the default century - * @return start of century - in milliseconds since epoch, 1970 - * @internal - */ - virtual UDate defaultCenturyStart() const override; - - /** - * Returns the year in which the default century begins - * @internal - */ - virtual int32_t defaultCenturyStartYear() const override; + DECLARE_OVERRIDE_SYSTEM_DEFAULT_CENTURY }; U_NAMESPACE_END diff --git a/contrib/libs/icu/i18n/pluralranges.h b/contrib/libs/icu/i18n/pluralranges.h index eba59c70ed..c06317850a 100644 --- a/contrib/libs/icu/i18n/pluralranges.h +++ b/contrib/libs/icu/i18n/pluralranges.h @@ -17,11 +17,9 @@ U_NAMESPACE_BEGIN // Forward declarations -namespace number { -namespace impl { +namespace number::impl { class UFormattedNumberRangeData; } -} class StandardPluralRanges : public UMemory { public: diff --git a/contrib/libs/icu/i18n/plurfmt.cpp b/contrib/libs/icu/i18n/plurfmt.cpp index 33a539cd19..7b225bcc8a 100644 --- a/contrib/libs/icu/i18n/plurfmt.cpp +++ b/contrib/libs/icu/i18n/plurfmt.cpp @@ -149,13 +149,8 @@ PluralFormat::PluralFormat(const PluralFormat& other) void PluralFormat::copyObjects(const PluralFormat& other) { UErrorCode status = U_ZERO_ERROR; - if (numberFormat != nullptr) { - delete numberFormat; - } - if (pluralRulesWrapper.pluralRules != nullptr) { - delete pluralRulesWrapper.pluralRules; - } - + delete numberFormat; + delete pluralRulesWrapper.pluralRules; if (other.numberFormat == nullptr) { numberFormat = NumberFormat::createInstance(locale, status); } else { diff --git a/contrib/libs/icu/i18n/plurrule.cpp b/contrib/libs/icu/i18n/plurrule.cpp index 9c37b09e25..2ded25d600 100644 --- a/contrib/libs/icu/i18n/plurrule.cpp +++ b/contrib/libs/icu/i18n/plurrule.cpp @@ -12,6 +12,8 @@ #include <math.h> #include <stdio.h> +#include <utility> + #include "unicode/utypes.h" #include "unicode/localpointer.h" #include "unicode/plurrule.h" @@ -40,6 +42,7 @@ #include "util.h" #include "pluralranges.h" #include "numrange_impl.h" +#include "ulocimp.h" #if !UCONFIG_NO_FORMATTING @@ -652,6 +655,11 @@ PluralRuleParser::parse(const UnicodeString& ruleData, PluralRules *prules, UErr case tEqual: { U_ASSERT(curAndConstraint != nullptr); + if (curAndConstraint->rangeList != nullptr) { + // Already get a '='. + status = U_UNEXPECTED_TOKEN; + break; + } LocalPointer<UVector32> newRangeList(new UVector32(status), status); if (U_FAILURE(status)) { break; @@ -669,20 +677,40 @@ PluralRuleParser::parse(const UnicodeString& ruleData, PluralRules *prules, UErr U_ASSERT(curAndConstraint != nullptr); if ( (curAndConstraint->op==AndConstraint::MOD)&& (curAndConstraint->opNum == -1 ) ) { - curAndConstraint->opNum=getNumberValue(token); + int32_t num = getNumberValue(token); + if (num == -1) { + status = U_UNEXPECTED_TOKEN; + break; + } + curAndConstraint->opNum=num; } else { if (curAndConstraint->rangeList == nullptr) { // this is for an 'is' rule - curAndConstraint->value = getNumberValue(token); + int32_t num = getNumberValue(token); + if (num == -1) { + status = U_UNEXPECTED_TOKEN; + break; + } + curAndConstraint->value = num; } else { // this is for an 'in' or 'within' rule if (curAndConstraint->rangeList->elementAti(rangeLowIdx) == -1) { - curAndConstraint->rangeList->setElementAt(getNumberValue(token), rangeLowIdx); - curAndConstraint->rangeList->setElementAt(getNumberValue(token), rangeHiIdx); + int32_t num = getNumberValue(token); + if (num == -1) { + status = U_UNEXPECTED_TOKEN; + break; + } + curAndConstraint->rangeList->setElementAt(num, rangeLowIdx); + curAndConstraint->rangeList->setElementAt(num, rangeHiIdx); } else { - curAndConstraint->rangeList->setElementAt(getNumberValue(token), rangeHiIdx); + int32_t num = getNumberValue(token); + if (num == -1) { + status = U_UNEXPECTED_TOKEN; + break; + } + curAndConstraint->rangeList->setElementAt(num, rangeHiIdx); if (curAndConstraint->rangeList->elementAti(rangeLowIdx) > curAndConstraint->rangeList->elementAti(rangeHiIdx)) { // Range Lower bound > Range Upper bound. @@ -827,14 +855,17 @@ PluralRules::getRuleFromResource(const Locale& locale, UPluralType type, UErrorC if (s == nullptr) { // Check parent locales. UErrorCode status = U_ZERO_ERROR; - char parentLocaleName[ULOC_FULLNAME_CAPACITY]; const char *curLocaleName2=locale.getBaseName(); - uprv_strcpy(parentLocaleName, curLocaleName2); + CharString parentLocaleName(curLocaleName2, status); - while (uloc_getParent(parentLocaleName, parentLocaleName, - ULOC_FULLNAME_CAPACITY, &status) > 0) { + for (;;) { + { + CharString tmp = ulocimp_getParent(parentLocaleName.data(), status); + if (tmp.isEmpty()) break; + parentLocaleName = std::move(tmp); + } resLen=0; - s = ures_getStringByKey(locRes.getAlias(), parentLocaleName, &resLen, &status); + s = ures_getStringByKey(locRes.getAlias(), parentLocaleName.data(), &resLen, &status); if (s != nullptr) { errCode = U_ZERO_ERROR; break; @@ -1249,13 +1280,8 @@ PluralRuleParser::~PluralRuleParser() { int32_t PluralRuleParser::getNumberValue(const UnicodeString& token) { - int32_t i; - char digits[128]; - - i = token.extract(0, token.length(), digits, UPRV_LENGTHOF(digits), US_INV); - digits[i]='\0'; - - return((int32_t)atoi(digits)); + int32_t pos = 0; + return ICU_Utility::parseNumber(token, pos, 10); } @@ -1749,7 +1775,9 @@ void FixedDecimal::init(double n, int32_t v, int64_t f, int32_t e, int32_t c) { if (exponent == 0) { exponent = c; } - if (_isNaN || _isInfinite) { + if (_isNaN || _isInfinite || + source > static_cast<double>(U_INT64_MAX) || + source < static_cast<double>(U_INT64_MIN)) { v = 0; f = 0; intValue = 0; diff --git a/contrib/libs/icu/i18n/rbnf.cpp b/contrib/libs/icu/i18n/rbnf.cpp index 06599b4fd1..a30b945909 100644 --- a/contrib/libs/icu/i18n/rbnf.cpp +++ b/contrib/libs/icu/i18n/rbnf.cpp @@ -1037,7 +1037,7 @@ RuleBasedNumberFormat::getNumberOfRuleSetDisplayNameLocales() const { Locale RuleBasedNumberFormat::getRuleSetDisplayNameLocale(int32_t index, UErrorCode& status) const { if (U_FAILURE(status)) { - return Locale(""); + return {""}; } if (localizations && index >= 0 && index < localizations->getNumberOfDisplayLocales()) { UnicodeString name(true, localizations->getLocaleName(index), -1); @@ -1048,7 +1048,7 @@ RuleBasedNumberFormat::getRuleSetDisplayNameLocale(int32_t index, UErrorCode& st bp = (char *)uprv_malloc(cap); if (bp == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; - return Locale(""); + return {""}; } } name.extract(0, name.length(), bp, cap, UnicodeString::kInvariant); @@ -1557,7 +1557,7 @@ RuleBasedNumberFormat::init(const UnicodeString& rules, LocalizationInfo* locali // our rule list is an array of the appropriate size fRuleSets = (NFRuleSet **)uprv_malloc((numRuleSets + 1) * sizeof(NFRuleSet *)); /* test for nullptr */ - if (fRuleSets == 0) { + if (fRuleSets == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return; } @@ -1923,10 +1923,7 @@ RuleBasedNumberFormat::adoptDecimalFormatSymbols(DecimalFormatSymbols* symbolsTo return; // do not allow caller to set decimalFormatSymbols to nullptr } - if (decimalFormatSymbols != nullptr) { - delete decimalFormatSymbols; - } - + delete decimalFormatSymbols; decimalFormatSymbols = symbolsToAdopt; { diff --git a/contrib/libs/icu/i18n/rbt.cpp b/contrib/libs/icu/i18n/rbt.cpp index 2176e89fdd..1ff04fd95b 100644 --- a/contrib/libs/icu/i18n/rbt.cpp +++ b/contrib/libs/icu/i18n/rbt.cpp @@ -33,7 +33,7 @@ void RuleBasedTransliterator::_construct(const UnicodeString& rules, UTransDirection direction, UParseError& parseError, UErrorCode& status) { - fData = 0; + fData = nullptr; isDataOwned = true; if (U_FAILURE(status)) { return; @@ -153,7 +153,7 @@ RuleBasedTransliterator::RuleBasedTransliterator(const UnicodeString& id, RuleBasedTransliterator::RuleBasedTransliterator(const UnicodeString& id, TransliterationRuleData* theData, UBool isDataAdopted) : - Transliterator(id, 0), + Transliterator(id, nullptr), fData(theData), isDataOwned(isDataAdopted) { setMaximumContextLength(fData->ruleSet.getMaximumContextLength()); diff --git a/contrib/libs/icu/i18n/rbt.h b/contrib/libs/icu/i18n/rbt.h index 59fa286a45..fdb0047df3 100644 --- a/contrib/libs/icu/i18n/rbt.h +++ b/contrib/libs/icu/i18n/rbt.h @@ -115,7 +115,7 @@ private: */ RuleBasedTransliterator(const UnicodeString& id, const TransliterationRuleData* theData, - UnicodeFilter* adoptedFilter = 0); + UnicodeFilter* adoptedFilter = nullptr); friend class Transliterator; // to access following ct diff --git a/contrib/libs/icu/i18n/rbt_data.cpp b/contrib/libs/icu/i18n/rbt_data.cpp index f4212848cb..0a08f92054 100644 --- a/contrib/libs/icu/i18n/rbt_data.cpp +++ b/contrib/libs/icu/i18n/rbt_data.cpp @@ -25,13 +25,13 @@ U_NAMESPACE_BEGIN TransliterationRuleData::TransliterationRuleData(UErrorCode& status) : UMemory(), ruleSet(status), variableNames(status), - variables(0), variablesAreOwned(true) + variables(nullptr), variablesAreOwned(true) { if (U_FAILURE(status)) { return; } variableNames.setValueDeleter(uprv_deleteUObject); - variables = 0; + variables = nullptr; variablesLength = 0; } @@ -46,7 +46,7 @@ TransliterationRuleData::TransliterationRuleData(const TransliterationRuleData& variableNames.setValueDeleter(uprv_deleteUObject); int32_t pos = UHASH_FIRST; const UHashElement *e; - while ((e = other.variableNames.nextElement(pos)) != 0) { + while ((e = other.variableNames.nextElement(pos)) != nullptr) { UnicodeString* value = new UnicodeString(*(const UnicodeString*)e->value.pointer); // Exit out if value could not be created. @@ -56,11 +56,11 @@ TransliterationRuleData::TransliterationRuleData(const TransliterationRuleData& variableNames.put(*(UnicodeString*)e->key.pointer, value, status); } - variables = 0; - if (other.variables != 0) { + variables = nullptr; + if (other.variables != nullptr) { variables = (UnicodeFunctor **)uprv_malloc(variablesLength * sizeof(UnicodeFunctor *)); /* test for nullptr */ - if (variables == 0) { + if (variables == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return; } @@ -87,7 +87,7 @@ TransliterationRuleData::TransliterationRuleData(const TransliterationRuleData& } TransliterationRuleData::~TransliterationRuleData() { - if (variablesAreOwned && variables != 0) { + if (variablesAreOwned && variables != nullptr) { for (int32_t i=0; i<variablesLength; ++i) { delete variables[i]; } @@ -98,19 +98,19 @@ TransliterationRuleData::~TransliterationRuleData() { UnicodeFunctor* TransliterationRuleData::lookup(UChar32 standIn) const { int32_t i = standIn - variablesBase; - return (i >= 0 && i < variablesLength) ? variables[i] : 0; + return (i >= 0 && i < variablesLength) ? variables[i] : nullptr; } UnicodeMatcher* TransliterationRuleData::lookupMatcher(UChar32 standIn) const { UnicodeFunctor *f = lookup(standIn); - return (f != 0) ? f->toMatcher() : 0; + return f != nullptr ? f->toMatcher() : nullptr; } UnicodeReplacer* TransliterationRuleData::lookupReplacer(UChar32 standIn) const { UnicodeFunctor *f = lookup(standIn); - return (f != 0) ? f->toReplacer() : 0; + return f != nullptr ? f->toReplacer() : nullptr; } diff --git a/contrib/libs/icu/i18n/rbt_pars.cpp b/contrib/libs/icu/i18n/rbt_pars.cpp index 10482d5edb..880014b59b 100644 --- a/contrib/libs/icu/i18n/rbt_pars.cpp +++ b/contrib/libs/icu/i18n/rbt_pars.cpp @@ -142,9 +142,9 @@ public: const Hashtable* variableNames; // alias - ParseData(const TransliterationRuleData* data = 0, - const UVector* variablesVector = 0, - const Hashtable* variableNames = 0); + ParseData(const TransliterationRuleData* data = nullptr, + const UVector* variablesVector = nullptr, + const Hashtable* variableNames = nullptr); virtual ~ParseData(); @@ -196,7 +196,7 @@ const UnicodeFunctor* ParseData::lookupMatcher(UChar32 ch) const { if (i >= 0 && i < variablesVector->size()) { int32_t j = ch - data->variablesBase; set = (j < variablesVector->size()) ? - (UnicodeFunctor*) variablesVector->elementAt(j) : 0; + (UnicodeFunctor*) variablesVector->elementAt(j) : nullptr; } return set; } @@ -913,7 +913,7 @@ void TransliteratorParser::parseRules(const UnicodeString& rule, delete (UnicodeFunctor*)variablesVector.orphanElementAt(0); } variableNames.removeAll(); - parseData = new ParseData(0, &variablesVector, &variableNames); + parseData = new ParseData(nullptr, &variablesVector, &variableNames); if (parseData == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return; @@ -1109,7 +1109,7 @@ void TransliteratorParser::parseRules(const UnicodeString& rule, TransliterationRuleData* data = (TransliterationRuleData*)dataVector.elementAt(i); data->variablesLength = variablesVector.size(); if (data->variablesLength == 0) { - data->variables = 0; + data->variables = nullptr; } else { data->variables = (UnicodeFunctor**)uprv_malloc(data->variablesLength * sizeof(UnicodeFunctor*)); // nullptr pointer check diff --git a/contrib/libs/icu/i18n/rbt_rule.cpp b/contrib/libs/icu/i18n/rbt_rule.cpp index da8e4eaa1f..4cf557e04d 100644 --- a/contrib/libs/icu/i18n/rbt_rule.cpp +++ b/contrib/libs/icu/i18n/rbt_rule.cpp @@ -65,7 +65,7 @@ TransliterationRule::TransliterationRule(const UnicodeString& input, const TransliterationRuleData* theData, UErrorCode& status) : UMemory(), - segments(0), + segments(nullptr), data(theData) { if (U_FAILURE(status)) { @@ -121,7 +121,7 @@ TransliterationRule::TransliterationRule(const UnicodeString& input, anteContext = new StringMatcher(pattern, 0, anteContextLength, false, *data); /* test for nullptr */ - if (anteContext == 0) { + if (anteContext == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return; } @@ -132,7 +132,7 @@ TransliterationRule::TransliterationRule(const UnicodeString& input, key = new StringMatcher(pattern, anteContextLength, anteContextLength + keyLength, false, *data); /* test for nullptr */ - if (key == 0) { + if (key == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return; } @@ -144,7 +144,7 @@ TransliterationRule::TransliterationRule(const UnicodeString& input, postContext = new StringMatcher(pattern, anteContextLength + keyLength, pattern.length(), false, *data); /* test for nullptr */ - if (postContext == 0) { + if (postContext == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return; } @@ -152,7 +152,7 @@ TransliterationRule::TransliterationRule(const UnicodeString& input, this->output = new StringReplacer(outputStr, cursorPosition + cursorOffset, data); /* test for nullptr */ - if (this->output == 0) { + if (this->output == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return; } diff --git a/contrib/libs/icu/i18n/rbt_set.cpp b/contrib/libs/icu/i18n/rbt_set.cpp index c0a2ccd868..23577f489f 100644 --- a/contrib/libs/icu/i18n/rbt_set.cpp +++ b/contrib/libs/icu/i18n/rbt_set.cpp @@ -197,7 +197,7 @@ TransliterationRuleSet::TransliterationRuleSet(const TransliterationRuleSet& oth ruleVector->adoptElement(tempTranslitRule.orphan(), status); } } - if (other.rules != 0 && U_SUCCESS(status)) { + if (other.rules != nullptr && U_SUCCESS(status)) { UParseError p; freeze(p, status); } @@ -253,7 +253,7 @@ void TransliterationRuleSet::addRule(TransliterationRule* adoptedRule, } uprv_free(rules); - rules = 0; + rules = nullptr; } /** @@ -297,7 +297,7 @@ void TransliterationRuleSet::freeze(UParseError& parseError,UErrorCode& status) */ int16_t* indexValue = (int16_t*) uprv_malloc( sizeof(int16_t) * (n > 0 ? n : 1) ); /* test for nullptr */ - if (indexValue == 0) { + if (indexValue == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return; } @@ -341,7 +341,7 @@ void TransliterationRuleSet::freeze(UParseError& parseError,UErrorCode& status) } rules = (TransliterationRule **)uprv_malloc(v.size() * sizeof(TransliterationRule *)); /* test for nullptr */ - if (rules == 0) { + if (rules == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return; } diff --git a/contrib/libs/icu/i18n/rbtz.cpp b/contrib/libs/icu/i18n/rbtz.cpp index e4d71436c5..6bee2aa04b 100644 --- a/contrib/libs/icu/i18n/rbtz.cpp +++ b/contrib/libs/icu/i18n/rbtz.cpp @@ -635,9 +635,7 @@ RuleBasedTimeZone::deleteRules() { void RuleBasedTimeZone::deleteTransitions() { - if (fHistoricTransitions != nullptr) { - delete fHistoricTransitions; - } + delete fHistoricTransitions; fHistoricTransitions = nullptr; } diff --git a/contrib/libs/icu/i18n/regexcmp.cpp b/contrib/libs/icu/i18n/regexcmp.cpp index 0a0d095ca4..1e599cd4e5 100644 --- a/contrib/libs/icu/i18n/regexcmp.cpp +++ b/contrib/libs/icu/i18n/regexcmp.cpp @@ -3185,8 +3185,6 @@ void RegexCompile::matchStartType() { // Matches can start with anything fRXPat->fStartType = START_NO_INFO; } - - return; } diff --git a/contrib/libs/icu/i18n/regexcst.h b/contrib/libs/icu/i18n/regexcst.h index a475b6b363..02a95da852 100644 --- a/contrib/libs/icu/i18n/regexcst.h +++ b/contrib/libs/icu/i18n/regexcst.h @@ -357,214 +357,214 @@ static const struct RegexTableEl gRuleParseStateTable[] = { , {doSetFinish, 255, 14,0, false} // 205 set-finish , {doExit, 255, 206,0, true} // 206 errorDeath }; -static const char * const RegexStateNames[] = { 0, +static const char * const RegexStateNames[] = {nullptr, "start", "term", - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, "expr-quant", - 0, - 0, - 0, - 0, - 0, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, "expr-cont", - 0, - 0, + nullptr, + nullptr, "open-paren-quant", - 0, + nullptr, "open-paren-quant2", - 0, + nullptr, "open-paren", - 0, + nullptr, "open-paren-extended", - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, "open-paren-lookbehind", - 0, - 0, - 0, + nullptr, + nullptr, + nullptr, "paren-comment", - 0, - 0, + nullptr, + nullptr, "paren-flag", - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, "named-capture", - 0, - 0, - 0, + nullptr, + nullptr, + nullptr, "quant-star", - 0, - 0, + nullptr, + nullptr, "quant-plus", - 0, - 0, + nullptr, + nullptr, "quant-opt", - 0, - 0, + nullptr, + nullptr, "interval-open", - 0, + nullptr, "interval-lower", - 0, - 0, - 0, + nullptr, + nullptr, + nullptr, "interval-upper", - 0, - 0, + nullptr, + nullptr, "interval-type", - 0, - 0, + nullptr, + nullptr, "backslash", - 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, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, "named-backref", - 0, + nullptr, "named-backref-2", - 0, + nullptr, "named-backref-3", - 0, - 0, - 0, + nullptr, + nullptr, + nullptr, "set-open", - 0, - 0, + nullptr, + nullptr, "set-open2", - 0, + nullptr, "set-posix", - 0, - 0, + nullptr, + nullptr, "set-start", - 0, - 0, - 0, - 0, - 0, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, "set-start-dash", - 0, + nullptr, "set-start-amp", - 0, + nullptr, "set-after-lit", - 0, - 0, - 0, - 0, - 0, - 0, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, "set-after-set", - 0, - 0, - 0, - 0, - 0, - 0, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, "set-after-range", - 0, - 0, - 0, - 0, - 0, - 0, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, "set-after-op", - 0, - 0, - 0, + nullptr, + nullptr, + nullptr, "set-set-amp", - 0, - 0, + nullptr, + nullptr, "set-lit-amp", - 0, + nullptr, "set-set-dash", - 0, - 0, + nullptr, + nullptr, "set-range-dash", - 0, + nullptr, "set-range-amp", - 0, + nullptr, "set-lit-dash", - 0, - 0, - 0, - 0, + nullptr, + nullptr, + nullptr, + nullptr, "set-lit-dash-escape", - 0, - 0, - 0, - 0, - 0, - 0, - 0, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, "set-escape", - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, "set-finish", "errorDeath", - 0}; + nullptr}; U_NAMESPACE_END #endif diff --git a/contrib/libs/icu/i18n/region.cpp b/contrib/libs/icu/i18n/region.cpp index 26440b6593..839a252e12 100644 --- a/contrib/libs/icu/i18n/region.cpp +++ b/contrib/libs/icu/i18n/region.cpp @@ -455,12 +455,8 @@ Region::Region () } Region::~Region () { - if (containedRegions) { - delete containedRegions; - } - if (preferredValues) { - delete preferredValues; - } + delete containedRegions; + delete preferredValues; } /** diff --git a/contrib/libs/icu/i18n/reldatefmt.cpp b/contrib/libs/icu/i18n/reldatefmt.cpp index 24d22a4b4b..c3c450f376 100644 --- a/contrib/libs/icu/i18n/reldatefmt.cpp +++ b/contrib/libs/icu/i18n/reldatefmt.cpp @@ -12,7 +12,7 @@ #include "unicode/reldatefmt.h" -#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_BREAK_ITERATION +#if !UCONFIG_NO_FORMATTING #include <cmath> #include <functional> @@ -701,7 +701,7 @@ static UBool getDateTimePattern( return getStringByIndex(topLevel.getAlias(), dateTimeFormatOffset, result, status); } -template<> +template<> const RelativeDateTimeCacheData *LocaleCacheKey<RelativeDateTimeCacheData>::createObject(const void * /*unused*/, UErrorCode &status) const { const char *localeId = fLoc.getName(); LocalUResourceBundlePointer topLevel(ures_open(nullptr, localeId, &status)); @@ -761,6 +761,7 @@ RelativeDateTimeFormatter::RelativeDateTimeFormatter(UErrorCode& status) : fStyle(UDAT_STYLE_LONG), fContext(UDISPCTX_CAPITALIZATION_NONE), fOptBreakIterator(nullptr) { + (void)fOptBreakIterator; // suppress unused field warning init(nullptr, nullptr, status); } @@ -804,16 +805,25 @@ RelativeDateTimeFormatter::RelativeDateTimeFormatter( if (U_FAILURE(status)) { return; } + if (styl < 0 || UDAT_STYLE_COUNT <= styl) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } if ((capitalizationContext >> 8) != UDISPCTX_TYPE_CAPITALIZATION) { status = U_ILLEGAL_ARGUMENT_ERROR; return; } if (capitalizationContext == UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE) { +#if !UCONFIG_NO_BREAK_ITERATION BreakIterator *bi = BreakIterator::createSentenceInstance(locale, status); if (U_FAILURE(status)) { return; } init(nfToAdopt, bi, status); +#else + status = U_UNSUPPORTED_ERROR; + return; +#endif // !UCONFIG_NO_BREAK_ITERATION } else { init(nfToAdopt, nullptr, status); } @@ -832,9 +842,11 @@ RelativeDateTimeFormatter::RelativeDateTimeFormatter( fCache->addRef(); fNumberFormat->addRef(); fPluralRules->addRef(); +#if !UCONFIG_NO_BREAK_ITERATION if (fOptBreakIterator != nullptr) { fOptBreakIterator->addRef(); } +#endif // !UCONFIG_NO_BREAK_ITERATION } RelativeDateTimeFormatter& RelativeDateTimeFormatter::operator=( @@ -843,7 +855,9 @@ RelativeDateTimeFormatter& RelativeDateTimeFormatter::operator=( SharedObject::copyPtr(other.fCache, fCache); SharedObject::copyPtr(other.fNumberFormat, fNumberFormat); SharedObject::copyPtr(other.fPluralRules, fPluralRules); +#if !UCONFIG_NO_BREAK_ITERATION SharedObject::copyPtr(other.fOptBreakIterator, fOptBreakIterator); +#endif // !UCONFIG_NO_BREAK_ITERATION fStyle = other.fStyle; fContext = other.fContext; fLocale = other.fLocale; @@ -861,9 +875,11 @@ RelativeDateTimeFormatter::~RelativeDateTimeFormatter() { if (fPluralRules != nullptr) { fPluralRules->removeRef(); } +#if !UCONFIG_NO_BREAK_ITERATION if (fOptBreakIterator != nullptr) { fOptBreakIterator->removeRef(); } +#endif // !UCONFIG_NO_BREAK_ITERATION } const NumberFormat& RelativeDateTimeFormatter::getNumberFormat() const { @@ -1015,6 +1031,10 @@ void RelativeDateTimeFormatter::formatNumericImpl( if (U_FAILURE(status)) { return; } + if (unit < 0 || UDAT_REL_UNIT_COUNT <= unit) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } UDateDirection direction = UDAT_DIRECTION_NEXT; if (std::signbit(offset)) { // needed to handle -0.0 direction = UDAT_DIRECTION_LAST; @@ -1083,7 +1103,9 @@ void RelativeDateTimeFormatter::formatAbsoluteImpl( if (U_FAILURE(status)) { return; } - if (unit == UDAT_ABSOLUTE_NOW && direction != UDAT_DIRECTION_PLAIN) { + if ((unit < 0 || UDAT_ABSOLUTE_UNIT_COUNT <= unit) || + (direction < 0 || UDAT_DIRECTION_COUNT <= direction) || + (unit == UDAT_ABSOLUTE_NOW && direction != UDAT_DIRECTION_PLAIN)) { status = U_ILLEGAL_ARGUMENT_ERROR; return; } @@ -1191,6 +1213,7 @@ UnicodeString& RelativeDateTimeFormatter::combineDateAndTime( } UnicodeString& RelativeDateTimeFormatter::adjustForContext(UnicodeString &str) const { +#if !UCONFIG_NO_BREAK_ITERATION if (fOptBreakIterator == nullptr || str.length() == 0 || !u_islower(str.char32At(0))) { return str; @@ -1204,25 +1227,36 @@ UnicodeString& RelativeDateTimeFormatter::adjustForContext(UnicodeString &str) c fOptBreakIterator->get(), fLocale, U_TITLECASE_NO_LOWERCASE | U_TITLECASE_NO_BREAK_ADJUSTMENT); +#endif // !UCONFIG_NO_BREAK_ITERATION return str; } UBool RelativeDateTimeFormatter::checkNoAdjustForContext(UErrorCode& status) const { +#if !UCONFIG_NO_BREAK_ITERATION // This is unsupported because it's hard to keep fields in sync with title // casing. The code could be written and tested if there is demand. if (fOptBreakIterator != nullptr) { status = U_UNSUPPORTED_ERROR; return false; } +#else + (void)status; // suppress unused argument warning +#endif // !UCONFIG_NO_BREAK_ITERATION return true; } void RelativeDateTimeFormatter::init( NumberFormat *nfToAdopt, +#if !UCONFIG_NO_BREAK_ITERATION BreakIterator *biToAdopt, +#else + std::nullptr_t, +#endif // !UCONFIG_NO_BREAK_ITERATION UErrorCode &status) { LocalPointer<NumberFormat> nf(nfToAdopt); +#if !UCONFIG_NO_BREAK_ITERATION LocalPointer<BreakIterator> bi(biToAdopt); +#endif // !UCONFIG_NO_BREAK_ITERATION UnifiedCache::getByLocale(fLocale, fCache, status); if (U_FAILURE(status)) { return; @@ -1251,6 +1285,7 @@ void RelativeDateTimeFormatter::init( nf.orphan(); SharedObject::copyPtr(shared, fNumberFormat); } +#if !UCONFIG_NO_BREAK_ITERATION if (bi.isNull()) { SharedObject::clearPtr(fOptBreakIterator); } else { @@ -1262,6 +1297,7 @@ void RelativeDateTimeFormatter::init( bi.orphan(); SharedObject::copyPtr(shared, fOptBreakIterator); } +#endif // !UCONFIG_NO_BREAK_ITERATION } U_NAMESPACE_END @@ -1344,7 +1380,7 @@ ureldatefmt_formatNumericToResult( if (U_FAILURE(*status)) { return; } - auto* fmt = reinterpret_cast<const RelativeDateTimeFormatter*>(reldatefmt); + const auto* fmt = reinterpret_cast<const RelativeDateTimeFormatter*>(reldatefmt); auto* resultImpl = UFormattedRelativeDateTimeApiHelper::validate(result, *status); resultImpl->fImpl = fmt->formatNumericToValue(offset, unit, *status); } @@ -1387,7 +1423,7 @@ ureldatefmt_formatToResult( if (U_FAILURE(*status)) { return; } - auto* fmt = reinterpret_cast<const RelativeDateTimeFormatter*>(reldatefmt); + const auto* fmt = reinterpret_cast<const RelativeDateTimeFormatter*>(reldatefmt); auto* resultImpl = UFormattedRelativeDateTimeApiHelper::validate(result, *status); resultImpl->fImpl = fmt->formatToValue(offset, unit, *status); } diff --git a/contrib/libs/icu/i18n/reldtfmt.cpp b/contrib/libs/icu/i18n/reldtfmt.cpp index 0c836a0b79..7015c13089 100644 --- a/contrib/libs/icu/i18n/reldtfmt.cpp +++ b/contrib/libs/icu/i18n/reldtfmt.cpp @@ -78,6 +78,14 @@ RelativeDateFormat::RelativeDateFormat( UDateFormatStyle timeStyle, UDateFormatS if(U_FAILURE(status) ) { return; } + if (dateStyle != UDAT_FULL_RELATIVE && + dateStyle != UDAT_LONG_RELATIVE && + dateStyle != UDAT_MEDIUM_RELATIVE && + dateStyle != UDAT_SHORT_RELATIVE && + dateStyle != UDAT_RELATIVE) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } if (timeStyle < UDAT_NONE || timeStyle > UDAT_SHORT) { // don't support other time styles (e.g. relative styles), for now diff --git a/contrib/libs/icu/i18n/rematch.cpp b/contrib/libs/icu/i18n/rematch.cpp index 7a39afbf7b..c76f0c55bc 100644 --- a/contrib/libs/icu/i18n/rematch.cpp +++ b/contrib/libs/icu/i18n/rematch.cpp @@ -165,9 +165,7 @@ RegexMatcher::~RegexMatcher() { fPattern = nullptr; } - if (fInput) { - delete fInput; - } + delete fInput; if (fInputText) { utext_close(fInputText); } @@ -4278,7 +4276,6 @@ breakFromLoop: fFrame = fp; // The active stack frame when the engine stopped. // Contains the capture group results that we need to // access later. - return; } @@ -5720,8 +5717,6 @@ breakFromLoop: fFrame = fp; // The active stack frame when the engine stopped. // Contains the capture group results that we need to // access later. - - return; } diff --git a/contrib/libs/icu/i18n/remtrans.cpp b/contrib/libs/icu/i18n/remtrans.cpp index 40af1845c7..015adb8d0b 100644 --- a/contrib/libs/icu/i18n/remtrans.cpp +++ b/contrib/libs/icu/i18n/remtrans.cpp @@ -44,13 +44,13 @@ void RemoveTransliterator::registerIDs() { UNICODE_STRING_SIMPLE("Null"), false); } -RemoveTransliterator::RemoveTransliterator() : Transliterator(UnicodeString(true, ::CURR_ID, -1), 0) {} +RemoveTransliterator::RemoveTransliterator() : Transliterator(UnicodeString(true, ::CURR_ID, -1), nullptr) {} RemoveTransliterator::~RemoveTransliterator() {} RemoveTransliterator* RemoveTransliterator::clone() const { RemoveTransliterator* result = new RemoveTransliterator(); - if (result != nullptr && getFilter() != 0) { + if (result != nullptr && getFilter() != nullptr) { result->adoptFilter(getFilter()->clone()); } return result; diff --git a/contrib/libs/icu/i18n/repattrn.cpp b/contrib/libs/icu/i18n/repattrn.cpp index c0a88f70d9..67577436e2 100644 --- a/contrib/libs/icu/i18n/repattrn.cpp +++ b/contrib/libs/icu/i18n/repattrn.cpp @@ -164,7 +164,7 @@ RegexPattern &RegexPattern::operator = (const RegexPattern &other) { //-------------------------------------------------------------------------- void RegexPattern::init() { fFlags = 0; - fCompiledPat = 0; + fCompiledPat = nullptr; fLiteralText.remove(); fSets = nullptr; fSets8 = nullptr; @@ -233,9 +233,7 @@ void RegexPattern::zap() { for (i=1; i<fSets->size(); i++) { UnicodeSet *s; s = (UnicodeSet *)fSets->elementAt(i); - if (s != nullptr) { - delete s; - } + delete s; } delete fSets; fSets = nullptr; @@ -579,7 +577,7 @@ UnicodeString RegexPattern::pattern() const { if (fPatternString != nullptr) { return *fPatternString; } else if (fPattern == nullptr) { - return UnicodeString(); + return {}; } else { UErrorCode status = U_ZERO_ERROR; int64_t nativeLen = utext_nativeLength(fPattern); diff --git a/contrib/libs/icu/i18n/rulebasedcollator.cpp b/contrib/libs/icu/i18n/rulebasedcollator.cpp index e9482628d9..685f44de37 100644 --- a/contrib/libs/icu/i18n/rulebasedcollator.cpp +++ b/contrib/libs/icu/i18n/rulebasedcollator.cpp @@ -50,6 +50,7 @@ #include "ucol_imp.h" #include "uhash.h" #include "uitercollationiterator.h" +#include "ulocimp.h" #include "ustr_imp.h" #include "utf16collationiterator.h" #include "utf8collationiterator.h" @@ -1559,7 +1560,6 @@ RuleBasedCollator::internalGetShortDefinitionString(const char *locale, // Append items in alphabetic order of their short definition letters. CharString result; - char subtag[ULOC_KEYWORD_AND_VALUES_CAPACITY]; if(attributeHasBeenSetExplicitly(UCOL_ALTERNATE_HANDLING)) { appendAttribute(result, 'A', getAttribute(UCOL_ALTERNATE_HANDLING, errorCode), errorCode); @@ -1579,26 +1579,27 @@ RuleBasedCollator::internalGetShortDefinitionString(const char *locale, appendAttribute(result, 'F', getAttribute(UCOL_FRENCH_COLLATION, errorCode), errorCode); } // Note: UCOL_HIRAGANA_QUATERNARY_MODE is deprecated and never changes away from default. - length = uloc_getKeywordValue(resultLocale, "collation", subtag, UPRV_LENGTHOF(subtag), &errorCode); - appendSubtag(result, 'K', subtag, length, errorCode); - length = uloc_getLanguage(resultLocale, subtag, UPRV_LENGTHOF(subtag), &errorCode); - if (length == 0) { + CharString collation = ulocimp_getKeywordValue(resultLocale, "collation", errorCode); + appendSubtag(result, 'K', collation.data(), collation.length(), errorCode); + CharString language; + CharString script; + CharString region; + CharString variant; + ulocimp_getSubtags(resultLocale, &language, &script, ®ion, &variant, nullptr, errorCode); + if (language.isEmpty()) { appendSubtag(result, 'L', "root", 4, errorCode); } else { - appendSubtag(result, 'L', subtag, length, errorCode); + appendSubtag(result, 'L', language.data(), language.length(), errorCode); } if(attributeHasBeenSetExplicitly(UCOL_NORMALIZATION_MODE)) { appendAttribute(result, 'N', getAttribute(UCOL_NORMALIZATION_MODE, errorCode), errorCode); } - length = uloc_getCountry(resultLocale, subtag, UPRV_LENGTHOF(subtag), &errorCode); - appendSubtag(result, 'R', subtag, length, errorCode); + appendSubtag(result, 'R', region.data(), region.length(), errorCode); if(attributeHasBeenSetExplicitly(UCOL_STRENGTH)) { appendAttribute(result, 'S', getAttribute(UCOL_STRENGTH, errorCode), errorCode); } - length = uloc_getVariant(resultLocale, subtag, UPRV_LENGTHOF(subtag), &errorCode); - appendSubtag(result, 'V', subtag, length, errorCode); - length = uloc_getScript(resultLocale, subtag, UPRV_LENGTHOF(subtag), &errorCode); - appendSubtag(result, 'Z', subtag, length, errorCode); + appendSubtag(result, 'V', variant.data(), variant.length(), errorCode); + appendSubtag(result, 'Z', script.data(), script.length(), errorCode); if(U_FAILURE(errorCode)) { return 0; } return result.extract(buffer, capacity, errorCode); diff --git a/contrib/libs/icu/i18n/simpletz.cpp b/contrib/libs/icu/i18n/simpletz.cpp index 8b21152f52..f144577155 100644 --- a/contrib/libs/icu/i18n/simpletz.cpp +++ b/contrib/libs/icu/i18n/simpletz.cpp @@ -519,7 +519,12 @@ SimpleTimeZone::getOffsetFromLocal(UDate date, UTimeZoneLocalOption nonExistingT rawOffsetGMT = getRawOffset(); int32_t year, month, dom, dow, millis; - int32_t day = ClockMath::floorDivide(date, U_MILLIS_PER_DAY, &millis); + double dday = ClockMath::floorDivide(date, U_MILLIS_PER_DAY, &millis); + if (dday > INT32_MAX || dday < INT32_MIN) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + int32_t day = dday; Grego::dayToFields(day, year, month, dom, dow); @@ -726,7 +731,7 @@ UBool SimpleTimeZone::inDaylightTime(UDate date, UErrorCode& status) const if (U_FAILURE(status)) return false; GregorianCalendar *gc = new GregorianCalendar(*this, status); /* test for nullptr */ - if (gc == 0) { + if (gc == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return false; } @@ -1049,18 +1054,10 @@ SimpleTimeZone::clearTransitionRules() { void SimpleTimeZone::deleteTransitionRules() { - if (initialRule != nullptr) { - delete initialRule; - } - if (firstTransition != nullptr) { - delete firstTransition; - } - if (stdRule != nullptr) { - delete stdRule; - } - if (dstRule != nullptr) { - delete dstRule; - } + delete initialRule; + delete firstTransition; + delete stdRule; + delete dstRule; clearTransitionRules(); } diff --git a/contrib/libs/icu/i18n/smpdtfmt.cpp b/contrib/libs/icu/i18n/smpdtfmt.cpp index a87fb8d5e1..2822e686fd 100644 --- a/contrib/libs/icu/i18n/smpdtfmt.cpp +++ b/contrib/libs/icu/i18n/smpdtfmt.cpp @@ -332,9 +332,7 @@ SimpleDateFormat::~SimpleDateFormat() if (fSharedNumberFormatters) { freeSharedNumberFormatters(fSharedNumberFormatters); } - if (fTimeZoneFormat) { - delete fTimeZoneFormat; - } + delete fTimeZoneFormat; delete fSimpleNumberFormatter; #if !UCONFIG_NO_BREAK_ITERATION @@ -507,7 +505,7 @@ SimpleDateFormat::SimpleDateFormat(const Locale& locale, // This constructor doesn't fail; it uses last resort data fSymbols = new DateFormatSymbols(status); /* test for nullptr */ - if (fSymbols == 0) { + if (fSymbols == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return; } @@ -709,7 +707,7 @@ void SimpleDateFormat::construct(EStyle timeStyle, fSymbols = DateFormatSymbols::createForLocale(locale, status); if (U_FAILURE(status)) return; /* test for nullptr */ - if (fSymbols == 0) { + if (fSymbols == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return; } @@ -721,19 +719,29 @@ void SimpleDateFormat::construct(EStyle timeStyle, UnicodeString timePattern; if (timeStyle >= kFull && timeStyle <= kShort) { + bool hasRgOrHcSubtag = false; + // also use DTPG if the locale has the "rg" or "hc" ("hours") subtag-- even if the overriding region + // or hour cycle is the same as the one we get by default, we go through the DateTimePatternGenerator + UErrorCode dummyErr1 = U_ZERO_ERROR, dummyErr2 = U_ZERO_ERROR; + if (locale.getKeywordValue("rg", nullptr, 0, dummyErr1) > 0 || locale.getKeywordValue("hours", nullptr, 0, dummyErr2) > 0) { + hasRgOrHcSubtag = true; + } + const char* baseLocID = locale.getBaseName(); - if (baseLocID[0]!=0 && uprv_strcmp(baseLocID,"und")!=0) { + if (baseLocID != nullptr && uprv_strcmp(baseLocID,"und")!=0) { UErrorCode useStatus = U_ZERO_ERROR; Locale baseLoc(baseLocID); Locale validLoc(getLocale(ULOC_VALID_LOCALE, useStatus)); - if (U_SUCCESS(useStatus) && validLoc!=baseLoc) { - bool useDTPG = false; + if (hasRgOrHcSubtag || (U_SUCCESS(useStatus) && validLoc!=baseLoc)) { + bool useDTPG = hasRgOrHcSubtag; const char* baseReg = baseLoc.getCountry(); // empty string if no region - if ((baseReg[0]!=0 && uprv_strncmp(baseReg,validLoc.getCountry(),ULOC_COUNTRY_CAPACITY)!=0) + if ((baseReg != nullptr && baseReg[0] != 0 && + uprv_strncmp(baseReg,validLoc.getCountry(),ULOC_COUNTRY_CAPACITY)!=0) || uprv_strncmp(baseLoc.getLanguage(),validLoc.getLanguage(),ULOC_LANG_CAPACITY)!=0) { // use DTPG if // * baseLoc has a region and validLoc does not have the same one (or has none), OR // * validLoc has a different language code than baseLoc + // * the original locale has the rg or hc subtag useDTPG = true; } if (useDTPG) { @@ -1065,7 +1073,8 @@ SimpleDateFormat::_format(Calendar& cal, UnicodeString& appendTo, UDisplayContext capitalizationContext = getContext(UDISPCTX_TYPE_CAPITALIZATION, status); // loop through the pattern string character by character - for (int32_t i = 0; i < fPattern.length() && U_SUCCESS(status); ++i) { + int32_t patternLength = fPattern.length(); + for (int32_t i = 0; i < patternLength && U_SUCCESS(status); ++i) { char16_t ch = fPattern[i]; // Use subFormat() to format a repeated pattern character @@ -1078,7 +1087,7 @@ SimpleDateFormat::_format(Calendar& cal, UnicodeString& appendTo, if (ch == QUOTE) { // Consecutive single quotes are a single quote literal, // either outside of quotes or between quotes - if ((i+1) < fPattern.length() && fPattern[i+1] == QUOTE) { + if ((i+1) < patternLength && fPattern[i+1] == QUOTE) { appendTo += (char16_t)QUOTE; ++i; } else { @@ -1103,9 +1112,7 @@ SimpleDateFormat::_format(Calendar& cal, UnicodeString& appendTo, prevCh, handler, *workCal, status); } - if (calClone != nullptr) { - delete calClone; - } + delete calClone; return appendTo; } @@ -1301,7 +1308,7 @@ SimpleDateFormat::initSimpleNumberFormatter(UErrorCode &status) { if (U_FAILURE(status)) { return; } - auto* df = dynamic_cast<const DecimalFormat*>(fNumberFormat); + const auto* df = dynamic_cast<const DecimalFormat*>(fNumberFormat); if (df == nullptr) { return; } @@ -1471,6 +1478,9 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo, Calendar& cal, UErrorCode& status) const { + static const int32_t maxIntCount = 10; + static const UnicodeString hebr(u"hebr"); + if (U_FAILURE(status)) { return; } @@ -1479,14 +1489,9 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo, // text for an individual pattern symbol (e.g., "HH" or "yyyy") UDateFormatField patternCharIndex = DateFormatSymbols::getPatternCharIndex(ch); - const int32_t maxIntCount = 10; int32_t beginOffset = appendTo.length(); - const NumberFormat *currentNumberFormat; DateFormatSymbols::ECapitalizationContextUsageType capContextUsageType = DateFormatSymbols::kCapContextUsageOther; - UBool isHebrewCalendar = (uprv_strcmp(cal.getType(),"hebrew") == 0); - UBool isChineseCalendar = (uprv_strcmp(cal.getType(),"chinese") == 0 || uprv_strcmp(cal.getType(),"dangi") == 0); - // if the pattern character is unrecognized, signal an error and dump out if (patternCharIndex == UDAT_FIELD_COUNT) { @@ -1501,35 +1506,37 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo, // Don't get value unless it is useful if (field < UCAL_FIELD_COUNT) { value = (patternCharIndex != UDAT_RELATED_YEAR_FIELD)? cal.get(field, status): cal.getRelatedYear(status); - } - if (U_FAILURE(status)) { - return; + if (U_FAILURE(status)) { + return; + } } - currentNumberFormat = getNumberFormatByIndex(patternCharIndex); + const NumberFormat *currentNumberFormat = getNumberFormatByIndex(patternCharIndex); if (currentNumberFormat == nullptr) { status = U_INTERNAL_PROGRAM_ERROR; return; } - UnicodeString hebr("hebr", 4, US_INV); switch (patternCharIndex) { // for any "G" symbol, write out the appropriate era string // "GGGG" is wide era name, "GGGGG" is narrow era name, anything else is abbreviated name case UDAT_ERA_FIELD: - if (isChineseCalendar) { - zeroPaddingNumber(currentNumberFormat,appendTo, value, 1, 9); // as in ICU4J - } else { - if (count == 5) { - _appendSymbol(appendTo, value, fSymbols->fNarrowEras, fSymbols->fNarrowErasCount); - capContextUsageType = DateFormatSymbols::kCapContextUsageEraNarrow; - } else if (count == 4) { - _appendSymbol(appendTo, value, fSymbols->fEraNames, fSymbols->fEraNamesCount); - capContextUsageType = DateFormatSymbols::kCapContextUsageEraWide; + { + const auto* calType = cal.getType(); + if (uprv_strcmp(calType,"chinese") == 0 || uprv_strcmp(calType,"dangi") == 0) { + zeroPaddingNumber(currentNumberFormat,appendTo, value, 1, 9); // as in ICU4J } else { - _appendSymbol(appendTo, value, fSymbols->fEras, fSymbols->fErasCount); - capContextUsageType = DateFormatSymbols::kCapContextUsageEraAbbrev; + if (count == 5) { + _appendSymbol(appendTo, value, fSymbols->fNarrowEras, fSymbols->fNarrowErasCount); + capContextUsageType = DateFormatSymbols::kCapContextUsageEraNarrow; + } else if (count == 4) { + _appendSymbol(appendTo, value, fSymbols->fEraNames, fSymbols->fEraNamesCount); + capContextUsageType = DateFormatSymbols::kCapContextUsageEraWide; + } else { + _appendSymbol(appendTo, value, fSymbols->fEras, fSymbols->fErasCount); + capContextUsageType = DateFormatSymbols::kCapContextUsageEraAbbrev; + } } } break; @@ -1568,7 +1575,7 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo, // for "MMMMM"/"LLLLL", use the narrow form case UDAT_MONTH_FIELD: case UDAT_STANDALONE_MONTH_FIELD: - if ( isHebrewCalendar ) { + if (uprv_strcmp(cal.getType(),"hebrew") == 0) { HebrewCalendar *hc = (HebrewCalendar*)&cal; if (hc->isLeapYear(hc->get(UCAL_YEAR,status)) && value == 6 && count >= 3 ) value = 13; // Show alternate form for Adar II in leap years in Hebrew calendar. @@ -1756,7 +1763,8 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo, UDate date = cal.getTime(status); const TimeZoneFormat *tzfmt = tzFormat(status); if (U_SUCCESS(status)) { - if (patternCharIndex == UDAT_TIMEZONE_FIELD) { + switch (patternCharIndex) { + case UDAT_TIMEZONE_FIELD: if (count < 4) { // "z", "zz", "zzz" tzfmt->format(UTZFMT_STYLE_SPECIFIC_SHORT, tz, date, zoneString); @@ -1766,8 +1774,8 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo, tzfmt->format(UTZFMT_STYLE_SPECIFIC_LONG, tz, date, zoneString); capContextUsageType = DateFormatSymbols::kCapContextUsageMetazoneLong; } - } - else if (patternCharIndex == UDAT_TIMEZONE_RFC_FIELD) { + break; + case UDAT_TIMEZONE_RFC_FIELD: if (count < 4) { // "Z" tzfmt->format(UTZFMT_STYLE_ISO_BASIC_LOCAL_FULL, tz, date, zoneString); @@ -1778,8 +1786,8 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo, // "ZZ", "ZZZ", "ZZZZ" tzfmt->format(UTZFMT_STYLE_LOCALIZED_GMT, tz, date, zoneString); } - } - else if (patternCharIndex == UDAT_TIMEZONE_GENERIC_FIELD) { + break; + case UDAT_TIMEZONE_GENERIC_FIELD: if (count == 1) { // "v" tzfmt->format(UTZFMT_STYLE_GENERIC_SHORT, tz, date, zoneString); @@ -1789,8 +1797,8 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo, tzfmt->format(UTZFMT_STYLE_GENERIC_LONG, tz, date, zoneString); capContextUsageType = DateFormatSymbols::kCapContextUsageMetazoneLong; } - } - else if (patternCharIndex == UDAT_TIMEZONE_SPECIAL_FIELD) { + break; + case UDAT_TIMEZONE_SPECIAL_FIELD: if (count == 1) { // "V" tzfmt->format(UTZFMT_STYLE_ZONE_ID_SHORT, tz, date, zoneString); @@ -1805,8 +1813,8 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo, tzfmt->format(UTZFMT_STYLE_GENERIC_LOCATION, tz, date, zoneString); capContextUsageType = DateFormatSymbols::kCapContextUsageZoneLong; } - } - else if (patternCharIndex == UDAT_TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD) { + break; + case UDAT_TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD: if (count == 1) { // "O" tzfmt->format(UTZFMT_STYLE_LOCALIZED_GMT_SHORT, tz, date, zoneString); @@ -1814,8 +1822,8 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo, // "OOOO" tzfmt->format(UTZFMT_STYLE_LOCALIZED_GMT, tz, date, zoneString); } - } - else if (patternCharIndex == UDAT_TIMEZONE_ISO_FIELD) { + break; + case UDAT_TIMEZONE_ISO_FIELD: if (count == 1) { // "X" tzfmt->format(UTZFMT_STYLE_ISO_BASIC_SHORT, tz, date, zoneString); @@ -1832,8 +1840,8 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo, // "XXXXX" tzfmt->format(UTZFMT_STYLE_ISO_EXTENDED_FULL, tz, date, zoneString); } - } - else if (patternCharIndex == UDAT_TIMEZONE_ISO_LOCAL_FIELD) { + break; + case UDAT_TIMEZONE_ISO_LOCAL_FIELD: if (count == 1) { // "x" tzfmt->format(UTZFMT_STYLE_ISO_BASIC_LOCAL_SHORT, tz, date, zoneString); @@ -1850,8 +1858,8 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo, // "xxxxx" tzfmt->format(UTZFMT_STYLE_ISO_EXTENDED_LOCAL_FULL, tz, date, zoneString); } - } - else { + break; + default: UPRV_UNREACHABLE_EXIT; } } @@ -2148,21 +2156,29 @@ SimpleDateFormat::zeroPaddingNumber( if (currentNumberFormat == fNumberFormat && fSimpleNumberFormatter) { // Can use fast path + // We create UFormattedNumberData ourselves to avoid a heap allocation + // and corresponding free. Set the pointer to null afterwards to prevent + // the implementation from attempting to free it. UErrorCode localStatus = U_ZERO_ERROR; - number::SimpleNumber number = number::SimpleNumber::forInt64(value, localStatus); + number::impl::UFormattedNumberData data; + data.quantity.setToLong(value); + number::SimpleNumber number(&data, localStatus); number.setMinimumIntegerDigits(minDigits, localStatus); - number.truncateStart(maxDigits, localStatus); + number.setMaximumIntegerDigits(maxDigits, localStatus); number::FormattedNumber result = fSimpleNumberFormatter->format(std::move(number), localStatus); if (U_FAILURE(localStatus)) { + result.fData = nullptr; return; } - appendTo.append(result.toTempString(localStatus)); + UnicodeStringAppendable appendable(appendTo); + result.appendTo(appendable, localStatus); + result.fData = nullptr; return; } // Check for RBNF (no clone necessary) - auto* rbnf = dynamic_cast<const RuleBasedNumberFormat*>(currentNumberFormat); + const auto* rbnf = dynamic_cast<const RuleBasedNumberFormat*>(currentNumberFormat); if (rbnf != nullptr) { FieldPosition pos(FieldPosition::DONT_CARE); rbnf->format(value, appendTo, pos); // 3rd arg is there to speed up processing @@ -2636,12 +2652,8 @@ ExitParse: cal.setTime(workCal->getTime(status), status); } - if (numericLeapMonthFormatter != nullptr) { - delete numericLeapMonthFormatter; - } - if (calClone != nullptr) { - delete calClone; - } + delete numericLeapMonthFormatter; + delete calClone; // If any Calendar calls failed, we pretend that we // couldn't parse the string, when in reality this isn't quite accurate-- @@ -3902,7 +3914,7 @@ void SimpleDateFormat::parseInt(const UnicodeString& text, UBool allowNegative, const NumberFormat *fmt) const { UnicodeString oldPrefix; - auto* fmtAsDF = dynamic_cast<const DecimalFormat*>(fmt); + const auto* fmtAsDF = dynamic_cast<const DecimalFormat*>(fmt); LocalPointer<DecimalFormat> df; if (!allowNegative && fmtAsDF != nullptr) { df.adoptInstead(fmtAsDF->clone()); diff --git a/contrib/libs/icu/i18n/string_segment.cpp b/contrib/libs/icu/i18n/string_segment.cpp index 2ddb738f4d..ddfd6ebf68 100644 --- a/contrib/libs/icu/i18n/string_segment.cpp +++ b/contrib/libs/icu/i18n/string_segment.cpp @@ -62,7 +62,7 @@ UnicodeString StringSegment::toUnicodeString() const { return UnicodeString(fStr.getBuffer() + fStart, fEnd - fStart); } -const UnicodeString StringSegment::toTempUnicodeString() const { +UnicodeString StringSegment::toTempUnicodeString() const { // Use the readonly-aliasing constructor for efficiency. return UnicodeString(false, fStr.getBuffer() + fStart, fEnd - fStart); } diff --git a/contrib/libs/icu/i18n/string_segment.h b/contrib/libs/icu/i18n/string_segment.h index b581f7e575..38eb623703 100644 --- a/contrib/libs/icu/i18n/string_segment.h +++ b/contrib/libs/icu/i18n/string_segment.h @@ -61,7 +61,7 @@ class U_I18N_API StringSegment : public UMemory { UnicodeString toUnicodeString() const; - const UnicodeString toTempUnicodeString() const; + UnicodeString toTempUnicodeString() const; /** * Returns the first code point in the string segment, or -1 if the string starts with an invalid diff --git a/contrib/libs/icu/i18n/strmatch.cpp b/contrib/libs/icu/i18n/strmatch.cpp index ff52eeacdc..b6a5c94e98 100644 --- a/contrib/libs/icu/i18n/strmatch.cpp +++ b/contrib/libs/icu/i18n/strmatch.cpp @@ -98,7 +98,7 @@ UMatchDegree StringMatcher::matches(const Replaceable& text, for (i=pattern.length()-1; i>=0; --i) { char16_t keyChar = pattern.charAt(i); UnicodeMatcher* subm = data->lookupMatcher(keyChar); - if (subm == 0) { + if (subm == nullptr) { if (cursor > limit && keyChar == text.charAt(cursor)) { --cursor; @@ -129,7 +129,7 @@ UMatchDegree StringMatcher::matches(const Replaceable& text, } char16_t keyChar = pattern.charAt(i); UnicodeMatcher* subm = data->lookupMatcher(keyChar); - if (subm == 0) { + if (subm == nullptr) { // Don't need the cursor < limit check if // incremental is true (because it's done above); do need // it otherwise. @@ -170,7 +170,7 @@ UnicodeString& StringMatcher::toPattern(UnicodeString& result, for (int32_t i=0; i<pattern.length(); ++i) { char16_t keyChar = pattern.charAt(i); const UnicodeMatcher* m = data->lookupMatcher(keyChar); - if (m == 0) { + if (m == nullptr) { ICU_Utility::appendToRule(result, keyChar, false, escapeUnprintable, quoteBuf); } else { ICU_Utility::appendToRule(result, m->toPattern(str, escapeUnprintable), @@ -195,7 +195,7 @@ UBool StringMatcher::matchesIndexValue(uint8_t v) const { } UChar32 c = pattern.char32At(0); const UnicodeMatcher *m = data->lookupMatcher(c); - return (m == 0) ? ((c & 0xFF) == v) : m->matchesIndexValue(v); + return (m == nullptr) ? ((c & 0xFF) == v) : m->matchesIndexValue(v); } /** diff --git a/contrib/libs/icu/i18n/stsearch.cpp b/contrib/libs/icu/i18n/stsearch.cpp index 395ce1cdc1..3641d98e7c 100644 --- a/contrib/libs/icu/i18n/stsearch.cpp +++ b/contrib/libs/icu/i18n/stsearch.cpp @@ -291,9 +291,9 @@ StringSearch * StringSearch::safeClone() const m_breakiterator_, status); /* test for nullptr */ - if (result == 0) { + if (result == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; - return 0; + return nullptr; } result->setOffset(getOffset(), status); result->setMatchStart(m_strsrch_->search->matchedIndex); diff --git a/contrib/libs/icu/i18n/taiwncal.cpp b/contrib/libs/icu/i18n/taiwncal.cpp index 48f0b99e18..e6ffd71ba3 100644 --- a/contrib/libs/icu/i18n/taiwncal.cpp +++ b/contrib/libs/icu/i18n/taiwncal.cpp @@ -20,6 +20,7 @@ #if !UCONFIG_NO_FORMATTING #include "taiwncal.h" +#include "gregoimp.h" #include "unicode/gregocal.h" #include "umutex.h" #include <float.h> @@ -30,7 +31,7 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(TaiwanCalendar) static const int32_t kTaiwanEraStart = 1911; // 1911 (Gregorian) -static const int32_t kGregorianEpoch = 1970; +static const int32_t kGregorianEpoch = 1970; TaiwanCalendar::TaiwanCalendar(const Locale& aLocale, UErrorCode& success) : GregorianCalendar(aLocale, success) @@ -63,24 +64,37 @@ const char *TaiwanCalendar::getType() const return "roc"; } -int32_t TaiwanCalendar::handleGetExtendedYear() +int32_t TaiwanCalendar::handleGetExtendedYear(UErrorCode& status) { + if (U_FAILURE(status)) { + return 0; + } + // EXTENDED_YEAR in TaiwanCalendar is a Gregorian year // The default value of EXTENDED_YEAR is 1970 (Minguo 59) - int32_t year = kGregorianEpoch; - if (newerField(UCAL_EXTENDED_YEAR, UCAL_YEAR) == UCAL_EXTENDED_YEAR && newerField(UCAL_EXTENDED_YEAR, UCAL_ERA) == UCAL_EXTENDED_YEAR) { - year = internalGet(UCAL_EXTENDED_YEAR, kGregorianEpoch); - } else { - int32_t era = internalGet(UCAL_ERA, MINGUO); - if(era == MINGUO) { - year = internalGet(UCAL_YEAR, 1) + kTaiwanEraStart; - } else if(era == BEFORE_MINGUO) { - year = 1 - internalGet(UCAL_YEAR, 1) + kTaiwanEraStart; - } + return internalGet(UCAL_EXTENDED_YEAR, kGregorianEpoch); + } + int32_t era = internalGet(UCAL_ERA, MINGUO); + int32_t year = internalGet(UCAL_YEAR, 1); + switch (era) { + case MINGUO: + if (uprv_add32_overflow(year, kTaiwanEraStart, &year)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + return year; + case BEFORE_MINGUO: + if (uprv_add32_overflow(1 + kTaiwanEraStart, -year, &year)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + return year; + default: + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; } - return year; } void TaiwanCalendar::handleComputeFields(int32_t julianDay, UErrorCode& status) @@ -98,85 +112,16 @@ void TaiwanCalendar::handleComputeFields(int32_t julianDay, UErrorCode& status) int32_t TaiwanCalendar::handleGetLimit(UCalendarDateFields field, ELimitType limitType) const { - if(field == UCAL_ERA) { - if(limitType == UCAL_LIMIT_MINIMUM || limitType == UCAL_LIMIT_GREATEST_MINIMUM) { - return BEFORE_MINGUO; - } else { - return MINGUO; - } - } else { + if(field != UCAL_ERA) { return GregorianCalendar::handleGetLimit(field,limitType); } -} - -#if 0 -void TaiwanCalendar::timeToFields(UDate theTime, UBool quick, UErrorCode& status) -{ - //Calendar::timeToFields(theTime, quick, status); - - int32_t era = internalGet(UCAL_ERA); - int32_t year = internalGet(UCAL_YEAR); - - if(era == GregorianCalendar::BC) { - year = 1-year; - era = TaiwanCalendar::MINGUO; - } else if(era == GregorianCalendar::AD) { - era = TaiwanCalendar::MINGUO; - } else { - status = U_INTERNAL_PROGRAM_ERROR; + if (limitType == UCAL_LIMIT_MINIMUM || limitType == UCAL_LIMIT_GREATEST_MINIMUM) { + return BEFORE_MINGUO; } - - year = year - kTaiwanEraStart; - - internalSet(UCAL_ERA, era); - internalSet(UCAL_YEAR, year); + return MINGUO; } -#endif - -/** - * The system maintains a static default century start date and Year. They are - * initialized the first time they are used. Once the system default century date - * and year are set, they do not change. - */ -static UDate gSystemDefaultCenturyStart = DBL_MIN; -static int32_t gSystemDefaultCenturyStartYear = -1; -static icu::UInitOnce gSystemDefaultCenturyInit {}; -UBool TaiwanCalendar::haveDefaultCentury() const -{ - return true; -} - -static void U_CALLCONV initializeSystemDefaultCentury() -{ - // initialize systemDefaultCentury and systemDefaultCenturyYear based - // on the current time. They'll be set to 80 years before - // the current time. - UErrorCode status = U_ZERO_ERROR; - TaiwanCalendar calendar(Locale("@calendar=roc"),status); - if (U_SUCCESS(status)) - { - calendar.setTime(Calendar::getNow(), status); - calendar.add(UCAL_YEAR, -80, status); - - gSystemDefaultCenturyStart = calendar.getTime(status); - gSystemDefaultCenturyStartYear = calendar.get(UCAL_YEAR, status); - } - // We have no recourse upon failure unless we want to propagate the failure - // out. -} - -UDate TaiwanCalendar::defaultCenturyStart() const { - // lazy-evaluate systemDefaultCenturyStart - umtx_initOnce(gSystemDefaultCenturyInit, &initializeSystemDefaultCentury); - return gSystemDefaultCenturyStart; -} - -int32_t TaiwanCalendar::defaultCenturyStartYear() const { - // lazy-evaluate systemDefaultCenturyStartYear - umtx_initOnce(gSystemDefaultCenturyInit, &initializeSystemDefaultCentury); - return gSystemDefaultCenturyStartYear; -} +IMPL_SYSTEM_DEFAULT_CENTURY(TaiwanCalendar, "@calendar=roc") U_NAMESPACE_END diff --git a/contrib/libs/icu/i18n/taiwncal.h b/contrib/libs/icu/i18n/taiwncal.h index b0a30f9108..a8fa3d1829 100644 --- a/contrib/libs/icu/i18n/taiwncal.h +++ b/contrib/libs/icu/i18n/taiwncal.h @@ -139,7 +139,7 @@ private: * @return the extended year * @internal */ - virtual int32_t handleGetExtendedYear() override; + virtual int32_t handleGetExtendedYear(UErrorCode& status) override; /** * Subclasses may override this method to compute several fields * specific to each calendar system. @@ -155,24 +155,7 @@ private: */ virtual int32_t handleGetLimit(UCalendarDateFields field, ELimitType limitType) const override; - /** - * Returns true because the Taiwan Calendar does have a default century - * @internal - */ - virtual UBool haveDefaultCentury() const override; - - /** - * Returns the date of the start of the default century - * @return start of century - in milliseconds since epoch, 1970 - * @internal - */ - virtual UDate defaultCenturyStart() const override; - - /** - * Returns the year in which the default century begins - * @internal - */ - virtual int32_t defaultCenturyStartYear() const override; + DECLARE_OVERRIDE_SYSTEM_DEFAULT_CENTURY }; U_NAMESPACE_END diff --git a/contrib/libs/icu/i18n/timezone.cpp b/contrib/libs/icu/i18n/timezone.cpp index 75479267d7..2f6794c506 100644 --- a/contrib/libs/icu/i18n/timezone.cpp +++ b/contrib/libs/icu/i18n/timezone.cpp @@ -42,7 +42,9 @@ #include "unicode/utypes.h" #include "unicode/ustring.h" #include "uassert.h" +#include "uinvchar.h" #include "ustr_imp.h" +#include "util.h" #ifdef U_DEBUG_TZ # include <stdio.h> @@ -75,7 +77,6 @@ static char gStrBuf[256]; #include "unicode/gregocal.h" #include "unicode/ures.h" #include "unicode/tzfmt.h" -#include "unicode/numfmt.h" #include "gregoimp.h" #include "uresimp.h" // struct UResourceBundle #include "olsontz.h" @@ -159,17 +160,17 @@ static UBool U_CALLCONV timeZone_cleanup() LEN_SYSTEM_ZONES = 0; uprv_free(MAP_SYSTEM_ZONES); - MAP_SYSTEM_ZONES = 0; + MAP_SYSTEM_ZONES = nullptr; gSystemZonesInitOnce.reset(); LEN_CANONICAL_SYSTEM_ZONES = 0; uprv_free(MAP_CANONICAL_SYSTEM_ZONES); - MAP_CANONICAL_SYSTEM_ZONES = 0; + MAP_CANONICAL_SYSTEM_ZONES = nullptr; gCanonicalZonesInitOnce.reset(); LEN_CANONICAL_SYSTEM_LOCATION_ZONES = 0; uprv_free(MAP_CANONICAL_SYSTEM_LOCATION_ZONES); - MAP_CANONICAL_SYSTEM_LOCATION_ZONES = 0; + MAP_CANONICAL_SYSTEM_LOCATION_ZONES = nullptr; gCanonicalLocationZonesInitOnce.reset(); return true; @@ -282,7 +283,7 @@ static UResourceBundle* openOlsonResource(const UnicodeString& id, char buf[128]; id.extract(0, sizeof(buf)-1, buf, sizeof(buf), ""); #endif - UResourceBundle *top = ures_openDirect(0, kZONEINFO, &ec); + UResourceBundle *top = ures_openDirect(nullptr, kZONEINFO, &ec); U_DEBUG_TZ_MSG(("pre: res sz=%d\n", ures_getSize(&res))); /* &res = */ getZoneByName(top, id, &res, ec); // Dereference if this is an alias. Docs say result should be 1 @@ -391,7 +392,7 @@ createSystemTimeZone(const UnicodeString& id, UErrorCode& ec) { if (U_FAILURE(ec)) { return nullptr; } - TimeZone* z = 0; + TimeZone* z = nullptr; StackUResourceBundle res; U_DEBUG_TZ_MSG(("pre-err=%s\n", u_errorName(ec))); UResourceBundle *top = openOlsonResource(id, res.ref(), ec); @@ -625,7 +626,7 @@ TimeZone::setDefault(const TimeZone& zone) static void U_CALLCONV initMap(USystemTimeZoneType type, UErrorCode& ec) { ucln_i18n_registerCleanup(UCLN_I18N_TIMEZONE, timeZone_cleanup); - UResourceBundle *res = ures_openDirect(0, kZONEINFO, &ec); + UResourceBundle *res = ures_openDirect(nullptr, kZONEINFO, &ec); res = ures_getByKey(res, kNAMES, res, &ec); // dereference Zones section if (U_SUCCESS(ec)) { int32_t size = ures_getSize(res); @@ -732,6 +733,11 @@ void TimeZone::getOffset(UDate date, UBool local, int32_t& rawOffset, int32_t year, month, dom, dow, millis; double day = ClockMath::floorDivide(date, U_MILLIS_PER_DAY, &millis); + // out of the range + if (day < INT32_MIN || day > INT32_MAX) { + ec = U_ILLEGAL_ARGUMENT_ERROR; + return; + } Grego::dayToFields(day, year, month, dom, dow); dstOffset = getOffset(GregorianCalendar::AD, year, month, dom, @@ -773,7 +779,7 @@ private: UBool getID(int32_t i, UErrorCode& ec) { int32_t idLen = 0; const char16_t* id = nullptr; - UResourceBundle *top = ures_openDirect(0, kZONEINFO, &ec); + UResourceBundle *top = ures_openDirect(nullptr, kZONEINFO, &ec); top = ures_getByKey(top, kNAMES, top, &ec); // dereference Zones section id = ures_getStringByIndex(top, i, &idLen, &ec); if(U_FAILURE(ec)) { @@ -849,7 +855,7 @@ public: } // Walk through the base map - UResourceBundle *res = ures_openDirect(0, kZONEINFO, &ec); + UResourceBundle *res = ures_openDirect(nullptr, kZONEINFO, &ec); res = ures_getByKey(res, kNAMES, res, &ec); // dereference Zones section for (int32_t i = 0; i < baseLen; i++) { int32_t zidx = baseMap[i]; @@ -964,7 +970,7 @@ public: ++pos; return &unistr; } - return 0; + return nullptr; } virtual void reset(UErrorCode& /*status*/) override { @@ -1369,123 +1375,94 @@ TimeZone::getCustomID(const UnicodeString& id, UnicodeString& normalized, UError UBool TimeZone::parseCustomID(const UnicodeString& id, int32_t& sign, int32_t& hour, int32_t& min, int32_t& sec) { - static const int32_t kParseFailed = -99999; - - NumberFormat* numberFormat = 0; - UnicodeString idUppercase = id; - idUppercase.toUpper(""); - - if (id.length() > GMT_ID_LENGTH && - idUppercase.startsWith(GMT_ID, GMT_ID_LENGTH)) - { - ParsePosition pos(GMT_ID_LENGTH); - sign = 1; - hour = 0; - min = 0; - sec = 0; - - if (id[pos.getIndex()] == MINUS /*'-'*/) { - sign = -1; - } else if (id[pos.getIndex()] != PLUS /*'+'*/) { + if (id.length() < GMT_ID_LENGTH) { + return false; + } + if (0 != u_strncasecmp(id.getBuffer(), GMT_ID, GMT_ID_LENGTH, 0)) { + return false; + } + sign = 1; + hour = 0; + min = 0; + sec = 0; + + if (id[GMT_ID_LENGTH] == MINUS /*'-'*/) { + sign = -1; + } else if (id[GMT_ID_LENGTH] != PLUS /*'+'*/) { + return false; + } + + int32_t start = GMT_ID_LENGTH + 1; + int32_t pos = start; + hour = ICU_Utility::parseNumber(id, pos, 10); + if (pos == id.length()) { + // Handle the following cases + // HHmmss + // Hmmss + // HHmm + // Hmm + // HH + // H + + // Get all digits + // Should be 1 to 6 digits. + int32_t length = pos - start; + switch (length) { + case 1: // H + case 2: // HH + // already set to hour + break; + case 3: // Hmm + case 4: // HHmm + min = hour % 100; + hour /= 100; + break; + case 5: // Hmmss + case 6: // HHmmss + sec = hour % 100; + min = (hour/100) % 100; + hour /= 10000; + break; + default: + // invalid range + return false; + } + } else { + // Handle the following cases + // HH:mm:ss + // H:mm:ss + // HH:mm + // H:mm + if (pos - start < 1 || pos - start > 2 || id[pos] != COLON) { return false; } - pos.setIndex(pos.getIndex() + 1); - - UErrorCode success = U_ZERO_ERROR; - numberFormat = NumberFormat::createInstance(success); - if(U_FAILURE(success)){ + pos++; // skip : after H or HH + if (id.length() == pos) { return false; } - numberFormat->setParseIntegerOnly(true); - //numberFormat->setLenient(true); // TODO: May need to set this, depends on latest timezone parsing - - // Look for either hh:mm, hhmm, or hh - int32_t start = pos.getIndex(); - Formattable n(kParseFailed); - numberFormat->parse(id, n, pos); - if (pos.getIndex() == start) { - delete numberFormat; + start = pos; + min = ICU_Utility::parseNumber(id, pos, 10); + if (pos - start != 2) { return false; } - hour = n.getLong(); - - if (pos.getIndex() < id.length()) { - if (pos.getIndex() - start > 2 - || id[pos.getIndex()] != COLON) { - delete numberFormat; + if (id.length() > pos) { + if (id[pos] != COLON) { return false; } - // hh:mm - pos.setIndex(pos.getIndex() + 1); - int32_t oldPos = pos.getIndex(); - n.setLong(kParseFailed); - numberFormat->parse(id, n, pos); - if ((pos.getIndex() - oldPos) != 2) { - // must be 2 digits - delete numberFormat; - return false; - } - min = n.getLong(); - if (pos.getIndex() < id.length()) { - if (id[pos.getIndex()] != COLON) { - delete numberFormat; - return false; - } - // [:ss] - pos.setIndex(pos.getIndex() + 1); - oldPos = pos.getIndex(); - n.setLong(kParseFailed); - numberFormat->parse(id, n, pos); - if (pos.getIndex() != id.length() - || (pos.getIndex() - oldPos) != 2) { - delete numberFormat; - return false; - } - sec = n.getLong(); - } - } else { - // Supported formats are below - - // - // HHmmss - // Hmmss - // HHmm - // Hmm - // HH - // H - - int32_t length = pos.getIndex() - start; - if (length <= 0 || 6 < length) { - // invalid length - delete numberFormat; + pos++; // skip : after mm + start = pos; + sec = ICU_Utility::parseNumber(id, pos, 10); + if (pos - start != 2 || id.length() > pos) { return false; } - switch (length) { - case 1: - case 2: - // already set to hour - break; - case 3: - case 4: - min = hour % 100; - hour /= 100; - break; - case 5: - case 6: - sec = hour % 100; - min = (hour/100) % 100; - hour /= 10000; - break; - } } - - delete numberFormat; - - if (hour > kMAX_CUSTOM_HOUR || min > kMAX_CUSTOM_MIN || sec > kMAX_CUSTOM_SEC) { - return false; - } - return true; } - return false; + if (hour > kMAX_CUSTOM_HOUR || + min > kMAX_CUSTOM_MIN || + sec > kMAX_CUSTOM_SEC) { + return false; + } + return true; } UnicodeString& @@ -1592,6 +1569,22 @@ TimeZone::getCanonicalID(const UnicodeString& id, UnicodeString& canonicalID, UB } UnicodeString& +TimeZone::getIanaID(const UnicodeString& id, UnicodeString& ianaID, UErrorCode& status) +{ + ianaID.remove(); + if (U_FAILURE(status)) { + return ianaID; + } + if (id.compare(ConstChar16Ptr(UNKNOWN_ZONE_ID), UNKNOWN_ZONE_ID_LENGTH) == 0) { + status = U_ILLEGAL_ARGUMENT_ERROR; + ianaID.setToBogus(); + } else { + ZoneMeta::getIanaID(id, ianaID, status); + } + return ianaID; +} + +UnicodeString& TimeZone::getWindowsID(const UnicodeString& id, UnicodeString& winid, UErrorCode& status) { winid.remove(); if (U_FAILURE(status)) { diff --git a/contrib/libs/icu/i18n/tmutfmt.cpp b/contrib/libs/icu/i18n/tmutfmt.cpp index 87b509ea35..9f7bc89eeb 100644 --- a/contrib/libs/icu/i18n/tmutfmt.cpp +++ b/contrib/libs/icu/i18n/tmutfmt.cpp @@ -11,6 +11,8 @@ #if !UCONFIG_NO_FORMATTING +#include <utility> + #include "unicode/decimfmt.h" #include "unicode/localpointer.h" #include "plurrule_impl.h" @@ -19,6 +21,7 @@ #include "cmemory.h" #include "cstring.h" #include "hash.h" +#include "ulocimp.h" #include "uresimp.h" #include "ureslocs.h" #include "unicode/msgfmt.h" @@ -556,14 +559,12 @@ TimeUnitFormat::searchInLocaleChain(UTimeUnitFormatStyle style, const char* key, return; } UErrorCode status = U_ZERO_ERROR; - char parentLocale[ULOC_FULLNAME_CAPACITY]; - uprv_strcpy(parentLocale, localeName); - int32_t locNameLen; + CharString parentLocale(localeName, status); U_ASSERT(countToPatterns != nullptr); - while ((locNameLen = uloc_getParent(parentLocale, parentLocale, - ULOC_FULLNAME_CAPACITY, &status)) >= 0){ + for (;;) { + parentLocale = ulocimp_getParent(parentLocale.data(), status); // look for pattern for srcPluralCount in locale tree - LocalUResourceBundlePointer rb(ures_open(U_ICUDATA_UNIT, parentLocale, &status)); + LocalUResourceBundlePointer rb(ures_open(U_ICUDATA_UNIT, parentLocale.data(), &status)); LocalUResourceBundlePointer unitsRes(ures_getByKey(rb.getAlias(), key, nullptr, &status)); const char* timeUnitName = getTimeUnitName(srcTimeUnitField, status); LocalUResourceBundlePointer countsToPatternRB(ures_getByKey(unitsRes.getAlias(), timeUnitName, nullptr, &status)); @@ -594,14 +595,14 @@ TimeUnitFormat::searchInLocaleChain(UTimeUnitFormatStyle style, const char* key, return; } status = U_ZERO_ERROR; - if (locNameLen == 0) { + if (parentLocale.isEmpty()) { break; } } // if no unitsShort resource was found even after fallback to root locale // then search the units resource fallback from the current level to root - if ( locNameLen == 0 && uprv_strcmp(key, gShortUnitsTag) == 0) { + if ( parentLocale.isEmpty() && uprv_strcmp(key, gShortUnitsTag) == 0) { #ifdef TMUTFMT_DEBUG std::cout << "loop into searchInLocaleChain since Short-Long-Alternative \n"; #endif diff --git a/contrib/libs/icu/i18n/translit.cpp b/contrib/libs/icu/i18n/translit.cpp index 29d38b12c7..42256140b1 100644 --- a/contrib/libs/icu/i18n/translit.cpp +++ b/contrib/libs/icu/i18n/translit.cpp @@ -96,7 +96,7 @@ static icu::UMutex registryMutex; /** * System transliterator registry; non-null when initialized. */ -static icu::TransliteratorRegistry* registry = 0; +static icu::TransliteratorRegistry* registry = nullptr; // Macro to check/initialize the registry. ONLY USE WITHIN // MUTEX. Avoids function call when registry is initialized. @@ -140,23 +140,21 @@ Transliterator::Transliterator(const UnicodeString& theID, * Destructor. */ Transliterator::~Transliterator() { - if (filter) { - delete filter; - } + delete filter; } /** * Copy constructor. */ Transliterator::Transliterator(const Transliterator& other) : - UObject(other), ID(other.ID), filter(0), + UObject(other), ID(other.ID), filter(nullptr), maximumContextLength(other.maximumContextLength) { // NUL-terminate the ID string, which is a non-aliased copy. ID.append((char16_t)0); ID.truncate(ID.length()-1); - if (other.filter != 0) { + if (other.filter != nullptr) { // We own the filter, so we must have our own copy filter = other.filter->clone(); } @@ -176,7 +174,7 @@ Transliterator& Transliterator::operator=(const Transliterator& other) { ID.getTerminatedBuffer(); maximumContextLength = other.maximumContextLength; - adoptFilter((other.filter == 0) ? 0 : other.filter->clone()); + adoptFilter(other.filter == nullptr ? nullptr : other.filter->clone()); return *this; } @@ -322,7 +320,7 @@ void Transliterator::transliterate(Replaceable& text, void Transliterator::transliterate(Replaceable& text, UTransPosition& index, UErrorCode& status) const { - _transliterate(text, index, 0, status); + _transliterate(text, index, nullptr, status); } /** @@ -365,7 +363,7 @@ void Transliterator::_transliterate(Replaceable& text, } // int32_t originalStart = index.contextStart; - if (insertion != 0) { + if (insertion != nullptr) { text.handleReplaceBetween(index.limit, index.limit, *insertion); index.limit += insertion->length(); index.contextLimit += insertion->length(); @@ -431,7 +429,7 @@ void Transliterator::filteredTransliterate(Replaceable& text, UBool rollback) const { // Short circuit path for transliterators with no filter in // non-incremental mode. - if (filter == 0 && !rollback) { + if (filter == nullptr && !rollback) { handleTransliterate(text, index, incremental); return; } @@ -915,7 +913,7 @@ Transliterator::createInstance(const UnicodeString& ID, UErrorCode& status) { if (U_FAILURE(status)) { - return 0; + return nullptr; } UnicodeString canonID; @@ -978,8 +976,8 @@ Transliterator* Transliterator::createBasicInstance(const UnicodeString& id, const UnicodeString* canon) { UParseError pe; UErrorCode ec = U_ZERO_ERROR; - TransliteratorAlias* alias = 0; - Transliterator* t = 0; + TransliteratorAlias* alias = nullptr; + Transliterator* t = nullptr; umtx_lock(®istryMutex); if (HAVE_REGISTRY(ec)) { @@ -990,7 +988,7 @@ Transliterator* Transliterator::createBasicInstance(const UnicodeString& id, if (U_FAILURE(ec)) { delete t; delete alias; - return 0; + return nullptr; } // We may have not gotten a transliterator: Because we can't @@ -1000,7 +998,7 @@ Transliterator* Transliterator::createBasicInstance(const UnicodeString& id, // registry mutex. The alias may, in turn, generate another alias, so // we handle aliases in a loop. The max times through the loop is two. // [alan] - while (alias != 0) { + while (alias != nullptr) { U_ASSERT(t==0); // Rule-based aliases are handled with TransliteratorAlias:: // parse(), followed by TransliteratorRegistry::reget(). @@ -1010,7 +1008,7 @@ Transliterator* Transliterator::createBasicInstance(const UnicodeString& id, TransliteratorParser parser(ec); alias->parse(parser, pe, ec); delete alias; - alias = 0; + alias = nullptr; // Step 2. reget umtx_lock(®istryMutex); @@ -1023,7 +1021,7 @@ Transliterator* Transliterator::createBasicInstance(const UnicodeString& id, } else { t = alias->create(pe, ec); delete alias; - alias = 0; + alias = nullptr; break; } if (U_FAILURE(ec)) { @@ -1062,7 +1060,7 @@ Transliterator::createFromRules(const UnicodeString& ID, parser.parse(rules, dir, parseError, status); if (U_FAILURE(status)) { - return 0; + return nullptr; } // NOTE: The logic here matches that in TransliteratorRegistry. @@ -1476,14 +1474,14 @@ char16_t Transliterator::filteredCharAt(const Replaceable& text, int32_t i) cons * cannot itself proceed until the registry is initialized. */ UBool Transliterator::initializeRegistry(UErrorCode &status) { - if (registry != 0) { + if (registry != nullptr) { return true; } registry = new TransliteratorRegistry(status); - if (registry == 0 || U_FAILURE(status)) { + if (registry == nullptr || U_FAILURE(status)) { delete registry; - registry = 0; + registry = nullptr; return false; // can't create registry, no recovery } @@ -1526,7 +1524,7 @@ UBool Transliterator::initializeRegistry(UErrorCode &status) { UErrorCode lstatus = U_ZERO_ERROR; UResourceBundle *bundle, *transIDs, *colBund; bundle = ures_open(U_ICUDATA_TRANSLIT, nullptr/*open default locale*/, &lstatus); - transIDs = ures_getByKey(bundle, RB_RULE_BASED_IDS, 0, &lstatus); + transIDs = ures_getByKey(bundle, RB_RULE_BASED_IDS, nullptr, &lstatus); const UnicodeString T_PART = UNICODE_STRING_SIMPLE("-t-"); int32_t row, maxRows; @@ -1539,7 +1537,7 @@ UBool Transliterator::initializeRegistry(UErrorCode &status) { if (U_SUCCESS(lstatus)) { maxRows = ures_getSize(transIDs); for (row = 0; row < maxRows; row++) { - colBund = ures_getByIndex(transIDs, row, 0, &lstatus); + colBund = ures_getByIndex(transIDs, row, nullptr, &lstatus); if (U_SUCCESS(lstatus)) { UnicodeString id(ures_getKey(colBund), -1, US_INV); if(id.indexOf(T_PART) != -1) { diff --git a/contrib/libs/icu/i18n/transreg.cpp b/contrib/libs/icu/i18n/transreg.cpp index 46c68eb74d..226edc6ff9 100644 --- a/contrib/libs/icu/i18n/transreg.cpp +++ b/contrib/libs/icu/i18n/transreg.cpp @@ -11,6 +11,7 @@ */ #include "unicode/utypes.h" +#include "unicode/rep.h" #if !UCONFIG_NO_TRANSLITERATION @@ -84,7 +85,7 @@ TransliteratorAlias::TransliteratorAlias(const UnicodeString& theAliasID, const UnicodeSet* cpdFilter) : ID(), aliasesOrRules(theAliasID), - transes(0), + transes(nullptr), compoundFilter(cpdFilter), direction(UTRANS_FORWARD), type(TransliteratorAlias::SIMPLE) { @@ -107,8 +108,8 @@ TransliteratorAlias::TransliteratorAlias(const UnicodeString& theID, UTransDirection dir) : ID(theID), aliasesOrRules(rules), - transes(0), - compoundFilter(0), + transes(nullptr), + compoundFilter(nullptr), direction(dir), type(TransliteratorAlias::RULES) { } @@ -121,16 +122,16 @@ TransliteratorAlias::~TransliteratorAlias() { Transliterator* TransliteratorAlias::create(UParseError& pe, UErrorCode& ec) { if (U_FAILURE(ec)) { - return 0; + return nullptr; } Transliterator *t = nullptr; switch (type) { case SIMPLE: t = Transliterator::createInstance(aliasesOrRules, UTRANS_FORWARD, pe, ec); if(U_FAILURE(ec)){ - return 0; + return nullptr; } - if (compoundFilter != 0) + if (compoundFilter != nullptr) t->adoptFilter(compoundFilter->clone()); break; case COMPOUND: @@ -170,9 +171,9 @@ Transliterator* TransliteratorAlias::create(UParseError& pe, t = new CompoundTransliterator(ID, transliterators, (compoundFilter ? compoundFilter->clone() : nullptr), anonymousRBTs, pe, ec); - if (t == 0) { + if (t == nullptr) { ec = U_MEMORY_ALLOCATION_ERROR; - return 0; + return nullptr; } } else { for (int32_t i = 0; i < transliterators.size(); i++) @@ -252,7 +253,7 @@ class TransliteratorSpec : public UMemory { TransliteratorSpec::TransliteratorSpec(const UnicodeString& theSpec) : top(theSpec), - res(0) + res(nullptr) { UErrorCode status = U_ZERO_ERROR; Locale topLoc(""); @@ -260,12 +261,12 @@ TransliteratorSpec::TransliteratorSpec(const UnicodeString& theSpec) if (!topLoc.isBogus()) { res = new ResourceBundle(U_ICUDATA_TRANSLIT, topLoc, status); /* test for nullptr */ - if (res == 0) { + if (res == nullptr) { return; } if (U_FAILURE(status) || status == U_USING_DEFAULT_WARNING) { delete res; - res = 0; + res = nullptr; } } @@ -280,7 +281,7 @@ TransliteratorSpec::TransliteratorSpec(const UnicodeString& theSpec) } // Canonicalize top - if (res != 0) { + if (res != nullptr) { // Canonicalize locale name UnicodeString locStr; LocaleUtility::initNameFromLocale(topLoc, locStr); @@ -307,7 +308,7 @@ UBool TransliteratorSpec::hasFallback() const { void TransliteratorSpec::reset() { if (spec != top) { spec = top; - isSpecLocale = (res != 0); + isSpecLocale = (res != nullptr); setupNext(); } } @@ -473,7 +474,7 @@ private: }; TransliteratorEntry::TransliteratorEntry() { - u.prototype = 0; + u.prototype = nullptr; compoundFilter = nullptr; entryType = NONE; DEBUG_newEntry(this); @@ -531,7 +532,7 @@ TransliteratorRegistry::TransliteratorRegistry(UErrorCode& status) : registry(true, status), specDAG(true, SPECDAG_INIT_SIZE, status), variantList(VARIANT_LIST_INIT_SIZE, status), - availableIDs(AVAILABLE_IDS_INIT_SIZE, status) + availableIDs(true, AVAILABLE_IDS_INIT_SIZE, status) { registry.setValueDeleter(deleteEntry); variantList.setDeleter(uprv_deleteUObject); @@ -540,8 +541,6 @@ TransliteratorRegistry::TransliteratorRegistry(UErrorCode& status) : if (emptyString != nullptr) { variantList.adoptElement(emptyString, status); } - availableIDs.setDeleter(uprv_deleteUObject); - availableIDs.setComparer(uhash_compareCaselessUnicodeString); specDAG.setValueDeleter(uhash_deleteHashtable); } @@ -554,7 +553,7 @@ Transliterator* TransliteratorRegistry::get(const UnicodeString& ID, UErrorCode& status) { U_ASSERT(aliasReturn == nullptr); TransliteratorEntry *entry = find(ID); - return (entry == 0) ? 0 + return entry == nullptr ? nullptr : instantiateEntry(ID, entry, aliasReturn, status); } @@ -565,11 +564,11 @@ Transliterator* TransliteratorRegistry::reget(const UnicodeString& ID, U_ASSERT(aliasReturn == nullptr); TransliteratorEntry *entry = find(ID); - if (entry == 0) { + if (entry == nullptr) { // We get to this point if there are two threads, one of which // is instantiating an ID, and another of which is removing // the same ID from the registry, and the timing is just right. - return 0; + return nullptr; } // The usage model for the caller is that they will first call @@ -589,7 +588,7 @@ Transliterator* TransliteratorRegistry::reget(const UnicodeString& ID, entry->entryType == TransliteratorEntry::LOCALE_RULES) { if (parser.idBlockVector.isEmpty() && parser.dataVector.isEmpty()) { - entry->u.data = 0; + entry->u.data = nullptr; entry->entryType = TransliteratorEntry::ALIAS; entry->stringArg = UNICODE_STRING_SIMPLE("Any-nullptr"); } @@ -714,7 +713,7 @@ void TransliteratorRegistry::remove(const UnicodeString& ID) { TransliteratorIDParser::STVtoID(source, target, variant, id); registry.remove(id); removeSTV(source, target, variant); - availableIDs.removeElement((void*) &id); + availableIDs.remove(id); } //---------------------------------------------------------------------- @@ -728,7 +727,7 @@ void TransliteratorRegistry::remove(const UnicodeString& ID) { * i from 0 to countAvailableIDs() - 1. */ int32_t TransliteratorRegistry::countAvailableIDs() const { - return availableIDs.size(); + return availableIDs.count(); } /** @@ -738,10 +737,27 @@ int32_t TransliteratorRegistry::countAvailableIDs() const { * range, the result of getAvailableID(0) is returned. */ const UnicodeString& TransliteratorRegistry::getAvailableID(int32_t index) const { - if (index < 0 || index >= availableIDs.size()) { + if (index < 0 || index >= availableIDs.count()) { index = 0; } - return *(const UnicodeString*) availableIDs[index]; + + int32_t pos = UHASH_FIRST; + const UHashElement *e = nullptr; + while (index-- >= 0) { + e = availableIDs.nextElement(pos); + if (e == nullptr) { + break; + } + } + + if (e != nullptr) { + return *(UnicodeString*) e->key.pointer; + } + + // If the code reaches here, the hash table was likely modified during iteration. + // Return an statically initialized empty string due to reference return type. + static UnicodeString empty; + return empty; } StringEnumeration* TransliteratorRegistry::getAvailableIDs() const { @@ -755,14 +771,14 @@ int32_t TransliteratorRegistry::countAvailableSources() const { UnicodeString& TransliteratorRegistry::getAvailableSource(int32_t index, UnicodeString& result) const { int32_t pos = UHASH_FIRST; - const UHashElement *e = 0; + const UHashElement* e = nullptr; while (index-- >= 0) { e = specDAG.nextElement(pos); - if (e == 0) { + if (e == nullptr) { break; } } - if (e == 0) { + if (e == nullptr) { result.truncate(0); } else { result = *(UnicodeString*) e->key.pointer; @@ -772,26 +788,26 @@ UnicodeString& TransliteratorRegistry::getAvailableSource(int32_t index, int32_t TransliteratorRegistry::countAvailableTargets(const UnicodeString& source) const { Hashtable *targets = (Hashtable*) specDAG.get(source); - return (targets == 0) ? 0 : targets->count(); + return (targets == nullptr) ? 0 : targets->count(); } UnicodeString& TransliteratorRegistry::getAvailableTarget(int32_t index, const UnicodeString& source, UnicodeString& result) const { Hashtable *targets = (Hashtable*) specDAG.get(source); - if (targets == 0) { + if (targets == nullptr) { result.truncate(0); // invalid source return result; } int32_t pos = UHASH_FIRST; - const UHashElement *e = 0; + const UHashElement* e = nullptr; while (index-- >= 0) { e = targets->nextElement(pos); - if (e == 0) { + if (e == nullptr) { break; } } - if (e == 0) { + if (e == nullptr) { result.truncate(0); // invalid index } else { result = *(UnicodeString*) e->key.pointer; @@ -802,7 +818,7 @@ UnicodeString& TransliteratorRegistry::getAvailableTarget(int32_t index, int32_t TransliteratorRegistry::countAvailableVariants(const UnicodeString& source, const UnicodeString& target) const { Hashtable *targets = (Hashtable*) specDAG.get(source); - if (targets == 0) { + if (targets == nullptr) { return 0; } uint32_t varMask = targets->geti(target); @@ -821,7 +837,7 @@ UnicodeString& TransliteratorRegistry::getAvailableVariant(int32_t index, const UnicodeString& target, UnicodeString& result) const { Hashtable *targets = (Hashtable*) specDAG.get(source); - if (targets == 0) { + if (targets == nullptr) { result.truncate(0); // invalid source return result; } @@ -852,14 +868,14 @@ UnicodeString& TransliteratorRegistry::getAvailableVariant(int32_t index, //---------------------------------------------------------------------- TransliteratorRegistry::Enumeration::Enumeration(const TransliteratorRegistry& _reg) : - index(0), reg(_reg) { + pos(UHASH_FIRST), size(_reg.availableIDs.count()), reg(_reg) { } TransliteratorRegistry::Enumeration::~Enumeration() { } int32_t TransliteratorRegistry::Enumeration::count(UErrorCode& /*status*/) const { - return reg.availableIDs.size(); + return size; } const UnicodeString* TransliteratorRegistry::Enumeration::snext(UErrorCode& status) { @@ -875,22 +891,27 @@ const UnicodeString* TransliteratorRegistry::Enumeration::snext(UErrorCode& stat if (U_FAILURE(status)) { return nullptr; } - int32_t n = reg.availableIDs.size(); - if (index > n) { + int32_t n = reg.availableIDs.count(); + if (n != size) { status = U_ENUM_OUT_OF_SYNC_ERROR; + return nullptr; } - // index == n is okay -- this means we've reached the end - if (index < n) { - // Copy the string! This avoids lifetime problems. - unistr = *(const UnicodeString*)reg.availableIDs[index++]; - return &unistr; - } else { + + const UHashElement* element = reg.availableIDs.nextElement(pos); + if (element == nullptr) { + // If the code reaches this point, it means that it's out of sync + // or the caller keeps asking for snext(). return nullptr; } + + // Copy the string! This avoids lifetime problems. + unistr = *(const UnicodeString*) element->key.pointer; + return &unistr; } void TransliteratorRegistry::Enumeration::reset(UErrorCode& /*status*/) { - index = 0; + pos = UHASH_FIRST; + size = reg.availableIDs.count(); } UOBJECT_DEFINE_RTTI_IMPLEMENTATION(TransliteratorRegistry::Enumeration) @@ -945,18 +966,12 @@ void TransliteratorRegistry::registerEntry(const UnicodeString& ID, registry.put(ID, adopted, status); if (visible) { registerSTV(source, target, variant); - if (!availableIDs.contains((void*) &ID)) { - UnicodeString *newID = ID.clone(); - // Check to make sure newID was created. - if (newID != nullptr) { - // NUL-terminate the ID string - newID->getTerminatedBuffer(); - availableIDs.adoptElement(newID, status); - } + if (!availableIDs.containsKey(ID)) { + availableIDs.puti(ID, /* unused value */ 1, status); } } else { removeSTV(source, target, variant); - availableIDs.removeElement((void*) &ID); + availableIDs.remove(ID); } } @@ -971,7 +986,7 @@ void TransliteratorRegistry::registerSTV(const UnicodeString& source, // assert(target.length() > 0); UErrorCode status = U_ZERO_ERROR; Hashtable *targets = (Hashtable*) specDAG.get(source); - if (targets == 0) { + if (targets == nullptr) { int32_t size = 3; if (source.compare(ANY,3) == 0) { size = ANY_TARGETS_INIT_SIZE; @@ -1069,7 +1084,7 @@ TransliteratorEntry* TransliteratorRegistry::findInDynamicStore(const Transliter TransliteratorEntry* TransliteratorRegistry::findInStaticStore(const TransliteratorSpec& src, const TransliteratorSpec& trg, const UnicodeString& variant) { - TransliteratorEntry* entry = 0; + TransliteratorEntry* entry = nullptr; if (src.isLocale()) { entry = findInBundle(src, trg, variant, UTRANS_FORWARD); } else if (trg.isLocale()) { @@ -1078,7 +1093,7 @@ TransliteratorEntry* TransliteratorRegistry::findInStaticStore(const Translitera // If we found an entry, store it in the Hashtable for next // time. - if (entry != 0) { + if (entry != nullptr) { registerEntry(src.getTop(), trg.getTop(), variant, entry, false); } @@ -1164,7 +1179,7 @@ TransliteratorEntry* TransliteratorRegistry::findInBundle(const TransliteratorSp // We have succeeded in loading a string from the locale // resources. Create a new registry entry to hold it and return it. TransliteratorEntry *entry = new TransliteratorEntry(); - if (entry != 0) { + if (entry != nullptr) { // The direction is always forward for the // TransliterateTo_xxx and TransliterateFrom_xxx // items; those are unidirectional forward rules. @@ -1225,7 +1240,7 @@ TransliteratorEntry* TransliteratorRegistry::find(UnicodeString& source, UnicodeString ID; TransliteratorIDParser::STVtoID(source, target, variant, ID); entry = (TransliteratorEntry*) registry.get(ID); - if (entry != 0) { + if (entry != nullptr) { // std::string ss; // std::cout << ID.toUTF8String(ss) << std::endl; return entry; @@ -1235,13 +1250,13 @@ TransliteratorEntry* TransliteratorRegistry::find(UnicodeString& source, // Seek exact match in hashtable entry = findInDynamicStore(src, trg, variant); - if (entry != 0) { + if (entry != nullptr) { return entry; } - + // Seek exact match in locale resources entry = findInStaticStore(src, trg, variant); - if (entry != 0) { + if (entry != nullptr) { return entry; } } @@ -1251,13 +1266,13 @@ TransliteratorEntry* TransliteratorRegistry::find(UnicodeString& source, for (;;) { // Seek match in hashtable entry = findInDynamicStore(src, trg, NO_VARIANT); - if (entry != 0) { + if (entry != nullptr) { return entry; } - + // Seek match in locale resources entry = findInStaticStore(src, trg, NO_VARIANT); - if (entry != 0) { + if (entry != nullptr) { return entry; } if (!src.hasFallback()) { @@ -1271,7 +1286,7 @@ TransliteratorEntry* TransliteratorRegistry::find(UnicodeString& source, trg.next(); } - return 0; + return nullptr; } /** @@ -1290,31 +1305,31 @@ Transliterator* TransliteratorRegistry::instantiateEntry(const UnicodeString& ID TransliteratorEntry *entry, TransliteratorAlias* &aliasReturn, UErrorCode& status) { - Transliterator *t = 0; + Transliterator* t = nullptr; U_ASSERT(aliasReturn == 0); switch (entry->entryType) { case TransliteratorEntry::RBT_DATA: t = new RuleBasedTransliterator(ID, entry->u.data); - if (t == 0) { + if (t == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; } return t; case TransliteratorEntry::PROTOTYPE: t = entry->u.prototype->clone(); - if (t == 0) { + if (t == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; } return t; case TransliteratorEntry::ALIAS: aliasReturn = new TransliteratorAlias(entry->stringArg, entry->compoundFilter); - if (aliasReturn == 0) { + if (aliasReturn == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; } - return 0; + return nullptr; case TransliteratorEntry::FACTORY: t = entry->u.factory.function(ID, entry->u.factory.context); - if (t == 0) { + if (t == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; } return t; @@ -1331,29 +1346,29 @@ Transliterator* TransliteratorRegistry::instantiateEntry(const UnicodeString& ID // TODO: Should passNumber be turned into a decimal-string representation (1 -> "1")? Transliterator* tl = new RuleBasedTransliterator(UnicodeString(CompoundTransliterator::PASS_STRING) + UnicodeString(passNumber++), (TransliterationRuleData*)(entry->u.dataVector->elementAt(i)), false); - if (tl == 0) + if (tl == nullptr) status = U_MEMORY_ALLOCATION_ERROR; else rbts->adoptElement(tl, status); } if (U_FAILURE(status)) { delete rbts; - return 0; + return nullptr; } rbts->setDeleter(nullptr); aliasReturn = new TransliteratorAlias(ID, entry->stringArg, rbts, entry->compoundFilter); } - if (aliasReturn == 0) { + if (aliasReturn == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; } - return 0; + return nullptr; case TransliteratorEntry::LOCALE_RULES: aliasReturn = new TransliteratorAlias(ID, entry->stringArg, (UTransDirection) entry->intArg); - if (aliasReturn == 0) { + if (aliasReturn == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; } - return 0; + return nullptr; case TransliteratorEntry::RULES_FORWARD: case TransliteratorEntry::RULES_REVERSE: // Process the rule data into a TransliteratorRuleData object, @@ -1389,12 +1404,12 @@ Transliterator* TransliteratorRegistry::instantiateEntry(const UnicodeString& ID aliasReturn = new TransliteratorAlias(ID, rules, ((entry->entryType == TransliteratorEntry::RULES_REVERSE) ? UTRANS_REVERSE : UTRANS_FORWARD)); - if (aliasReturn == 0) { + if (aliasReturn == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; } //} } - return 0; + return nullptr; default: UPRV_UNREACHABLE_EXIT; // can't get here } diff --git a/contrib/libs/icu/i18n/transreg.h b/contrib/libs/icu/i18n/transreg.h index da9c2ee8b9..3862be881d 100644 --- a/contrib/libs/icu/i18n/transreg.h +++ b/contrib/libs/icu/i18n/transreg.h @@ -423,7 +423,8 @@ class TransliteratorRegistry : public UMemory { static UClassID U_EXPORT2 getStaticClassID(); virtual UClassID getDynamicClassID() const override; private: - int32_t index; + int32_t pos; + int32_t size; const TransliteratorRegistry& reg; }; friend class Enumeration; @@ -452,7 +453,7 @@ class TransliteratorRegistry : public UMemory { /** * Vector of public full IDs. */ - UVector availableIDs; + Hashtable availableIDs; TransliteratorRegistry(const TransliteratorRegistry &other); // forbid copying of this class TransliteratorRegistry &operator=(const TransliteratorRegistry &other); // forbid copying of this class diff --git a/contrib/libs/icu/i18n/tridpars.cpp b/contrib/libs/icu/i18n/tridpars.cpp index 6c23a0dc90..40f21b4521 100644 --- a/contrib/libs/icu/i18n/tridpars.cpp +++ b/contrib/libs/icu/i18n/tridpars.cpp @@ -279,9 +279,9 @@ UnicodeSet* TransliteratorIDParser::parseGlobalFilter(const UnicodeString& id, i UErrorCode ec = U_ZERO_ERROR; filter = new UnicodeSet(id, ppos, USET_IGNORE_SPACE, nullptr, ec); /* test for nullptr */ - if (filter == 0) { + if (filter == nullptr) { pos = start; - return 0; + return nullptr; } if (U_FAILURE(ec)) { delete filter; diff --git a/contrib/libs/icu/i18n/tzfmt.cpp b/contrib/libs/icu/i18n/tzfmt.cpp index ed53438c41..00c69ee773 100644 --- a/contrib/libs/icu/i18n/tzfmt.cpp +++ b/contrib/libs/icu/i18n/tzfmt.cpp @@ -19,7 +19,6 @@ #include "unicode/udat.h" #include "unicode/ustring.h" #include "unicode/utf16.h" -#include "bytesinkutil.h" #include "charstr.h" #include "tzgnames.h" #include "cmemory.h" @@ -158,15 +157,11 @@ U_CDECL_BEGIN */ static UBool U_CALLCONV tzfmt_cleanup() { - if (gZoneIdTrie != nullptr) { - delete gZoneIdTrie; - } + delete gZoneIdTrie; gZoneIdTrie = nullptr; gZoneIdTrieInitOnce.reset(); - if (gShortZoneIdTrie != nullptr) { - delete gShortZoneIdTrie; - } + delete gShortZoneIdTrie; gShortZoneIdTrie = nullptr; gShortZoneIdTrieInitOnce.reset(); @@ -327,17 +322,14 @@ TimeZoneFormat::TimeZoneFormat(const Locale& locale, UErrorCode& status) const char* region = fLocale.getCountry(); int32_t regionLen = static_cast<int32_t>(uprv_strlen(region)); if (regionLen == 0) { - CharString loc; - { - CharStringByteSink sink(&loc); - ulocimp_addLikelySubtags(fLocale.getName(), sink, &status); - } + UErrorCode tempStatus = U_ZERO_ERROR; + CharString loc = ulocimp_addLikelySubtags(fLocale.getName(), tempStatus); - regionLen = uloc_getCountry(loc.data(), fTargetRegion, sizeof(fTargetRegion), &status); - if (U_SUCCESS(status)) { + regionLen = uloc_getCountry(loc.data(), fTargetRegion, sizeof(fTargetRegion), &tempStatus); + if (U_SUCCESS(tempStatus)) { fTargetRegion[regionLen] = 0; } else { - return; + fTargetRegion[0] = 0; } } else if (regionLen < (int32_t)sizeof(fTargetRegion)) { uprv_strcpy(fTargetRegion, region); diff --git a/contrib/libs/icu/i18n/tzgnames.cpp b/contrib/libs/icu/i18n/tzgnames.cpp index d55b0fd2ae..19ad38404b 100644 --- a/contrib/libs/icu/i18n/tzgnames.cpp +++ b/contrib/libs/icu/i18n/tzgnames.cpp @@ -21,7 +21,6 @@ #include "unicode/strenum.h" #include "unicode/vtzone.h" -#include "bytesinkutil.h" #include "charstr.h" #include "cmemory.h" #include "cstring.h" @@ -145,9 +144,7 @@ TimeZoneGenericNameMatchInfo::TimeZoneGenericNameMatchInfo(UVector* matches) } TimeZoneGenericNameMatchInfo::~TimeZoneGenericNameMatchInfo() { - if (fMatches != nullptr) { - delete fMatches; - } + delete fMatches; } int32_t @@ -209,9 +206,7 @@ GNameSearchHandler::GNameSearchHandler(uint32_t types) } GNameSearchHandler::~GNameSearchHandler() { - if (fResults != nullptr) { - delete fResults; - } + delete fResults; } UBool @@ -299,7 +294,7 @@ private: TextTrieMap fGNamesTrie; UBool fGNamesTrieFullyLoaded; - char fTargetRegion[ULOC_COUNTRY_CAPACITY]; + CharString fTargetRegion; void initialize(const Locale& locale, UErrorCode& status); void cleanup(); @@ -339,7 +334,8 @@ TZGNCore::TZGNCore(const Locale& locale, UErrorCode& status) fLocaleDisplayNames(nullptr), fStringPool(status), fGNamesTrie(true, deleteGNameInfo), - fGNamesTrieFullyLoaded(false) { + fGNamesTrieFullyLoaded(false), + fTargetRegion() { initialize(locale, status); } @@ -409,23 +405,14 @@ TZGNCore::initialize(const Locale& locale, UErrorCode& status) { const char* region = fLocale.getCountry(); int32_t regionLen = static_cast<int32_t>(uprv_strlen(region)); if (regionLen == 0) { - CharString loc; - { - CharStringByteSink sink(&loc); - ulocimp_addLikelySubtags(fLocale.getName(), sink, &status); - } - - regionLen = uloc_getCountry(loc.data(), fTargetRegion, sizeof(fTargetRegion), &status); - if (U_SUCCESS(status)) { - fTargetRegion[regionLen] = 0; - } else { + CharString loc = ulocimp_addLikelySubtags(fLocale.getName(), status); + ulocimp_getSubtags(loc.data(), nullptr, nullptr, &fTargetRegion, nullptr, nullptr, status); + if (U_FAILURE(status)) { cleanup(); return; } - } else if (regionLen < (int32_t)sizeof(fTargetRegion)) { - uprv_strcpy(fTargetRegion, region); } else { - fTargetRegion[0] = 0; + fTargetRegion.append(region, regionLen, status); } // preload generic names for the default zone @@ -439,12 +426,8 @@ TZGNCore::initialize(const Locale& locale, UErrorCode& status) { void TZGNCore::cleanup() { - if (fLocaleDisplayNames != nullptr) { - delete fLocaleDisplayNames; - } - if (fTimeZoneNames != nullptr) { - delete fTimeZoneNames; - } + delete fLocaleDisplayNames; + delete fTimeZoneNames; uhash_close(fLocationNamesMap); uhash_close(fPartialLocationNamesMap); @@ -704,7 +687,7 @@ TZGNCore::formatGenericNonLocationName(const TimeZone& tz, UTimeZoneGenericNameT // golden zone at the given date. char16_t idBuf[32]; UnicodeString goldenID(idBuf, 0, UPRV_LENGTHOF(idBuf)); - fTimeZoneNames->getReferenceZoneID(mzID, fTargetRegion, goldenID); + fTimeZoneNames->getReferenceZoneID(mzID, fTargetRegion.data(), goldenID); if (!goldenID.isEmpty() && goldenID != tzID) { TimeZone *goldenZone = TimeZone::createTimeZone(goldenID); int32_t raw1, sav1; @@ -866,7 +849,7 @@ TZGNCore::loadStrings(const UnicodeString& tzCanonicalID) { // if this time zone is not the golden zone of the meta zone, // partial location name (such as "PT (Los Angeles)") might be // available. - fTimeZoneNames->getReferenceZoneID(*mzID, fTargetRegion, goldenID); + fTimeZoneNames->getReferenceZoneID(*mzID, fTargetRegion.data(), goldenID); if (tzCanonicalID != goldenID) { for (int32_t i = 0; genNonLocTypes[i] != UTZNM_UNKNOWN; i++) { fTimeZoneNames->getMetaZoneDisplayName(*mzID, genNonLocTypes[i], mzGenName); @@ -878,9 +861,7 @@ TZGNCore::loadStrings(const UnicodeString& tzCanonicalID) { } } } - if (mzIDs != nullptr) { - delete mzIDs; - } + delete mzIDs; } int32_t @@ -914,7 +895,7 @@ TZGNCore::findBestMatch(const UnicodeString& text, int32_t start, uint32_t types if (!tznamesMatches->getTimeZoneIDAt(i, bestMatchTzID)) { // name for a meta zone if (tznamesMatches->getMetaZoneIDAt(i, mzID)) { - fTimeZoneNames->getReferenceZoneID(mzID, fTargetRegion, bestMatchTzID); + fTimeZoneNames->getReferenceZoneID(mzID, fTargetRegion.data(), bestMatchTzID); } } UTimeZoneNameType nameType = tznamesMatches->getNameTypeAt(i); @@ -1035,9 +1016,7 @@ TZGNCore::findLocal(const UnicodeString& text, int32_t start, uint32_t types, UE return gmatchInfo; } - if (results != nullptr) { - delete results; - } + delete results; // All names are not yet loaded into the local trie. // Load all available names into the trie. This could be very heavy. @@ -1054,9 +1033,7 @@ TZGNCore::findLocal(const UnicodeString& text, int32_t start, uint32_t types, UE nonConstThis->loadStrings(*tzID); } } - if (tzIDs != nullptr) { - delete tzIDs; - } + delete tzIDs; if (U_SUCCESS(status)) { nonConstThis->fGNamesTrieFullyLoaded = true; @@ -1177,7 +1154,7 @@ static void sweepCache() { } TimeZoneGenericNames::TimeZoneGenericNames() -: fRef(0) { +: fRef(nullptr) { } TimeZoneGenericNames::~TimeZoneGenericNames() { @@ -1251,9 +1228,7 @@ TimeZoneGenericNames::createInstance(const Locale& locale, UErrorCode& status) { } } if (U_FAILURE(status)) { - if (tzgnCore != nullptr) { - delete tzgnCore; - } + delete tzgnCore; if (newKey != nullptr) { uprv_free(newKey); } diff --git a/contrib/libs/icu/i18n/tznames.cpp b/contrib/libs/icu/i18n/tznames.cpp index 900499fd40..24ca161e88 100644 --- a/contrib/libs/icu/i18n/tznames.cpp +++ b/contrib/libs/icu/i18n/tznames.cpp @@ -87,7 +87,7 @@ static void sweepCache() { const UHashElement* elem; double now = (double)uprv_getUTCtime(); - while ((elem = uhash_nextElement(gTimeZoneNamesCache, &pos)) != 0) { + while ((elem = uhash_nextElement(gTimeZoneNamesCache, &pos)) != nullptr) { TimeZoneNamesCacheEntry *entry = (TimeZoneNamesCacheEntry *)elem->value.pointer; if (entry->refCount <= 0 && (now - entry->lastAccess) > CACHE_EXPIRATION) { // delete this entry @@ -128,7 +128,7 @@ private: }; TimeZoneNamesDelegate::TimeZoneNamesDelegate() -: fTZnamesCacheEntry(0) { +: fTZnamesCacheEntry(nullptr) { } TimeZoneNamesDelegate::TimeZoneNamesDelegate(const Locale& locale, UErrorCode& status) { @@ -182,9 +182,7 @@ TimeZoneNamesDelegate::TimeZoneNamesDelegate(const Locale& locale, UErrorCode& s } } if (U_FAILURE(status)) { - if (tznames != nullptr) { - delete tznames; - } + delete tznames; if (newKey != nullptr) { uprv_free(newKey); } @@ -403,9 +401,7 @@ TimeZoneNames::MatchInfoCollection::MatchInfoCollection() } TimeZoneNames::MatchInfoCollection::~MatchInfoCollection() { - if (fMatches != nullptr) { - delete fMatches; - } + delete fMatches; } void diff --git a/contrib/libs/icu/i18n/tznames_impl.cpp b/contrib/libs/icu/i18n/tznames_impl.cpp index 8e52fd90a6..038b8097f2 100644 --- a/contrib/libs/icu/i18n/tznames_impl.cpp +++ b/contrib/libs/icu/i18n/tznames_impl.cpp @@ -16,12 +16,12 @@ #if !UCONFIG_NO_FORMATTING #include "unicode/strenum.h" +#include "unicode/stringpiece.h" #include "unicode/ustring.h" #include "unicode/timezone.h" #include "unicode/utf16.h" #include "tznames_impl.h" -#include "bytesinkutil.h" #include "charstr.h" #include "cmemory.h" #include "cstring.h" @@ -33,6 +33,7 @@ #include "ureslocs.h" #include "zonemeta.h" #include "ucln_in.h" +#include "uinvchar.h" #include "uvector.h" #include "olsontz.h" @@ -72,7 +73,9 @@ enum UTimeZoneNameTypeIndex { UTZNM_INDEX_SHORT_DAYLIGHT, UTZNM_INDEX_COUNT }; -static const char16_t* const EMPTY_NAMES[UTZNM_INDEX_COUNT] = {0,0,0,0,0,0,0}; +static const char16_t* const EMPTY_NAMES[UTZNM_INDEX_COUNT] = { + nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr +}; U_CDECL_BEGIN static UBool U_CALLCONV tzdbTimeZoneNames_cleanup() { @@ -110,7 +113,7 @@ struct ZMatchInfo { }; // Helper functions -static void mergeTimeZoneKey(const UnicodeString& mzID, char* result); +static void mergeTimeZoneKey(const UnicodeString& mzID, char* result, size_t capacity, UErrorCode& status); #define DEFAULT_CHARACTERNODE_CAPACITY 1 @@ -755,7 +758,7 @@ struct ZNames::ZNamesLoader : public ResourceSink { if (U_FAILURE(errorCode)) { return; } char key[ZID_KEY_MAX + 1]; - mergeTimeZoneKey(mzID, key); + mergeTimeZoneKey(mzID, key, sizeof(key), errorCode); loadNames(zoneStrings, key, errorCode); } @@ -770,6 +773,10 @@ struct ZNames::ZNamesLoader : public ResourceSink { } char key[ZID_KEY_MAX + 1]; + if (uKey.length() > ZID_KEY_MAX) { + errorCode = U_INTERNAL_PROGRAM_ERROR; + return; + } uKey.extract(0, uKey.length(), key, sizeof(key), US_INV); loadNames(zoneStrings, key, errorCode); @@ -940,9 +947,7 @@ ZNameSearchHandler::ZNameSearchHandler(uint32_t types) } ZNameSearchHandler::~ZNameSearchHandler() { - if (fResults != nullptr) { - delete fResults; - } + delete fResults; } UBool @@ -1069,8 +1074,6 @@ TimeZoneNamesImpl::initialize(const Locale& locale, UErrorCode& status) { loadStrings(UnicodeString(tzID), status); } delete tz; - - return; } /* @@ -1282,19 +1285,30 @@ TimeZoneNamesImpl::getExemplarLocationName(const UnicodeString& tzID, UnicodeStr // Merge the MZ_PREFIX and mzId -static void mergeTimeZoneKey(const UnicodeString& mzID, char* result) { +static void mergeTimeZoneKey(const UnicodeString& mzID, char* result, size_t capacity, + UErrorCode& status) { + if (U_FAILURE(status)) { + return; + } if (mzID.isEmpty()) { result[0] = '\0'; return; } - char mzIdChar[ZID_KEY_MAX + 1]; - int32_t keyLen; - int32_t prefixLen = static_cast<int32_t>(uprv_strlen(gMZPrefix)); - keyLen = mzID.extract(0, mzID.length(), mzIdChar, ZID_KEY_MAX + 1, US_INV); - uprv_memcpy((void *)result, (void *)gMZPrefix, prefixLen); - uprv_memcpy((void *)(result + prefixLen), (void *)mzIdChar, keyLen); - result[keyLen + prefixLen] = '\0'; + if (MZ_PREFIX_LEN + 1 > capacity) { + result[0] = '\0'; + status = U_INTERNAL_PROGRAM_ERROR; + return; + } + uprv_memcpy((void *)result, (void *)gMZPrefix, MZ_PREFIX_LEN); + if (static_cast<size_t>(MZ_PREFIX_LEN + mzID.length() + 1) > capacity) { + result[0] = '\0'; + status = U_INTERNAL_PROGRAM_ERROR; + return; + } + int32_t keyLen = mzID.extract(0, mzID.length(), result + MZ_PREFIX_LEN, + static_cast<int32_t>(capacity - MZ_PREFIX_LEN), US_INV); + result[keyLen + MZ_PREFIX_LEN] = '\0'; } /* @@ -1303,11 +1317,16 @@ static void mergeTimeZoneKey(const UnicodeString& mzID, char* result) { ZNames* TimeZoneNamesImpl::loadMetaZoneNames(const UnicodeString& mzID, UErrorCode& status) { if (U_FAILURE(status)) { return nullptr; } - U_ASSERT(mzID.length() <= ZID_KEY_MAX - MZ_PREFIX_LEN); + if (mzID.length() > ZID_KEY_MAX - MZ_PREFIX_LEN) { + status = U_INTERNAL_PROGRAM_ERROR; + return nullptr; + } char16_t mzIDKey[ZID_KEY_MAX + 1]; - mzID.extract(mzIDKey, ZID_KEY_MAX + 1, status); - U_ASSERT(U_SUCCESS(status)); // already checked length above + mzID.extract(mzIDKey, ZID_KEY_MAX, status); + if (U_FAILURE(status)) { + return nullptr; + } mzIDKey[mzID.length()] = 0; void* mznames = uhash_get(fMZNamesMap, mzIDKey); @@ -1331,10 +1350,13 @@ TimeZoneNamesImpl::loadMetaZoneNames(const UnicodeString& mzID, UErrorCode& stat ZNames* TimeZoneNamesImpl::loadTimeZoneNames(const UnicodeString& tzID, UErrorCode& status) { if (U_FAILURE(status)) { return nullptr; } - U_ASSERT(tzID.length() <= ZID_KEY_MAX); + if (tzID.length() > ZID_KEY_MAX) { + status = U_INTERNAL_PROGRAM_ERROR; + return nullptr; + } char16_t tzIDKey[ZID_KEY_MAX + 1]; - int32_t tzIDKeyLen = tzID.extract(tzIDKey, ZID_KEY_MAX + 1, status); + int32_t tzIDKeyLen = tzID.extract(tzIDKey, ZID_KEY_MAX, status); U_ASSERT(U_SUCCESS(status)); // already checked length above tzIDKey[tzIDKeyLen] = 0; @@ -1673,9 +1695,7 @@ void TimeZoneNamesImpl::internalLoadAllDisplayNames(UErrorCode& status) { } } } - if (tzIDs != nullptr) { - delete tzIDs; - } + delete tzIDs; } } @@ -1889,7 +1909,7 @@ U_CDECL_END class TZDBNameSearchHandler : public TextTrieMapSearchResultHandler { public: - TZDBNameSearchHandler(uint32_t types, const char* region); + TZDBNameSearchHandler(uint32_t types, StringPiece region); virtual ~TZDBNameSearchHandler(); UBool handleMatch(int32_t matchLength, const CharacterNode *node, UErrorCode &status) override; @@ -1899,17 +1919,15 @@ private: uint32_t fTypes; int32_t fMaxMatchLen; TimeZoneNames::MatchInfoCollection* fResults; - const char* fRegion; + StringPiece fRegion; }; -TZDBNameSearchHandler::TZDBNameSearchHandler(uint32_t types, const char* region) +TZDBNameSearchHandler::TZDBNameSearchHandler(uint32_t types, StringPiece region) : fTypes(types), fMaxMatchLen(0), fResults(nullptr), fRegion(region) { } TZDBNameSearchHandler::~TZDBNameSearchHandler() { - if (fResults != nullptr) { - delete fResults; - } + delete fResults; } UBool @@ -1951,7 +1969,7 @@ TZDBNameSearchHandler::handleMatch(int32_t matchLength, const CharacterNode *nod // as metazone China (China Standard Time). for (int32_t j = 0; j < ninfo->nRegions; j++) { const char *region = ninfo->parseRegions[j]; - if (uprv_strcmp(fRegion, region) == 0) { + if (fRegion == region) { match = ninfo; matchRegion = true; break; @@ -2064,7 +2082,7 @@ static void U_CALLCONV prepareFind(UErrorCode &status) { const UnicodeString *mzID; StringEnumeration *mzIDs = TimeZoneNamesImpl::_getAvailableMetaZoneIDs(status); if (U_SUCCESS(status)) { - while ((mzID = mzIDs->snext(status)) != 0 && U_SUCCESS(status)) { + while ((mzID = mzIDs->snext(status)) != nullptr && U_SUCCESS(status)) { const TZDBNames *names = TZDBTimeZoneNames::getMetaZoneNames(*mzID, status); if (U_FAILURE(status)) { break; @@ -2130,27 +2148,27 @@ static void U_CALLCONV prepareFind(UErrorCode &status) { U_CDECL_END TZDBTimeZoneNames::TZDBTimeZoneNames(const Locale& locale) -: fLocale(locale) { +: fLocale(locale), fRegion() { UBool useWorld = true; const char* region = fLocale.getCountry(); int32_t regionLen = static_cast<int32_t>(uprv_strlen(region)); if (regionLen == 0) { UErrorCode status = U_ZERO_ERROR; - CharString loc; - { - CharStringByteSink sink(&loc); - ulocimp_addLikelySubtags(fLocale.getName(), sink, &status); - } - regionLen = uloc_getCountry(loc.data(), fRegion, sizeof(fRegion), &status); - if (U_SUCCESS(status) && regionLen < (int32_t)sizeof(fRegion)) { + CharString loc = ulocimp_addLikelySubtags(fLocale.getName(), status); + ulocimp_getSubtags(loc.data(), nullptr, nullptr, &fRegion, nullptr, nullptr, status); + if (U_SUCCESS(status)) { useWorld = false; } - } else if (regionLen < (int32_t)sizeof(fRegion)) { - uprv_strcpy(fRegion, region); + } else { + UErrorCode status = U_ZERO_ERROR; + fRegion.append(region, regionLen, status); + U_ASSERT(U_SUCCESS(status)); useWorld = false; } if (useWorld) { - uprv_strcpy(fRegion, "001"); + UErrorCode status = U_ZERO_ERROR; + fRegion.append("001", status); + U_ASSERT(U_SUCCESS(status)); } } @@ -2228,7 +2246,7 @@ TZDBTimeZoneNames::find(const UnicodeString& text, int32_t start, uint32_t types return nullptr; } - TZDBNameSearchHandler handler(types, fRegion); + TZDBNameSearchHandler handler(types, fRegion.toStringPiece()); gTZDBNamesTrie->search(text, start, (TextTrieMapSearchResultHandler *)&handler, status); if (U_FAILURE(status)) { return nullptr; @@ -2247,9 +2265,15 @@ TZDBTimeZoneNames::getMetaZoneNames(const UnicodeString& mzID, UErrorCode& statu TZDBNames* tzdbNames = nullptr; char16_t mzIDKey[ZID_KEY_MAX + 1]; - mzID.extract(mzIDKey, ZID_KEY_MAX + 1, status); - U_ASSERT(status == U_ZERO_ERROR); // already checked length above + mzID.extract(mzIDKey, ZID_KEY_MAX, status); + if (U_FAILURE(status)) { + return nullptr; + } mzIDKey[mzID.length()] = 0; + if (!uprv_isInvariantUString(mzIDKey, mzID.length())) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return nullptr; + } static UMutex gTZDBNamesMapLock; umtx_lock(&gTZDBNamesMapLock); @@ -2258,9 +2282,9 @@ TZDBTimeZoneNames::getMetaZoneNames(const UnicodeString& mzID, UErrorCode& statu if (cacheVal == nullptr) { UResourceBundle *zoneStringsRes = ures_openDirect(U_ICUDATA_ZONE, "tzdbNames", &status); zoneStringsRes = ures_getByKey(zoneStringsRes, gZoneStrings, zoneStringsRes, &status); + char key[ZID_KEY_MAX + 1]; + mergeTimeZoneKey(mzID, key, sizeof(key), status); if (U_SUCCESS(status)) { - char key[ZID_KEY_MAX + 1]; - mergeTimeZoneKey(mzID, key); tzdbNames = TZDBNames::createInstance(zoneStringsRes, key); if (tzdbNames == nullptr) { diff --git a/contrib/libs/icu/i18n/tznames_impl.h b/contrib/libs/icu/i18n/tznames_impl.h index 8ca2f84e73..3ab1e5cc94 100644 --- a/contrib/libs/icu/i18n/tznames_impl.h +++ b/contrib/libs/icu/i18n/tznames_impl.h @@ -26,6 +26,7 @@ #include "uhash.h" #include "uvector.h" #include "umutex.h" +#include "charstr.h" // Some zone display names involving supplementary characters can be over 50 chars, 100 UTF-16 code units, 200 UTF-8 bytes #define ZONE_NAME_U16_MAX 128 @@ -255,7 +256,7 @@ public: private: Locale fLocale; - char fRegion[ULOC_COUNTRY_CAPACITY]; + CharString fRegion; }; U_NAMESPACE_END diff --git a/contrib/libs/icu/i18n/tztrans.cpp b/contrib/libs/icu/i18n/tztrans.cpp index dbce342202..45e1678aa3 100644 --- a/contrib/libs/icu/i18n/tztrans.cpp +++ b/contrib/libs/icu/i18n/tztrans.cpp @@ -40,12 +40,8 @@ TimeZoneTransition::TimeZoneTransition(const TimeZoneTransition& source) } TimeZoneTransition::~TimeZoneTransition() { - if (fFrom != nullptr) { - delete fFrom; - } - if (fTo != nullptr) { - delete fTo; - } + delete fFrom; + delete fTo; } TimeZoneTransition* @@ -96,33 +92,25 @@ TimeZoneTransition::setTime(UDate time) { void TimeZoneTransition::setFrom(const TimeZoneRule& from) { - if (fFrom != nullptr) { - delete fFrom; - } + delete fFrom; fFrom = from.clone(); } void TimeZoneTransition::adoptFrom(TimeZoneRule* from) { - if (fFrom != nullptr) { - delete fFrom; - } + delete fFrom; fFrom = from; } void TimeZoneTransition::setTo(const TimeZoneRule& to) { - if (fTo != nullptr) { - delete fTo; - } + delete fTo; fTo = to.clone(); } void TimeZoneTransition::adoptTo(TimeZoneRule* to) { - if (fTo != nullptr) { - delete fTo; - } + delete fTo; fTo = to; } diff --git a/contrib/libs/icu/i18n/ucal.cpp b/contrib/libs/icu/i18n/ucal.cpp index 18d9cf4ec7..78d01763c7 100644 --- a/contrib/libs/icu/i18n/ucal.cpp +++ b/contrib/libs/icu/i18n/ucal.cpp @@ -22,8 +22,10 @@ #include "unicode/ustring.h" #include "unicode/strenum.h" #include "unicode/localpointer.h" +#include "charstr.h" #include "cmemory.h" #include "cstring.h" +#include "iso8601cal.h" #include "ustrenum.h" #include "uenumimp.h" #include "ulist.h" @@ -166,21 +168,15 @@ ucal_open( const char16_t* zoneID, } if ( caltype == UCAL_GREGORIAN ) { - char localeBuf[ULOC_LOCALE_IDENTIFIER_CAPACITY]; if ( locale == nullptr ) { locale = uloc_getDefault(); } - int32_t localeLength = static_cast<int32_t>(uprv_strlen(locale)); - if (localeLength >= ULOC_LOCALE_IDENTIFIER_CAPACITY) { - *status = U_ILLEGAL_ARGUMENT_ERROR; - return nullptr; - } - uprv_strcpy(localeBuf, locale); - uloc_setKeywordValue("calendar", "gregorian", localeBuf, ULOC_LOCALE_IDENTIFIER_CAPACITY, status); + CharString localeBuf(locale, *status); + ulocimp_setKeywordValue("calendar", "gregorian", localeBuf, *status); if (U_FAILURE(*status)) { return nullptr; } - return (UCalendar*)Calendar::createInstance(zone.orphan(), Locale(localeBuf), *status); + return (UCalendar*)Calendar::createInstance(zone.orphan(), Locale(localeBuf.data()), *status); } return (UCalendar*)Calendar::createInstance(zone.orphan(), Locale(locale), *status); } @@ -197,13 +193,13 @@ U_CAPI UCalendar* U_EXPORT2 ucal_clone(const UCalendar* cal, UErrorCode* status) { - if(U_FAILURE(*status)) return 0; - + if (U_FAILURE(*status)) return nullptr; + Calendar* res = ((Calendar*)cal)->clone(); - if(res == 0) { + if (res == nullptr) { *status = U_MEMORY_ALLOCATION_ERROR; - return 0; + return nullptr; } return (UCalendar*) res; @@ -307,7 +303,8 @@ ucal_setGregorianChange(UCalendar *cal, UDate date, UErrorCode *pErrorCode) { *pErrorCode = U_ILLEGAL_ARGUMENT_ERROR; return; } - if(typeid(*cpp_cal) != typeid(GregorianCalendar)) { + if(typeid(*cpp_cal) != typeid(GregorianCalendar) && + typeid(*cpp_cal) != typeid(ISO8601Calendar)) { *pErrorCode = U_UNSUPPORTED_ERROR; return; } @@ -329,7 +326,8 @@ ucal_getGregorianChange(const UCalendar *cal, UErrorCode *pErrorCode) { *pErrorCode = U_ILLEGAL_ARGUMENT_ERROR; return (UDate)0; } - if(typeid(*cpp_cal) != typeid(GregorianCalendar)) { + if(typeid(*cpp_cal) != typeid(GregorianCalendar) && + typeid(*cpp_cal) != typeid(ISO8601Calendar)) { *pErrorCode = U_UNSUPPORTED_ERROR; return (UDate)0; } @@ -546,7 +544,7 @@ ucal_getLimit( const UCalendar* cal, UCalendarDateFields field, UCalendarLimitType type, UErrorCode *status) UPRV_NO_SANITIZE_UNDEFINED { - if(status==0 || U_FAILURE(*status)) { + if (status == nullptr || U_FAILURE(*status)) { return -1; } if (field < 0 || UCAL_FIELD_COUNT <= field) { @@ -602,13 +600,13 @@ ucal_getTZDataVersion(UErrorCode* status) U_CAPI int32_t U_EXPORT2 ucal_getCanonicalTimeZoneID(const char16_t* id, int32_t len, char16_t* result, int32_t resultCapacity, UBool *isSystemID, UErrorCode* status) { - if(status == 0 || U_FAILURE(*status)) { + if (status == nullptr || U_FAILURE(*status)) { return 0; } if (isSystemID) { *isSystemID = false; } - if (id == 0 || len == 0 || result == 0 || resultCapacity <= 0) { + if (id == nullptr || len == 0 || result == nullptr || resultCapacity <= 0) { *status = U_ILLEGAL_ARGUMENT_ERROR; return 0; } @@ -625,6 +623,16 @@ ucal_getCanonicalTimeZoneID(const char16_t* id, int32_t len, return reslen; } +U_DRAFT int32_t U_EXPORT2 +ucal_getIanaTimeZoneID(const char16_t* id, int32_t len, + char16_t* result, int32_t resultCapacity, UErrorCode* status) +{ + UnicodeString ianaID; + TimeZone::getIanaID(UnicodeString(id, len), ianaID, *status); + return ianaID.extract(result, resultCapacity, *status); +} + + U_CAPI const char * U_EXPORT2 ucal_getType(const UCalendar *cal, UErrorCode* status) { @@ -708,13 +716,12 @@ static const char * const CAL_TYPES[] = { U_CAPI UEnumeration* U_EXPORT2 ucal_getKeywordValuesForLocale(const char * /* key */, const char* locale, UBool commonlyUsed, UErrorCode *status) { // Resolve region - char prefRegion[ULOC_COUNTRY_CAPACITY]; - (void)ulocimp_getRegionForSupplementalData(locale, true, prefRegion, sizeof(prefRegion), status); - + CharString prefRegion = ulocimp_getRegionForSupplementalData(locale, true, *status); + // Read preferred calendar values from supplementalData calendarPreference UResourceBundle *rb = ures_openDirect(nullptr, "supplementalData", status); ures_getByKey(rb, "calendarPreferenceData", rb, status); - UResourceBundle *order = ures_getByKey(rb, prefRegion, nullptr, status); + UResourceBundle *order = ures_getByKey(rb, prefRegion.data(), nullptr, status); if (*status == U_MISSING_RESOURCE_ERROR && rb != nullptr) { *status = U_ZERO_ERROR; order = ures_getByKey(rb, "001", nullptr, status); diff --git a/contrib/libs/icu/i18n/ucol_res.cpp b/contrib/libs/icu/i18n/ucol_res.cpp index 9bf28db264..aa00868027 100644 --- a/contrib/libs/icu/i18n/ucol_res.cpp +++ b/contrib/libs/icu/i18n/ucol_res.cpp @@ -59,10 +59,10 @@ U_NAMESPACE_BEGIN namespace { -static const char16_t *rootRules = nullptr; -static int32_t rootRulesLength = 0; -static UResourceBundle *rootBundle = nullptr; -static UInitOnce gInitOnceUcolRes {}; +const char16_t* rootRules = nullptr; +int32_t rootRulesLength = 0; +UResourceBundle* rootBundle = nullptr; +UInitOnce gInitOnceUcolRes{}; } // namespace @@ -174,10 +174,20 @@ CollationLoader::CollationLoader(const CollationCacheEntry *re, const Locale &re defaultType[0] = 0; if(U_FAILURE(errorCode)) { return; } + if (locale.isBogus()) { + errorCode = U_ILLEGAL_ARGUMENT_ERROR; + return; + } // Canonicalize the locale ID: Ignore all irrelevant keywords. const char *baseName = locale.getBaseName(); if(uprv_strcmp(locale.getName(), baseName) != 0) { locale = Locale(baseName); + // Due to ICU-22416, we may have bogus locale constructed from + // a string of getBaseName(). + if (locale.isBogus()) { + errorCode = U_ILLEGAL_ARGUMENT_ERROR; + return; + } // Fetch the collation type from the locale ID. int32_t typeLength = requested.getKeywordValue("collation", diff --git a/contrib/libs/icu/i18n/ucol_sit.cpp b/contrib/libs/icu/i18n/ucol_sit.cpp index a740286d79..490dbd5788 100644 --- a/contrib/libs/icu/i18n/ucol_sit.cpp +++ b/contrib/libs/icu/i18n/ucol_sit.cpp @@ -20,6 +20,7 @@ #include "unicode/utf16.h" #include "utracimp.h" #include "ucol_imp.h" +#include "ulocimp.h" #include "cmemory.h" #include "cstring.h" #include "uresimp.h" @@ -86,7 +87,6 @@ static const char providerKeyword[] = "@sp="; static const int32_t locElementCount = UCOL_SIT_LOCELEMENT_MAX+1; static const int32_t locElementCapacity = 32; static const int32_t loc3066Capacity = 256; -static const int32_t internalBufferSize = 512; /* structure containing specification of a collator. Initialized * from a short string. Also used to construct a short string from a @@ -450,38 +450,29 @@ ucol_prepareShortStringOpen( const char *definition, ucol_sit_readSpecs(&s, definition, parseError, status); ucol_sit_calculateWholeLocale(&s, *status); - char buffer[internalBufferSize]; - uprv_memset(buffer, 0, internalBufferSize); - uloc_canonicalize(s.locale.data(), buffer, internalBufferSize, status); + CharString buffer = ulocimp_canonicalize(s.locale.data(), *status); - UResourceBundle *b = ures_open(U_ICUDATA_COLL, buffer, status); + UResourceBundle *b = ures_open(U_ICUDATA_COLL, buffer.data(), status); /* we try to find stuff from keyword */ UResourceBundle *collations = ures_getByKey(b, "collations", nullptr, status); UResourceBundle *collElem = nullptr; - char keyBuffer[256]; // if there is a keyword, we pick it up and try to get elements - int32_t keyLen = uloc_getKeywordValue(buffer, "collation", keyBuffer, sizeof(keyBuffer), status); - // Treat too long a value as no keyword. - if(keyLen >= (int32_t)sizeof(keyBuffer)) { - keyLen = 0; - *status = U_ZERO_ERROR; - } - if(keyLen == 0) { + CharString keyBuffer = ulocimp_getKeywordValue(buffer.data(), "collation", *status); + if(keyBuffer.isEmpty()) { // no keyword // we try to find the default setting, which will give us the keyword value UResourceBundle *defaultColl = ures_getByKeyWithFallback(collations, "default", nullptr, status); if(U_SUCCESS(*status)) { int32_t defaultKeyLen = 0; const char16_t *defaultKey = ures_getString(defaultColl, &defaultKeyLen, status); - u_UCharsToChars(defaultKey, keyBuffer, defaultKeyLen); - keyBuffer[defaultKeyLen] = 0; + keyBuffer.appendInvariantChars(defaultKey, defaultKeyLen, *status); } else { *status = U_INTERNAL_PROGRAM_ERROR; return; } ures_close(defaultColl); } - collElem = ures_getByKeyWithFallback(collations, keyBuffer, collElem, status); + collElem = ures_getByKeyWithFallback(collations, keyBuffer.data(), collElem, status); ures_close(collElem); ures_close(collations); ures_close(b); @@ -497,7 +488,7 @@ ucol_openFromShortString( const char *definition, UTRACE_ENTRY_OC(UTRACE_UCOL_OPEN_FROM_SHORT_STRING); UTRACE_DATA1(UTRACE_INFO, "short string = \"%s\"", definition); - if(U_FAILURE(*status)) return 0; + if (U_FAILURE(*status)) return nullptr; UParseError internalParseError; @@ -520,14 +511,12 @@ ucol_openFromShortString( const char *definition, string = ucol_sit_readSpecs(&s, definition, parseError, status); ucol_sit_calculateWholeLocale(&s, *status); - char buffer[internalBufferSize]; - uprv_memset(buffer, 0, internalBufferSize); #ifdef UCOL_TRACE_SIT fprintf(stderr, "DEF %s, DATA %s, ERR %s\n", definition, s.locale.data(), u_errorName(*status)); #endif - uloc_canonicalize(s.locale.data(), buffer, internalBufferSize, status); + CharString buffer = ulocimp_canonicalize(s.locale.data(), *status); - UCollator *result = ucol_open(buffer, status); + UCollator *result = ucol_open(buffer.data(), status); int32_t i = 0; for(i = 0; i < UCOL_ATTRIBUTE_COUNT; i++) { diff --git a/contrib/libs/icu/i18n/ucsdet.cpp b/contrib/libs/icu/i18n/ucsdet.cpp index c8b8712fba..c3f6737fee 100644 --- a/contrib/libs/icu/i18n/ucsdet.cpp +++ b/contrib/libs/icu/i18n/ucsdet.cpp @@ -32,7 +32,7 @@ U_CAPI UCharsetDetector * U_EXPORT2 ucsdet_open(UErrorCode *status) { if(U_FAILURE(*status)) { - return 0; + return nullptr; } CharsetDetector* csd = new CharsetDetector(*status); diff --git a/contrib/libs/icu/i18n/udat.cpp b/contrib/libs/icu/i18n/udat.cpp index e249be3aee..b5e3d21135 100644 --- a/contrib/libs/icu/i18n/udat.cpp +++ b/contrib/libs/icu/i18n/udat.cpp @@ -142,7 +142,7 @@ udat_open(UDateFormatStyle timeStyle, { DateFormat *fmt; if(U_FAILURE(*status)) { - return 0; + return nullptr; } if(gOpener!=nullptr) { // if it's registered fmt = (DateFormat*) (*gOpener)(timeStyle,dateStyle,locale,tzID,tzIDLength,pattern,patternLength,status); @@ -151,7 +151,7 @@ udat_open(UDateFormatStyle timeStyle, } // else fall through. } if(timeStyle != UDAT_PATTERN) { - if(locale == 0) { + if (locale == nullptr) { fmt = DateFormat::createDateTimeInstance((DateFormat::EStyle)dateStyle, (DateFormat::EStyle)timeStyle); } @@ -164,7 +164,7 @@ udat_open(UDateFormatStyle timeStyle, else { UnicodeString pat((UBool)(patternLength == -1), pattern, patternLength); - if(locale == 0) { + if (locale == nullptr) { fmt = new SimpleDateFormat(pat, *status); } else { @@ -181,12 +181,12 @@ udat_open(UDateFormatStyle timeStyle, return nullptr; } - if(tzID != 0) { + if (tzID != nullptr) { TimeZone *zone = TimeZone::createTimeZone(UnicodeString((UBool)(tzIDLength == -1), tzID, tzIDLength)); - if(zone == 0) { + if (zone == nullptr) { *status = U_MEMORY_ALLOCATION_ERROR; delete fmt; - return 0; + return nullptr; } fmt->adoptTimeZone(zone); } @@ -206,13 +206,13 @@ U_CAPI UDateFormat* U_EXPORT2 udat_clone(const UDateFormat *fmt, UErrorCode *status) { - if(U_FAILURE(*status)) return 0; + if (U_FAILURE(*status)) return nullptr; Format *res = ((DateFormat*)fmt)->clone(); - if(res == 0) { + if (res == nullptr) { *status = U_MEMORY_ALLOCATION_ERROR; - return 0; + return nullptr; } return (UDateFormat*) res; @@ -243,12 +243,12 @@ udat_format( const UDateFormat* format, FieldPosition fp; - if(position != 0) + if (position != nullptr) fp.setField(position->field); ((DateFormat*)format)->format(dateToFormat, res, fp); - if(position != 0) { + if (position != nullptr) { position->beginIndex = fp.getBeginIndex(); position->endIndex = fp.getEndIndex(); } @@ -281,12 +281,12 @@ udat_formatCalendar(const UDateFormat* format, FieldPosition fp; - if(position != 0) + if (position != nullptr) fp.setField(position->field); ((DateFormat*)format)->format(*(Calendar*)calendar, res, fp); - if(position != 0) { + if (position != nullptr) { position->beginIndex = fp.getBeginIndex(); position->endIndex = fp.getEndIndex(); } @@ -1270,7 +1270,6 @@ udat_setContext(UDateFormat* fmt, UDisplayContext value, UErrorCode* status) return; } ((DateFormat*)fmt)->setContext(value, *status); - return; } U_CAPI UDisplayContext U_EXPORT2 diff --git a/contrib/libs/icu/i18n/udateintervalformat.cpp b/contrib/libs/icu/i18n/udateintervalformat.cpp index a332eacc53..1ab3813693 100644 --- a/contrib/libs/icu/i18n/udateintervalformat.cpp +++ b/contrib/libs/icu/i18n/udateintervalformat.cpp @@ -57,7 +57,7 @@ udtitvfmt_open(const char* locale, if (U_FAILURE(*status)) { return nullptr; } - if(tzID != 0) { + if (tzID != nullptr) { TimeZone *zone = TimeZone::createTimeZone(UnicodeString((UBool)(tzIDLength == -1), tzID, tzIDLength)); if(zone == nullptr) { *status = U_MEMORY_ALLOCATION_ERROR; @@ -99,7 +99,7 @@ udtitvfmt_format(const UDateIntervalFormat* formatter, res.setTo(result, 0, resultCapacity); } FieldPosition fp; - if (position != 0) { + if (position != nullptr) { fp.setField(position->field); } @@ -108,7 +108,7 @@ udtitvfmt_format(const UDateIntervalFormat* formatter, if (U_FAILURE(*status)) { return -1; } - if (position != 0) { + if (position != nullptr) { position->beginIndex = fp.getBeginIndex(); position->endIndex = fp.getEndIndex(); } diff --git a/contrib/libs/icu/i18n/ulocdata.cpp b/contrib/libs/icu/i18n/ulocdata.cpp index 8e0687c5f6..a1b2daa443 100644 --- a/contrib/libs/icu/i18n/ulocdata.cpp +++ b/contrib/libs/icu/i18n/ulocdata.cpp @@ -16,6 +16,7 @@ * created by: Ram Viswanadha,John Emmons */ +#include "charstr.h" #include "cmemory.h" #include "unicode/ustring.h" #include "unicode/ures.h" @@ -68,13 +69,19 @@ ulocdata_open(const char *localeID, UErrorCode *status) uld->noSubstitute = false; uld->bundle = ures_open(nullptr, localeID, status); - uld->langBundle = ures_open(U_ICUDATA_LANG, localeID, status); if (U_FAILURE(*status)) { uprv_free(uld); return nullptr; } + // ICU-22149: not all functions require lang data, so fail gracefully if it is not present + UErrorCode oldStatus = *status; + uld->langBundle = ures_open(U_ICUDATA_LANG, localeID, status); + if (*status == U_MISSING_RESOURCE_ERROR) { + *status = oldStatus; + } + return uld; } @@ -191,17 +198,20 @@ ulocdata_getDelimiter(ULocaleData *uld, ULocaleDataDelimiterType type, return len; } -static UResourceBundle * measurementTypeBundleForLocale(const char *localeID, const char *measurementType, UErrorCode *status){ - char region[ULOC_COUNTRY_CAPACITY]; +namespace { + +UResourceBundle * measurementTypeBundleForLocale(const char *localeID, const char *measurementType, UErrorCode *status){ + if (U_FAILURE(*status)) { return nullptr; } + UResourceBundle *rb; UResourceBundle *measTypeBundle = nullptr; - - ulocimp_getRegionForSupplementalData(localeID, true, region, ULOC_COUNTRY_CAPACITY, status); - + + icu::CharString region = ulocimp_getRegionForSupplementalData(localeID, true, *status); + rb = ures_openDirect(nullptr, "supplementalData", status); ures_getByKey(rb, "measurementData", rb, status); if (rb != nullptr) { - UResourceBundle *measDataBundle = ures_getByKey(rb, region, nullptr, status); + UResourceBundle *measDataBundle = ures_getByKey(rb, region.data(), nullptr, status); if (U_SUCCESS(*status)) { measTypeBundle = ures_getByKey(measDataBundle, measurementType, nullptr, status); } @@ -219,6 +229,8 @@ static UResourceBundle * measurementTypeBundleForLocale(const char *localeID, co return measTypeBundle; } +} // namespace + U_CAPI UMeasurementSystem U_EXPORT2 ulocdata_getMeasurementSystem(const char *localeID, UErrorCode *status){ @@ -269,6 +281,7 @@ ulocdata_getPaperSize(const char* localeID, int32_t *height, int32_t *width, UEr U_CAPI void U_EXPORT2 ulocdata_getCLDRVersion(UVersionInfo versionArray, UErrorCode *status) { + if (U_FAILURE(*status)) { return; } UResourceBundle *rb = nullptr; rb = ures_openDirect(nullptr, "supplementalData", status); ures_getVersionByKey(rb, "cldrVersion", versionArray, status); @@ -288,6 +301,11 @@ ulocdata_getLocaleDisplayPattern(ULocaleData *uld, if (U_FAILURE(*status)) return 0; + if (uld->langBundle == nullptr) { + *status = U_MISSING_RESOURCE_ERROR; + return 0; + } + patternBundle = ures_getByKey(uld->langBundle, "localeDisplayPattern", nullptr, &localStatus); if ( (localStatus == U_USING_DEFAULT_WARNING) && uld->noSubstitute ) { @@ -340,6 +358,11 @@ ulocdata_getLocaleSeparator(ULocaleData *uld, if (U_FAILURE(*status)) return 0; + if (uld->langBundle == nullptr) { + *status = U_MISSING_RESOURCE_ERROR; + return 0; + } + separatorBundle = ures_getByKey(uld->langBundle, "localeDisplayPattern", nullptr, &localStatus); if ( (localStatus == U_USING_DEFAULT_WARNING) && uld->noSubstitute ) { diff --git a/contrib/libs/icu/i18n/umsg.cpp b/contrib/libs/icu/i18n/umsg.cpp index ea6e62e2aa..b1f2795807 100644 --- a/contrib/libs/icu/i18n/umsg.cpp +++ b/contrib/libs/icu/i18n/umsg.cpp @@ -232,11 +232,11 @@ umsg_open( const char16_t *pattern, //check arguments if(status==nullptr || U_FAILURE(*status)) { - return 0; + return nullptr; } if(pattern==nullptr||patternLength<-1){ *status=U_ILLEGAL_ARGUMENT_ERROR; - return 0; + return nullptr; } UParseError tErr; @@ -282,9 +282,9 @@ umsg_clone(const UMessageFormat *fmt, return nullptr; } UMessageFormat retVal = (UMessageFormat)((MessageFormat*)fmt)->clone(); - if(retVal == 0) { + if (retVal == nullptr) { *status = U_MEMORY_ALLOCATION_ERROR; - return 0; + return nullptr; } return retVal; } @@ -344,7 +344,7 @@ umsg_toPattern(const UMessageFormat *fmt, if(status ==nullptr||U_FAILURE(*status)){ return -1; } - if(fmt==nullptr||resultLength<0 || (resultLength>0 && result==0)){ + if (fmt == nullptr || resultLength < 0 || (resultLength > 0 && result == nullptr)) { *status=U_ILLEGAL_ARGUMENT_ERROR; return -1; } @@ -393,11 +393,11 @@ umsg_vformat( const UMessageFormat *fmt, UErrorCode *status) { //check arguments - if(status==0 || U_FAILURE(*status)) + if (status == nullptr || U_FAILURE(*status)) { return -1; } - if(fmt==nullptr||resultLength<0 || (resultLength>0 && result==0)) { + if (fmt == nullptr || resultLength < 0 || (resultLength > 0 && result == nullptr)) { *status=U_ILLEGAL_ARGUMENT_ERROR; return -1; } diff --git a/contrib/libs/icu/i18n/uni2name.h b/contrib/libs/icu/i18n/uni2name.h index 1e01d78423..44f8d94d7b 100644 --- a/contrib/libs/icu/i18n/uni2name.h +++ b/contrib/libs/icu/i18n/uni2name.h @@ -33,7 +33,7 @@ class UnicodeNameTransliterator : public Transliterator { * Constructs a transliterator. * @param adoptedFilter the filter to be adopted. */ - UnicodeNameTransliterator(UnicodeFilter* adoptedFilter = 0); + UnicodeNameTransliterator(UnicodeFilter* adoptedFilter = nullptr); /** * Destructor. diff --git a/contrib/libs/icu/i18n/units_converter.cpp b/contrib/libs/icu/i18n/units_converter.cpp index b89f495121..84ea1c1761 100644 --- a/contrib/libs/icu/i18n/units_converter.cpp +++ b/contrib/libs/icu/i18n/units_converter.cpp @@ -180,7 +180,7 @@ void addFactorElement(Factor &factor, StringPiece elementStr, Signum signum, UEr Factor extractFactorConversions(StringPiece stringFactor, UErrorCode &status) { Factor result; Signum signum = Signum::POSITIVE; - auto factorData = stringFactor.data(); + const auto* factorData = stringFactor.data(); for (int32_t i = 0, start = 0, n = stringFactor.length(); i < n; i++) { if (factorData[i] == '*' || factorData[i] == '/') { StringPiece factorElement = stringFactor.substr(start, i - start); @@ -202,11 +202,11 @@ Factor extractFactorConversions(StringPiece stringFactor, UErrorCode &status) { // Load factor for a single source Factor loadSingleFactor(StringPiece source, const ConversionRates &ratesInfo, UErrorCode &status) { - const auto conversionUnit = ratesInfo.extractConversionInfo(source, status); - if (U_FAILURE(status)) return Factor(); + const auto* const conversionUnit = ratesInfo.extractConversionInfo(source, status); + if (U_FAILURE(status)) return {}; if (conversionUnit == nullptr) { status = U_INTERNAL_PROGRAM_ERROR; - return Factor(); + return {}; } Factor result = extractFactorConversions(conversionUnit->factor.toStringPiece(), status); @@ -270,49 +270,97 @@ UBool checkSimpleUnit(const MeasureUnitImpl &unit, UErrorCode &status) { return true; } +// Map the MeasureUnitImpl for a simpleUnit to a SingleUnitImpl, then use that +// SingleUnitImpl's simpleUnitID to get the corresponding ConversionRateInfo; +// from that we get the specialMappingName (which may be empty if the simple unit +// converts to base using factor + offset instelad of a special mapping). +CharString getSpecialMappingName(const MeasureUnitImpl &simpleUnit, const ConversionRates &ratesInfo, + UErrorCode &status) { + if (!checkSimpleUnit(simpleUnit, status)) { + return {}; + } + SingleUnitImpl singleUnit = *simpleUnit.singleUnits[0]; + const auto* const conversionUnit = + ratesInfo.extractConversionInfo(singleUnit.getSimpleUnitID(), status); + if (U_FAILURE(status)) { + return {}; + } + if (conversionUnit == nullptr) { + status = U_INTERNAL_PROGRAM_ERROR; + return {}; + } + CharString result; + result.copyFrom(conversionUnit->specialMappingName, status); + return result; +} + /** * Extract conversion rate from `source` to `target` */ // In ICU4J, this function is partially inlined in the UnitsConverter constructor. +// TODO ICU-22683: Consider splitting handling of special mappings into separate class void loadConversionRate(ConversionRate &conversionRate, const MeasureUnitImpl &source, const MeasureUnitImpl &target, Convertibility unitsState, const ConversionRates &ratesInfo, UErrorCode &status) { - // Represents the conversion factor from the source to the target. - Factor finalFactor; - - // Represents the conversion factor from the source to the base unit that specified in the conversion - // data which is considered as the root of the source and the target. - Factor sourceToBase = loadCompoundFactor(source, ratesInfo, status); - Factor targetToBase = loadCompoundFactor(target, ratesInfo, status); - - // Merger Factors - finalFactor.multiplyBy(sourceToBase); - if (unitsState == Convertibility::CONVERTIBLE) { - finalFactor.divideBy(targetToBase); - } else if (unitsState == Convertibility::RECIPROCAL) { - finalFactor.multiplyBy(targetToBase); - } else { - status = UErrorCode::U_ARGUMENT_TYPE_MISMATCH; - return; - } - finalFactor.substituteConstants(); + conversionRate.specialSource = getSpecialMappingName(source, ratesInfo, status); + conversionRate.specialTarget = getSpecialMappingName(target, ratesInfo, status); + + if (conversionRate.specialSource.isEmpty() && conversionRate.specialTarget.isEmpty()) { + // Represents the conversion factor from the source to the target. + Factor finalFactor; + + // Represents the conversion factor from the source to the base unit that specified in the conversion + // data which is considered as the root of the source and the target. + Factor sourceToBase = loadCompoundFactor(source, ratesInfo, status); + Factor targetToBase = loadCompoundFactor(target, ratesInfo, status); + + // Merger Factors + finalFactor.multiplyBy(sourceToBase); + if (unitsState == Convertibility::CONVERTIBLE) { + finalFactor.divideBy(targetToBase); + } else if (unitsState == Convertibility::RECIPROCAL) { + finalFactor.multiplyBy(targetToBase); + } else { + status = UErrorCode::U_ARGUMENT_TYPE_MISMATCH; + return; + } + + finalFactor.substituteConstants(); - conversionRate.factorNum = finalFactor.factorNum; - conversionRate.factorDen = finalFactor.factorDen; + conversionRate.factorNum = finalFactor.factorNum; + conversionRate.factorDen = finalFactor.factorDen; - // This code corresponds to ICU4J's ConversionRates.getOffset(). - // In case of simple units (such as: celsius or fahrenheit), offsets are considered. - if (checkSimpleUnit(source, status) && checkSimpleUnit(target, status)) { - conversionRate.sourceOffset = - sourceToBase.offset * sourceToBase.factorDen / sourceToBase.factorNum; - conversionRate.targetOffset = - targetToBase.offset * targetToBase.factorDen / targetToBase.factorNum; + // This code corresponds to ICU4J's ConversionRates.getOffset(). + // In case of simple units (such as: celsius or fahrenheit), offsets are considered. + if (checkSimpleUnit(source, status) && checkSimpleUnit(target, status)) { + conversionRate.sourceOffset = + sourceToBase.offset * sourceToBase.factorDen / sourceToBase.factorNum; + conversionRate.targetOffset = + targetToBase.offset * targetToBase.factorDen / targetToBase.factorNum; + } + // TODO(icu-units#127): should we consider failure if there's an offset for + // a not-simple-unit? What about kilokelvin / kilocelsius? + + conversionRate.reciprocal = unitsState == Convertibility::RECIPROCAL; + } else if (conversionRate.specialSource.isEmpty() || conversionRate.specialTarget.isEmpty()) { + // Still need to set factorNum/factorDen for either source to base or base to target + if (unitsState != Convertibility::CONVERTIBLE) { + status = UErrorCode::U_ARGUMENT_TYPE_MISMATCH; + return; + } + Factor finalFactor; + if (conversionRate.specialSource.isEmpty()) { + // factorNum/factorDen is for source to base only + finalFactor = loadCompoundFactor(source, ratesInfo, status); + } else { + // factorNum/factorDen is for base to target only + finalFactor = loadCompoundFactor(target, ratesInfo, status); + } + finalFactor.substituteConstants(); + conversionRate.factorNum = finalFactor.factorNum; + conversionRate.factorDen = finalFactor.factorDen; } - // TODO(icu-units#127): should we consider failure if there's an offset for - // a not-simple-unit? What about kilokelvin / kilocelsius? - - conversionRate.reciprocal = unitsState == Convertibility::RECIPROCAL; } struct UnitIndexAndDimension : UMemory { @@ -372,11 +420,11 @@ void U_I18N_API addSingleFactorConstant(StringPiece baseStr, int32_t power, Sign factor.constantExponents[CONSTANT_FT2M] += 3 * power * signum; } else if (baseStr == "in3_to_m3") { factor.constantExponents[CONSTANT_FT2M] += 3 * power * signum; - factor.factorDen *= 12 * 12 * 12; + factor.factorDen *= std::pow(12 * 12 * 12, power * signum); } else if (baseStr == "gal_to_m3") { - factor.factorNum *= 231; factor.constantExponents[CONSTANT_FT2M] += 3 * power * signum; - factor.factorDen *= 12 * 12 * 12; + factor.factorNum *= std::pow(231, power * signum); + factor.factorDen *= std::pow(12 * 12 * 12, power * signum); } else if (baseStr == "gal_imp_to_m3") { factor.constantExponents[CONSTANT_GAL_IMP2M3] += power * signum; } else if (baseStr == "G") { @@ -397,6 +445,14 @@ void U_I18N_API addSingleFactorConstant(StringPiece baseStr, int32_t power, Sign factor.constantExponents[CONSTANT_SEC_PER_JULIAN_YEAR] += power * signum; } else if (baseStr == "speed_of_light_meters_per_second") { factor.constantExponents[CONSTANT_SPEED_OF_LIGHT_METERS_PER_SECOND] += power * signum; + } else if (baseStr == "sho_to_m3") { + factor.constantExponents[CONSTANT_SHO_TO_M3] += power * signum; + } else if (baseStr == "tsubo_to_m2") { + factor.constantExponents[CONSTANT_TSUBO_TO_M2] += power * signum; + } else if (baseStr == "shaku_to_m") { + factor.constantExponents[CONSTANT_SHAKU_TO_M] += power * signum; + } else if (baseStr == "AMU") { + factor.constantExponents[CONSTANT_AMU] += power * signum; } else { if (signum == Signum::NEGATIVE) { factor.factorDen *= std::pow(strToDouble(baseStr, status), power); @@ -422,7 +478,7 @@ MeasureUnitImpl U_I18N_API extractCompoundBaseUnit(const MeasureUnitImpl &source const auto &singleUnit = *singleUnits[i]; // Extract `ConversionRateInfo` using the absolute unit. For example: in case of `square-meter`, // we will use `meter` - const auto rateInfo = + const auto* const rateInfo = conversionRates.extractConversionInfo(singleUnit.getSimpleUnitID(), status); if (U_FAILURE(status)) { return result; @@ -535,7 +591,7 @@ void UnitsConverter::init(const ConversionRates &ratesInfo, UErrorCode &status) loadConversionRate(conversionRate_, conversionRate_.source, conversionRate_.target, unitsState, ratesInfo, status); - + } int32_t UnitsConverter::compareTwoUnits(const MeasureUnitImpl &firstUnit, @@ -561,6 +617,23 @@ int32_t UnitsConverter::compareTwoUnits(const MeasureUnitImpl &firstUnit, return 0; } + CharString firstSpecial = getSpecialMappingName(firstUnit, ratesInfo, status); + CharString secondSpecial = getSpecialMappingName(secondUnit, ratesInfo, status); + if (!firstSpecial.isEmpty() || !secondSpecial.isEmpty()) { + if (firstSpecial.isEmpty()) { + // non-specials come first + return -1; + } + if (secondSpecial.isEmpty()) { + // non-specials come first + return 1; + } + // both are specials, compare lexicographically + StringPiece firstSpecialPiece = firstSpecial.toStringPiece(); + StringPiece secondSpecialPiece = secondSpecial.toStringPiece(); + return firstSpecialPiece.compare(secondSpecialPiece); + } + // Represents the conversion factor from the firstUnit to the base // unit that specified in the conversion data which is considered as // the root of the firstUnit and the secondUnit. @@ -585,8 +658,115 @@ int32_t UnitsConverter::compareTwoUnits(const MeasureUnitImpl &firstUnit, return 0; } +// TODO per CLDR-17421 and ICU-22683: consider getting the data below from CLDR +static double minMetersPerSecForBeaufort[] = { + // Minimum m/s (base) values for each Bft value, plus an extra artificial value; + // when converting from Bft to m/s, the middle of the range will be used + // (Values from table in Wikipedia, except for artificial value). + // Since this is 0 based, max Beaufort value is thus array dimension minus 2. + 0.0, // 0 Bft + 0.3, // 1 + 1.6, // 2 + 3.4, // 3 + 5.5, // 4 + 8.0, // 5 + 10.8, // 6 + 13.9, // 7 + 17.2, // 8 + 20.8, // 9 + 24.5, // 10 + 28.5, // 11 + 32.7, // 12 + 36.9, // 13 + 41.4, // 14 + 46.1, // 15 + 51.1, // 16 + 55.8, // 17 + 61.4, // artificial end of range 17 to give reasonable midpoint +}; + +static int maxBeaufort = UPRV_LENGTHOF(minMetersPerSecForBeaufort) - 2; + +// Convert from what should be discrete scale values for a particular unit like beaufort +// to a corresponding value in the base unit (which can have any decimal value, like meters/sec). +// First we round the scale value to the nearest integer (in case it is specified with a fractional value), +// then we map that to a value in middle of the range of corresponding base values. +// This can handle different scales, specified by minBaseForScaleValues[]. +double UnitsConverter::scaleToBase(double scaleValue, double minBaseForScaleValues[], int scaleMax) const { + if (scaleValue < 0) { + scaleValue = -scaleValue; + } + scaleValue += 0.5; // adjust up for later truncation + if (scaleValue > (double)scaleMax) { + scaleValue = (double)scaleMax; + } + int scaleInt = (int)scaleValue; + return (minBaseForScaleValues[scaleInt] + minBaseForScaleValues[scaleInt+1])/2.0; +} + +// Binary search to find the range that includes key; +// if key (non-negative) is in the range rangeStarts[i] to just under rangeStarts[i+1], +// then we return i; if key is >= rangeStarts[max] then we return max. +// Note that max is the maximum scale value, not the number of elements in the array +// (which should be larger than max). +// The ranges for index 0 start at 0.0. +static int bsearchRanges(double rangeStarts[], int max, double key) { + if (key >= rangeStarts[max]) { + return max; + } + int beg = 0, mid = 0, end = max + 1; + while (beg < end) { + mid = (beg + end) / 2; + if (key < rangeStarts[mid]) { + end = mid; + } else if (key > rangeStarts[mid+1]) { + beg = mid+1; + } else { + break; + } + } + return mid; +} + +// Convert from a value in the base unit (which can have any decimal value, like meters/sec) to a corresponding +// discrete value in a scale (like beaufort), where each scale value represents a range of base values. +// We binary-search the ranges to find the one that contains the specified base value, and return its index. +// This can handle different scales, specified by minBaseForScaleValues[]. +double UnitsConverter::baseToScale(double baseValue, double minBaseForScaleValues[], int scaleMax) const { + if (baseValue < 0) { + baseValue = -baseValue; + } + int scaleIndex = bsearchRanges(minBaseForScaleValues, scaleMax, baseValue); + return (double)scaleIndex; +} + double UnitsConverter::convert(double inputValue) const { - double result = + double result = inputValue; + if (!conversionRate_.specialSource.isEmpty() || !conversionRate_.specialTarget.isEmpty()) { + double base = inputValue; + // convert input (=source) to base + if (!conversionRate_.specialSource.isEmpty()) { + // We have a special mapping from source to base (not using factor, offset). + // Currently the only supported mapping is a scale-based mapping for beaufort. + base = (conversionRate_.specialSource == StringPiece("beaufort"))? + scaleToBase(inputValue, minMetersPerSecForBeaufort, maxBeaufort): inputValue; + } else { + // Standard mapping (using factor) from source to base. + base = inputValue * conversionRate_.factorNum / conversionRate_.factorDen; + } + // convert base to result (=target) + if (!conversionRate_.specialTarget.isEmpty()) { + // We have a special mapping from base to target (not using factor, offset). + // Currently the only supported mapping is a scale-based mapping for beaufort. + result = (conversionRate_.specialTarget == StringPiece("beaufort"))? + baseToScale(base, minMetersPerSecForBeaufort, maxBeaufort): base; + } else { + // Standard mapping (using factor) from base to target. + result = base * conversionRate_.factorDen / conversionRate_.factorNum; + } + return result; + } + result = inputValue + conversionRate_.sourceOffset; // Reset the input to the target zero index. // Convert the quantity to from the source scale to the target scale. result *= conversionRate_.factorNum / conversionRate_.factorDen; @@ -605,6 +785,30 @@ double UnitsConverter::convert(double inputValue) const { double UnitsConverter::convertInverse(double inputValue) const { double result = inputValue; + if (!conversionRate_.specialSource.isEmpty() || !conversionRate_.specialTarget.isEmpty()) { + double base = inputValue; + // convert input (=target) to base + if (!conversionRate_.specialTarget.isEmpty()) { + // We have a special mapping from target to base (not using factor). + // Currently the only supported mapping is a scale-based mapping for beaufort. + base = (conversionRate_.specialTarget == StringPiece("beaufort"))? + scaleToBase(inputValue, minMetersPerSecForBeaufort, maxBeaufort): inputValue; + } else { + // Standard mapping (using factor) from target to base. + base = inputValue * conversionRate_.factorNum / conversionRate_.factorDen; + } + // convert base to result (=source) + if (!conversionRate_.specialSource.isEmpty()) { + // We have a special mapping from base to source (not using factor). + // Currently the only supported mapping is a scale-based mapping for beaufort. + result = (conversionRate_.specialSource == StringPiece("beaufort"))? + baseToScale(base, minMetersPerSecForBeaufort, maxBeaufort): base; + } else { + // Standard mapping (using factor) from base to source. + result = base * conversionRate_.factorDen / conversionRate_.factorNum; + } + return result; + } if (conversionRate_.reciprocal) { if (result == 0) { return uprv_getInfinity(); diff --git a/contrib/libs/icu/i18n/units_converter.h b/contrib/libs/icu/i18n/units_converter.h index fd1d6ec422..01fa557062 100644 --- a/contrib/libs/icu/i18n/units_converter.h +++ b/contrib/libs/icu/i18n/units_converter.h @@ -33,6 +33,10 @@ enum Constants { CONSTANT_METERS_PER_AU, CONSTANT_SEC_PER_JULIAN_YEAR, CONSTANT_SPEED_OF_LIGHT_METERS_PER_SECOND, + CONSTANT_SHO_TO_M3, // https://en.wikipedia.org/wiki/Japanese_units_of_measurement + CONSTANT_TSUBO_TO_M2, // https://en.wikipedia.org/wiki/Japanese_units_of_measurement + CONSTANT_SHAKU_TO_M, // https://en.wikipedia.org/wiki/Japanese_units_of_measurement + CONSTANT_AMU, // Atomic Mass Unit https://www.nist.gov/pml/special-publication-811/nist-guide-si-chapter-5-units-outside-si#table7 // Must be the last element. CONSTANTS_COUNT @@ -55,6 +59,10 @@ static const double constantsValues[CONSTANTS_COUNT] = { 149597870700, // CONSTANT_METERS_PER_AU 31557600, // CONSTANT_SEC_PER_JULIAN_YEAR 299792458, // CONSTANT_SPEED_OF_LIGHT_METERS_PER_SECOND + 2401.0 / (1331.0 * 1000.0), + 400.0 / 121.0, + 4.0 / 121.0, + 1.66053878283E-27, // CONSTANT_AMU }; typedef enum Signum { @@ -102,10 +110,14 @@ void U_I18N_API addSingleFactorConstant(StringPiece baseStr, int32_t power, Sign /** * Represents the conversion rate between `source` and `target`. + * TODO ICU-22683: COnsider moving the handling of special mappings (e.g. beaufort) to a separate + * struct. */ struct U_I18N_API ConversionRate : public UMemory { const MeasureUnitImpl source; const MeasureUnitImpl target; + CharString specialSource; + CharString specialTarget; double factorNum = 1; double factorDen = 1; double sourceOffset = 0; @@ -113,7 +125,7 @@ struct U_I18N_API ConversionRate : public UMemory { bool reciprocal = false; ConversionRate(MeasureUnitImpl &&source, MeasureUnitImpl &&target) - : source(std::move(source)), target(std::move(target)) {} + : source(std::move(source)), target(std::move(target)), specialSource(), specialTarget() {} }; enum Convertibility { @@ -214,8 +226,23 @@ class U_I18N_API UnitsConverter : public UMemory { /** * Initialises the object. - */ + */ void init(const ConversionRates &ratesInfo, UErrorCode &status); + + /** + * Convert from what should be discrete scale values for a particular unit like beaufort + * to a corresponding value in the base unit (which can have any decimal value, like meters/sec). + * This can handle different scales, specified by minBaseForScaleValues[]. + */ + double scaleToBase(double scaleValue, double minBaseForScaleValues[], int scaleMax) const; + + /** + * Convert from a value in the base unit (which can have any decimal value, like meters/sec) to a corresponding + * discrete value in a scale (like beaufort), where each scale value represents a range of base values. + * This can handle different scales, specified by minBaseForScaleValues[]. + */ + double baseToScale(double baseValue, double minBaseForScaleValues[], int scaleMax) const; + }; } // namespace units diff --git a/contrib/libs/icu/i18n/units_data.cpp b/contrib/libs/icu/i18n/units_data.cpp index 801ede8837..19a43f1686 100644 --- a/contrib/libs/icu/i18n/units_data.cpp +++ b/contrib/libs/icu/i18n/units_data.cpp @@ -6,10 +6,13 @@ #if !UCONFIG_NO_FORMATTING #include "bytesinkutil.h" +#include "charstr.h" #include "cstring.h" +#include "measunit_impl.h" #include "number_decimalquantity.h" #include "resource.h" #include "uassert.h" +#include "ulocimp.h" #include "unicode/locid.h" #include "unicode/unistr.h" #include "unicode/ures.h" @@ -78,6 +81,8 @@ class ConversionRateDataSink : public ResourceSink { UnicodeString baseUnit = ICU_Utility::makeBogusString(); UnicodeString factor = ICU_Utility::makeBogusString(); UnicodeString offset = ICU_Utility::makeBogusString(); + UnicodeString special = ICU_Utility::makeBogusString(); + UnicodeString systems = ICU_Utility::makeBogusString(); for (int32_t i = 0; unitTable.getKeyAndValue(i, key, value); i++) { if (uprv_strcmp(key, "target") == 0) { baseUnit = value.getUnicodeString(status); @@ -85,10 +90,14 @@ class ConversionRateDataSink : public ResourceSink { factor = value.getUnicodeString(status); } else if (uprv_strcmp(key, "offset") == 0) { offset = value.getUnicodeString(status); + } else if (uprv_strcmp(key, "special") == 0) { + special = value.getUnicodeString(status); // the name of a special mapping used instead of factor + optional offset. + } else if (uprv_strcmp(key, "systems") == 0) { + systems = value.getUnicodeString(status); } } if (U_FAILURE(status)) { return; } - if (baseUnit.isBogus() || factor.isBogus()) { + if (baseUnit.isBogus() || (factor.isBogus() && special.isBogus())) { // We could not find a usable conversion rate: bad resource. status = U_MISSING_RESOURCE_ERROR; return; @@ -102,12 +111,15 @@ class ConversionRateDataSink : public ResourceSink { } else { cr->sourceUnit.append(srcUnit, status); cr->baseUnit.appendInvariantChars(baseUnit, status); - cr->factor.appendInvariantChars(factor, status); - trimSpaces(cr->factor, status); + if (!factor.isBogus()) { + cr->factor.appendInvariantChars(factor, status); + trimSpaces(cr->factor, status); + } if (!offset.isBogus()) cr->offset.appendInvariantChars(offset, status); + if (!special.isBogus()) cr->specialMappingName.appendInvariantChars(special, status); + cr->systems.appendInvariantChars(systems, status); } } - return; } private: @@ -376,7 +388,7 @@ void U_I18N_API getAllConversionRates(MaybeStackVector<ConversionRateInfo> &resu const ConversionRateInfo *ConversionRates::extractConversionInfo(StringPiece source, UErrorCode &status) const { for (size_t i = 0, n = conversionInfo_.length(); i < n; ++i) { - if (conversionInfo_[i]->sourceUnit.toStringPiece() == source) return conversionInfo_[i]; + if (conversionInfo_[i]->sourceUnit == source) return conversionInfo_[i]; } status = U_INTERNAL_PROGRAM_ERROR; @@ -390,12 +402,8 @@ U_I18N_API UnitPreferences::UnitPreferences(UErrorCode &status) { } CharString getKeyWordValue(const Locale &locale, StringPiece kw, UErrorCode &status) { - CharString result; - if (U_FAILURE(status)) { return result; } - { - CharStringByteSink sink(&result); - locale.getKeywordValue(kw, sink, status); - } + if (U_FAILURE(status)) { return {}; } + auto result = locale.getKeywordValue<CharString>(kw, status); if (U_SUCCESS(status) && result.isEmpty()) { status = U_MISSING_RESOURCE_ERROR; } @@ -431,46 +439,14 @@ MaybeStackVector<UnitPreference> } } - CharString region(locale.getCountry(), status); + CharString region = ulocimp_getRegionForSupplementalData(locale.getName(), true, status); // Check the locale system tag, e.g `ms=metric`. UErrorCode internalMeasureTagStatus = U_ZERO_ERROR; CharString localeSystem = getKeyWordValue(locale, "measure", internalMeasureTagStatus); bool isLocaleSystem = false; - if (U_SUCCESS(internalMeasureTagStatus)) { - if (localeSystem == "metric") { - region.clear(); - region.append("001", status); - isLocaleSystem = true; - } else if (localeSystem == "ussystem") { - region.clear(); - region.append("US", status); - isLocaleSystem = true; - } else if (localeSystem == "uksystem") { - region.clear(); - region.append("GB", status); - isLocaleSystem = true; - } - } - - // Check the region tag, e.g. `rg=uszzz`. - if (!isLocaleSystem) { - UErrorCode internalRgTagStatus = U_ZERO_ERROR; - CharString localeRegion = getKeyWordValue(locale, "rg", internalRgTagStatus); - if (U_SUCCESS(internalRgTagStatus) && localeRegion.length() >= 3) { - if (localeRegion == "default") { - region.clear(); - region.append(localeRegion, status); - } else if (localeRegion[0] >= '0' && localeRegion[0] <= '9') { - region.clear(); - region.append(localeRegion.data(), 3, status); - } else { - // Take the first two character and capitalize them. - region.clear(); - region.append(uprv_toupper(localeRegion[0]), status); - region.append(uprv_toupper(localeRegion[1]), status); - } - } + if (U_SUCCESS(internalMeasureTagStatus) && (localeSystem == "metric" || localeSystem == "ussystem" || localeSystem == "uksystem")) { + isLocaleSystem = true; } int32_t idx = @@ -481,6 +457,48 @@ MaybeStackVector<UnitPreference> U_ASSERT(idx >= 0); // Failures should have been taken care of by `status`. const UnitPreferenceMetadata *m = metadata_[idx]; + + if (isLocaleSystem) { + // if the locale ID specifies a measurment system, check if ALL of the units we got back + // are members of that system (or are "metric_adjacent", which we consider to match all + // the systems) + bool unitsMatchSystem = true; + ConversionRates rates(status); + for (int32_t i = 0; unitsMatchSystem && i < m->prefsCount; i++) { + const UnitPreference& unitPref = *(unitPrefs_[i + m->prefsOffset]); + MeasureUnitImpl measureUnit = MeasureUnitImpl::forIdentifier(unitPref.unit.data(), status); + for (int32_t j = 0; unitsMatchSystem && j < measureUnit.singleUnits.length(); j++) { + const SingleUnitImpl* singleUnit = measureUnit.singleUnits[j]; + const ConversionRateInfo* rateInfo = rates.extractConversionInfo(singleUnit->getSimpleUnitID(), status); + CharString systems(rateInfo->systems, status); + if (!systems.contains("metric_adjacent")) { // "metric-adjacent" is considered to match all the locale systems + if (!systems.contains(localeSystem.data())) { + unitsMatchSystem = false; + } + } + } + } + + // if any of the units we got back above don't match the mearurement system the locale ID asked for, + // throw out the region and just load the units for the base region for the requested measurement system + if (!unitsMatchSystem) { + region.clear(); + if (localeSystem == "ussystem") { + region.append("US", status); + } else if (localeSystem == "uksystem") { + region.append("GB", status); + } else { + region.append("001", status); + } + idx = getPreferenceMetadataIndex(&metadata_, category, usage, region.toStringPiece(), status); + if (U_FAILURE(status)) { + return result; + } + + m = metadata_[idx]; + } + } + for (int32_t i = 0; i < m->prefsCount; i++) { result.emplaceBackAndCheckErrorCode(status, *(unitPrefs_[i + m->prefsOffset])); } diff --git a/contrib/libs/icu/i18n/units_data.h b/contrib/libs/icu/i18n/units_data.h index 118458ecca..ccfe5fbef1 100644 --- a/contrib/libs/icu/i18n/units_data.h +++ b/contrib/libs/icu/i18n/units_data.h @@ -31,7 +31,7 @@ class U_I18N_API ConversionRateInfo : public UMemory { ConversionRateInfo() {} ConversionRateInfo(StringPiece sourceUnit, StringPiece baseUnit, StringPiece factor, StringPiece offset, UErrorCode &status) - : sourceUnit(), baseUnit(), factor(), offset() { + : sourceUnit(), baseUnit(), factor(), offset(), specialMappingName() { this->sourceUnit.append(sourceUnit, status); this->baseUnit.append(baseUnit, status); this->factor.append(factor, status); @@ -41,6 +41,8 @@ class U_I18N_API ConversionRateInfo : public UMemory { CharString baseUnit; CharString factor; CharString offset; + CharString specialMappingName; // the name of a special mapping used instead of factor + optional offset. + CharString systems; }; } // namespace units diff --git a/contrib/libs/icu/i18n/units_router.cpp b/contrib/libs/icu/i18n/units_router.cpp index 03c9b4d1d7..0a51cda9f9 100644 --- a/contrib/libs/icu/i18n/units_router.cpp +++ b/contrib/libs/icu/i18n/units_router.cpp @@ -77,7 +77,7 @@ void UnitsRouter::init(const MeasureUnit &inputUnit, const Locale &locale, Strin prefs.getPreferencesFor(category.toStringPiece(), usage, locale, status); for (int32_t i = 0, n = unitPrefs.length(); i < n; ++i) { U_ASSERT(unitPrefs[i] != nullptr); - const auto preference = unitPrefs[i]; + const auto* const preference = unitPrefs[i]; MeasureUnitImpl complexTargetUnitImpl = MeasureUnitImpl::forIdentifier(preference->unit.data(), status); diff --git a/contrib/libs/icu/i18n/unum.cpp b/contrib/libs/icu/i18n/unum.cpp index 11a7bcba57..7c35473f2d 100644 --- a/contrib/libs/icu/i18n/unum.cpp +++ b/contrib/libs/icu/i18n/unum.cpp @@ -28,17 +28,19 @@ #include "unicode/dcfmtsym.h" #include "unicode/curramt.h" #include "unicode/localpointer.h" +#include "unicode/measfmt.h" #include "unicode/udisplaycontext.h" #include "uassert.h" #include "cpputils.h" #include "cstring.h" +#include "putilimp.h" U_NAMESPACE_USE U_CAPI UNumberFormat* U_EXPORT2 -unum_open( UNumberFormatStyle style, +unum_open( UNumberFormatStyle style, const char16_t* pattern, int32_t patternLength, const char* locale, @@ -165,9 +167,9 @@ unum_clone(const UNumberFormat *fmt, UErrorCode *status) { if(U_FAILURE(*status)) - return 0; - - Format *res = 0; + return nullptr; + + Format* res = nullptr; const NumberFormat* nf = reinterpret_cast<const NumberFormat*>(fmt); const DecimalFormat* df = dynamic_cast<const DecimalFormat*>(nf); if (df != nullptr) { @@ -178,9 +180,9 @@ unum_clone(const UNumberFormat *fmt, res = rbnf->clone(); } - if(res == 0) { + if (res == nullptr) { *status = U_MEMORY_ALLOCATION_ERROR; - return 0; + return nullptr; } return (UNumberFormat*) res; @@ -216,13 +218,13 @@ unum_formatInt64(const UNumberFormat* fmt, } FieldPosition fp; - - if(pos != 0) + + if (pos != nullptr) fp.setField(pos->field); ((const NumberFormat*)fmt)->format(number, res, fp, *status); - if(pos != 0) { + if (pos != nullptr) { pos->beginIndex = fp.getBeginIndex(); pos->endIndex = fp.getEndIndex(); } @@ -249,13 +251,13 @@ unum_formatDouble( const UNumberFormat* fmt, } FieldPosition fp; - - if(pos != 0) + + if (pos != nullptr) fp.setField(pos->field); ((const NumberFormat*)fmt)->format(number, res, fp, *status); - - if(pos != 0) { + + if (pos != nullptr) { pos->beginIndex = fp.getBeginIndex(); pos->endIndex = fp.getEndIndex(); } @@ -309,7 +311,7 @@ unum_formatDecimal(const UNumberFormat* fmt, } FieldPosition fp; - if(pos != 0) { + if (pos != nullptr) { fp.setField(pos->field); } @@ -325,7 +327,7 @@ unum_formatDecimal(const UNumberFormat* fmt, resultStr.setTo(result, 0, resultLength); } ((const NumberFormat*)fmt)->format(numFmtbl, resultStr, fp, *status); - if(pos != 0) { + if (pos != nullptr) { pos->beginIndex = fp.getBeginIndex(); pos->endIndex = fp.getEndIndex(); } @@ -353,7 +355,7 @@ unum_formatDoubleCurrency(const UNumberFormat* fmt, } FieldPosition fp; - if (pos != 0) { + if (pos != nullptr) { fp.setField(pos->field); } CurrencyAmount *tempCurrAmnt = new CurrencyAmount(number, currency, *status); @@ -364,8 +366,8 @@ unum_formatDoubleCurrency(const UNumberFormat* fmt, } Formattable n(tempCurrAmnt); ((const NumberFormat*)fmt)->format(n, res, fp, *status); - - if (pos != 0) { + + if (pos != nullptr) { pos->beginIndex = fp.getBeginIndex(); pos->endIndex = fp.getEndIndex(); } @@ -386,18 +388,18 @@ parseRes(Formattable& res, const UnicodeString src((UBool)(textLength == -1), text, textLength); ParsePosition pp; - - if(parsePos != 0) + + if (parsePos != nullptr) pp.setIndex(*parsePos); ((const NumberFormat*)fmt)->parse(src, res, pp); if(pp.getErrorIndex() != -1) { *status = U_PARSE_ERROR; - if(parsePos != 0) { + if (parsePos != nullptr) { *parsePos = pp.getErrorIndex(); } - } else if(parsePos != 0) { + } else if (parsePos != nullptr) { *parsePos = pp.getIndex(); } } @@ -671,6 +673,7 @@ unum_getTextAttribute(const UNumberFormat* fmt, const NumberFormat* nf = reinterpret_cast<const NumberFormat*>(fmt); const DecimalFormat* df = dynamic_cast<const DecimalFormat*>(nf); + const RuleBasedNumberFormat* rbnf = nullptr; // cast is below for performance if (df != nullptr) { switch(tag) { case UNUM_POSITIVE_PREFIX: @@ -701,8 +704,7 @@ unum_getTextAttribute(const UNumberFormat* fmt, *status = U_UNSUPPORTED_ERROR; return -1; } - } else { - const RuleBasedNumberFormat* rbnf = dynamic_cast<const RuleBasedNumberFormat*>(nf); + } else if ((rbnf = dynamic_cast<const RuleBasedNumberFormat*>(nf)) != nullptr) { U_ASSERT(rbnf != nullptr); if (tag == UNUM_DEFAULT_RULESET) { res = rbnf->getDefaultRuleSetName(); @@ -716,6 +718,9 @@ unum_getTextAttribute(const UNumberFormat* fmt, *status = U_UNSUPPORTED_ERROR; return -1; } + } else { + *status = U_UNSUPPORTED_ERROR; + return -1; } return res.extract(result, resultLength, *status); @@ -794,15 +799,16 @@ unum_toPattern( const UNumberFormat* fmt, const NumberFormat* nf = reinterpret_cast<const NumberFormat*>(fmt); const DecimalFormat* df = dynamic_cast<const DecimalFormat*>(nf); + const RuleBasedNumberFormat* rbnf = nullptr; // cast is below for performance if (df != nullptr) { if(isPatternLocalized) df->toLocalizedPattern(pat); else df->toPattern(pat); + } else if ((rbnf = dynamic_cast<const RuleBasedNumberFormat*>(nf)) != nullptr) { + pat = rbnf->getRules(); } else { - const RuleBasedNumberFormat* rbnf = dynamic_cast<const RuleBasedNumberFormat*>(nf); - U_ASSERT(rbnf != nullptr); - pat = rbnf->getRules(); + // leave `pat` empty } return pat.extract(result, resultLength, *status); } @@ -917,7 +923,6 @@ unum_setContext(UNumberFormat* fmt, UDisplayContext value, UErrorCode* status) return; } ((NumberFormat*)fmt)->setContext(value, *status); - return; } U_CAPI UDisplayContext U_EXPORT2 @@ -972,12 +977,12 @@ unum_formatUFormattable(const UNumberFormat* fmt, FieldPosition fp; - if(pos != 0) + if (pos != nullptr) fp.setField(pos->field); ((const NumberFormat*)fmt)->format(*(Formattable::fromUFormattable(number)), res, fp, *status); - if(pos != 0) { + if (pos != nullptr) { pos->beginIndex = fp.getBeginIndex(); pos->endIndex = fp.getEndIndex(); } diff --git a/contrib/libs/icu/i18n/upluralrules.cpp b/contrib/libs/icu/i18n/upluralrules.cpp index 9c47312811..e6b2313f2c 100644 --- a/contrib/libs/icu/i18n/upluralrules.cpp +++ b/contrib/libs/icu/i18n/upluralrules.cpp @@ -54,7 +54,7 @@ UnicodeString select(const PluralRules &rules, const Formattable& obj, const Num } } } - return UnicodeString(); + return {}; } } // namespace diff --git a/contrib/libs/icu/i18n/uregex.cpp b/contrib/libs/icu/i18n/uregex.cpp index 2a520209fa..534310d609 100644 --- a/contrib/libs/icu/i18n/uregex.cpp +++ b/contrib/libs/icu/i18n/uregex.cpp @@ -1204,11 +1204,11 @@ uregex_replaceAllUText(URegularExpression *regexp2, UErrorCode *status) { RegularExpression *regexp = (RegularExpression*)regexp2; if (validateRE(regexp, true, status) == false) { - return 0; + return nullptr; } if (replacementText == nullptr) { *status = U_ILLEGAL_ARGUMENT_ERROR; - return 0; + return nullptr; } dest = regexp->fMatcher->replaceAll(replacementText, dest, *status); @@ -1265,11 +1265,11 @@ uregex_replaceFirstUText(URegularExpression *regexp2, UErrorCode *status) { RegularExpression *regexp = (RegularExpression*)regexp2; if (validateRE(regexp, true, status) == false) { - return 0; + return nullptr; } if (replacementText == nullptr) { *status = U_ILLEGAL_ARGUMENT_ERROR; - return 0; + return nullptr; } dest = regexp->fMatcher->replaceFirst(replacementText, dest, *status); diff --git a/contrib/libs/icu/i18n/usearch.cpp b/contrib/libs/icu/i18n/usearch.cpp index 6d9b60cef7..cc92b1ccaa 100644 --- a/contrib/libs/icu/i18n/usearch.cpp +++ b/contrib/libs/icu/i18n/usearch.cpp @@ -1905,7 +1905,7 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch *strsrch, // 1. The match extended to the last CE from the target text, which is OK, or // 2. The last CE that was part of the match is in an expansion that extends // to the first CE after the match. In this case, we reject the match. - const CEI *nextCEI = 0; + const CEI* nextCEI = nullptr; if (strsrch->search->elementComparisonType == 0) { nextCEI = ceb.get(targetIx + targetIxOffset); maxLimit = nextCEI->lowIndex; diff --git a/contrib/libs/icu/i18n/uspoof.cpp b/contrib/libs/icu/i18n/uspoof.cpp index 271caeafff..51cf99564b 100644 --- a/contrib/libs/icu/i18n/uspoof.cpp +++ b/contrib/libs/icu/i18n/uspoof.cpp @@ -15,6 +15,7 @@ * * Unicode Spoof Detection */ +#include "unicode/ubidi.h" #include "unicode/utypes.h" #include "unicode/normalizer2.h" #include "unicode/uspoof.h" @@ -57,99 +58,26 @@ uspoof_cleanup() { } void U_CALLCONV initializeStatics(UErrorCode &status) { - static const char16_t *inclusionPat = - u"['\\-.\\:\\u00B7\\u0375\\u058A\\u05F3\\u05F4\\u06FD\\u06FE\\u0F0B\\u2010" - u"\\u2019\\u2027\\u30A0\\u30FB]"; - gInclusionSet = new UnicodeSet(UnicodeString(inclusionPat), status); - if (gInclusionSet == nullptr) { + gInclusionSet = new UnicodeSet(); + gRecommendedSet = new UnicodeSet(); + if (gInclusionSet == nullptr || gRecommendedSet == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; + delete gInclusionSet; + gInclusionSet = nullptr; + delete gRecommendedSet; + gRecommendedSet = nullptr; return; } - gInclusionSet->freeze(); - - // Note: data from IdentifierStatus.txt & IdentifierType.txt - // There is tooling to generate this constant in the unicodetools project: - // org.unicode.text.tools.RecommendedSetGenerator - // It will print the Java and C++ code to the console for easy copy-paste into this file. - static const char16_t *recommendedPat = - u"[0-9A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u0131\\u0134-\\u013E" - u"\\u0141-\\u0148\\u014A-\\u017E\\u018F\\u01A0\\u01A1\\u01AF\\u01B0\\u01CD-" - u"\\u01DC\\u01DE-\\u01E3\\u01E6-\\u01F0\\u01F4\\u01F5\\u01F8-\\u021B\\u021E" - u"\\u021F\\u0226-\\u0233\\u0259\\u02BB\\u02BC\\u02EC\\u0300-\\u0304\\u0306-" - u"\\u030C\\u030F-\\u0311\\u0313\\u0314\\u031B\\u0323-\\u0328\\u032D\\u032E" - u"\\u0330\\u0331\\u0335\\u0338\\u0339\\u0342\\u0345\\u037B-\\u037D\\u0386" - u"\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03CE\\u03FC-\\u045F\\u048A-" - u"\\u04FF\\u0510-\\u0529\\u052E\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0586" - u"\\u05B4\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u063F\\u0641-\\u0655\\u0660-" - u"\\u0669\\u0670-\\u0672\\u0674\\u0679-\\u068D\\u068F-\\u06A0\\u06A2-\\u06D3" - u"\\u06D5\\u06E5\\u06E6\\u06EE-\\u06FC\\u06FF\\u0750-\\u07B1\\u0870-\\u0887" - u"\\u0889-\\u088E\\u08A0-\\u08AC\\u08B2\\u08B5-\\u08C9\\u0901-\\u094D\\u094F" - u"\\u0950\\u0956\\u0957\\u0960-\\u0963\\u0966-\\u096F\\u0971-\\u0977\\u0979-" - u"\\u097F\\u0981-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-" - u"\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE" - u"\\u09D7\\u09E0-\\u09E3\\u09E6-\\u09F1\\u09FE\\u0A01-\\u0A03\\u0A05-\\u0A0A" - u"\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A35\\u0A38\\u0A39" - u"\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A5C\\u0A66-\\u0A74" - u"\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0" - u"\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD" - u"\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B05-" - u"\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-" - u"\\u0B39\\u0B3C-\\u0B43\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B55-\\u0B57\\u0B5F-" - u"\\u0B61\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90" - u"\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-" - u"\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0" - u"\\u0BD7\\u0BE6-\\u0BEF\\u0C01-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-" - u"\\u0C33\\u0C35-\\u0C39\\u0C3C-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55" - u"\\u0C56\\u0C5D\\u0C60\\u0C61\\u0C66-\\u0C6F\\u0C80\\u0C82\\u0C83\\u0C85-" - u"\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-" - u"\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDD\\u0CE0-\\u0CE3" - u"\\u0CE6-\\u0CEF\\u0CF1-\\u0CF3\\u0D00\\u0D02\\u0D03\\u0D05-\\u0D0C\\u0D0E-" - u"\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D43\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D54-" - u"\\u0D57\\u0D60\\u0D61\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-" - u"\\u0D8E\\u0D91-\\u0D96\\u0D9A-\\u0DA5\\u0DA7-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD" - u"\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDE\\u0DF2\\u0E01-" - u"\\u0E32\\u0E34-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84" - u"\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB2\\u0EB4-\\u0EBD\\u0EC0-" - u"\\u0EC4\\u0EC6\\u0EC8-\\u0ECE\\u0ED0-\\u0ED9\\u0EDE\\u0EDF\\u0F00\\u0F20-" - u"\\u0F29\\u0F35\\u0F37\\u0F3E-\\u0F42\\u0F44-\\u0F47\\u0F49-\\u0F4C\\u0F4E-" - u"\\u0F51\\u0F53-\\u0F56\\u0F58-\\u0F5B\\u0F5D-\\u0F68\\u0F6A-\\u0F6C\\u0F71" - u"\\u0F72\\u0F74\\u0F7A-\\u0F80\\u0F82-\\u0F84\\u0F86-\\u0F92\\u0F94-\\u0F97" - u"\\u0F99-\\u0F9C\\u0F9E-\\u0FA1\\u0FA3-\\u0FA6\\u0FA8-\\u0FAB\\u0FAD-\\u0FB8" - u"\\u0FBA-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10C7\\u10CD\\u10D0-" - u"\\u10F0\\u10F7-\\u10FA\\u10FD-\\u10FF\\u1200-\\u1248\\u124A-\\u124D\\u1250-" - u"\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0" - u"\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-" - u"\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u1780-" - u"\\u17A2\\u17A5-\\u17A7\\u17A9-\\u17B3\\u17B6-\\u17CD\\u17D0\\u17D2\\u17D7" - u"\\u17DC\\u17E0-\\u17E9\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1E00-\\u1E99\\u1E9E" - u"\\u1EA0-\\u1EF9\\u1F00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D" - u"\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F70\\u1F72\\u1F74\\u1F76" - u"\\u1F78\\u1F7A\\u1F7C\\u1F80-\\u1FB4\\u1FB6-\\u1FBA\\u1FBC\\u1FC2-\\u1FC4" - u"\\u1FC6-\\u1FC8\\u1FCA\\u1FCC\\u1FD0-\\u1FD2\\u1FD6-\\u1FDA\\u1FE0-\\u1FE2" - u"\\u1FE4-\\u1FEA\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FF8\\u1FFA\\u1FFC\\u2D27" - u"\\u2D2D\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-" - u"\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005-" - u"\\u3007\\u3041-\\u3096\\u3099\\u309A\\u309D\\u309E\\u30A1-\\u30FA\\u30FC-" - u"\\u30FE\\u3105-\\u312D\\u312F\\u31A0-\\u31BF\\u3400-\\u4DBF\\u4E00-\\u9FFF" - u"\\uA67F\\uA717-\\uA71F\\uA788\\uA78D\\uA792\\uA793\\uA7AA\\uA7C0-\\uA7CA" - u"\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7D9\\uA9E7-\\uA9FE\\uAA60-\\uAA76\\uAA7A-" - u"\\uAA7F\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-" - u"\\uAB2E\\uAB66\\uAB67\\uAC00-\\uD7A3\\uFA0E\\uFA0F\\uFA11\\uFA13\\uFA14" - u"\\uFA1F\\uFA21\\uFA23\\uFA24\\uFA27-\\uFA29\\U00011301\\U00011303" - u"\\U0001133B\\U0001133C\\U00016FF0\\U00016FF1\\U0001B11F-\\U0001B122" - u"\\U0001B132\\U0001B150-\\U0001B152\\U0001B155\\U0001B164-\\U0001B167" - u"\\U0001DF00-\\U0001DF1E\\U0001DF25-\\U0001DF2A\\U0001E08F\\U0001E7E0-" - u"\\U0001E7E6\\U0001E7E8-\\U0001E7EB\\U0001E7ED\\U0001E7EE\\U0001E7F0-" - u"\\U0001E7FE\\U00020000-\\U0002A6DF\\U0002A700-\\U0002B739\\U0002B740-" - u"\\U0002B81D\\U0002B820-\\U0002CEA1\\U0002CEB0-\\U0002EBE0\\U00030000-" - u"\\U0003134A\\U00031350-\\U000323AF]"; - - gRecommendedSet = new UnicodeSet(UnicodeString(recommendedPat), status); - if (gRecommendedSet == nullptr) { - status = U_MEMORY_ALLOCATION_ERROR; + gInclusionSet->applyIntPropertyValue(UCHAR_IDENTIFIER_TYPE, U_ID_TYPE_INCLUSION, status); + gRecommendedSet->applyIntPropertyValue(UCHAR_IDENTIFIER_TYPE, U_ID_TYPE_RECOMMENDED, status); + if (U_FAILURE(status)) { delete gInclusionSet; + gInclusionSet = nullptr; + delete gRecommendedSet; + gRecommendedSet = nullptr; return; } + gInclusionSet->freeze(); gRecommendedSet->freeze(); gNfdNormalizer = Normalizer2::getNFDInstance(status); ucln_i18n_registerCleanup(UCLN_I18N_SPOOF, uspoof_cleanup); @@ -538,6 +466,90 @@ uspoof_areConfusableUnicodeString(const USpoofChecker *sc, return result; } +U_CAPI uint32_t U_EXPORT2 uspoof_areBidiConfusable(const USpoofChecker *sc, UBiDiDirection direction, + const char16_t *id1, int32_t length1, + const char16_t *id2, int32_t length2, + UErrorCode *status) { + UnicodeString id1Str((length1 == -1), id1, length1); // Aliasing constructor + UnicodeString id2Str((length2 == -1), id2, length2); // Aliasing constructor + if (id1Str.isBogus() || id2Str.isBogus()) { + *status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + return uspoof_areBidiConfusableUnicodeString(sc, direction, id1Str, id2Str, status); +} + +U_CAPI uint32_t U_EXPORT2 uspoof_areBidiConfusableUTF8(const USpoofChecker *sc, UBiDiDirection direction, + const char *id1, int32_t length1, const char *id2, + int32_t length2, UErrorCode *status) { + if (length1 < -1 || length2 < -1) { + *status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + UnicodeString id1Str = UnicodeString::fromUTF8( + StringPiece(id1, length1 >= 0 ? length1 : static_cast<int32_t>(uprv_strlen(id1)))); + UnicodeString id2Str = UnicodeString::fromUTF8( + StringPiece(id2, length2 >= 0 ? length2 : static_cast<int32_t>(uprv_strlen(id2)))); + return uspoof_areBidiConfusableUnicodeString(sc, direction, id1Str, id2Str, status); +} + +U_CAPI uint32_t U_EXPORT2 uspoof_areBidiConfusableUnicodeString(const USpoofChecker *sc, + UBiDiDirection direction, + const icu::UnicodeString &id1, + const icu::UnicodeString &id2, + UErrorCode *status) { + const SpoofImpl *This = SpoofImpl::validateThis(sc, *status); + if (U_FAILURE(*status)) { + return 0; + } + // + // See section 4 of UTS 39 for the algorithm for checking whether two strings are confusable, + // and for definitions of the types (single, whole, mixed-script) of confusables. + + // We only care about a few of the check flags. Ignore the others. + // If no tests relevant to this function have been specified, return an error. + // TODO: is this really the right thing to do? It's probably an error on the caller's part, + // but logically we would just return 0 (no error). + if ((This->fChecks & USPOOF_CONFUSABLE) == 0) { + *status = U_INVALID_STATE_ERROR; + return 0; + } + + // Compute the skeletons and check for confusability. + UnicodeString id1Skeleton; + uspoof_getBidiSkeletonUnicodeString(sc, direction, id1, id1Skeleton, status); + UnicodeString id2Skeleton; + uspoof_getBidiSkeletonUnicodeString(sc, direction, id2, id2Skeleton, status); + if (U_FAILURE(*status)) { + return 0; + } + if (id1Skeleton != id2Skeleton) { + return 0; + } + + // If we get here, the strings are confusable. Now we just need to set the flags for the appropriate + // classes of confusables according to UTS 39 section 4. Start by computing the resolved script sets + // of id1 and id2. + ScriptSet id1RSS; + This->getResolvedScriptSet(id1, id1RSS, *status); + ScriptSet id2RSS; + This->getResolvedScriptSet(id2, id2RSS, *status); + + // Turn on all applicable flags + uint32_t result = 0; + if (id1RSS.intersects(id2RSS)) { + result |= USPOOF_SINGLE_SCRIPT_CONFUSABLE; + } else { + result |= USPOOF_MIXED_SCRIPT_CONFUSABLE; + if (!id1RSS.isEmpty() && !id2RSS.isEmpty()) { + result |= USPOOF_WHOLE_SCRIPT_CONFUSABLE; + } + } + + // Turn off flags that the user doesn't want + return result & This->fChecks; +} + U_CAPI int32_t U_EXPORT2 uspoof_checkUnicodeString(const USpoofChecker *sc, @@ -697,6 +709,60 @@ uspoof_getSkeleton(const USpoofChecker *sc, return destStr.length(); } +U_CAPI int32_t U_EXPORT2 uspoof_getBidiSkeleton(const USpoofChecker *sc, UBiDiDirection direction, + const UChar *id, int32_t length, UChar *dest, + int32_t destCapacity, UErrorCode *status) { + UnicodeString idStr((length == -1), id, length); // Aliasing constructor + if (idStr.isBogus()) { + *status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + UnicodeString destStr; + uspoof_getBidiSkeletonUnicodeString(sc, direction, idStr, destStr, status); + return destStr.extract(dest, destCapacity, *status); +} + + + +U_I18N_API UnicodeString &U_EXPORT2 uspoof_getBidiSkeletonUnicodeString(const USpoofChecker *sc, + UBiDiDirection direction, + const UnicodeString &id, + UnicodeString &dest, + UErrorCode *status) { + dest.remove(); + if (direction != UBIDI_LTR && direction != UBIDI_RTL) { + *status = U_ILLEGAL_ARGUMENT_ERROR; + return dest; + } + UBiDi *bidi = ubidi_open(); + ubidi_setPara(bidi, id.getBuffer(), id.length(), direction, + /*embeddingLevels*/ nullptr, status); + if (U_FAILURE(*status)) { + ubidi_close(bidi); + return dest; + } + UnicodeString reordered; + int32_t const size = ubidi_getProcessedLength(bidi); + UChar* const reorderedBuffer = reordered.getBuffer(size); + if (reorderedBuffer == nullptr) { + *status = U_MEMORY_ALLOCATION_ERROR; + ubidi_close(bidi); + return dest; + } + ubidi_writeReordered(bidi, reorderedBuffer, size, + UBIDI_KEEP_BASE_COMBINING | UBIDI_DO_MIRRORING, status); + reordered.releaseBuffer(size); + ubidi_close(bidi); + + if (U_FAILURE(*status)) { + return dest; + } + + // The type parameter is deprecated since ICU 58; any number may be passed. + constexpr uint32_t deprecatedType = 58; + return uspoof_getSkeletonUnicodeString(sc, deprecatedType, reordered, dest, status); +} + U_I18N_API UnicodeString & U_EXPORT2 @@ -721,19 +787,17 @@ uspoof_getSkeletonUnicodeString(const USpoofChecker *sc, for (inputIndex=0; inputIndex < normalizedLen; ) { UChar32 c = nfdId.char32At(inputIndex); inputIndex += U16_LENGTH(c); - This->fSpoofData->confusableLookup(c, skelStr); + if (!u_hasBinaryProperty(c, UCHAR_DEFAULT_IGNORABLE_CODE_POINT)) { + This->fSpoofData->confusableLookup(c, skelStr); + } } gNfdNormalizer->normalize(skelStr, dest, *status); return dest; } - -U_CAPI int32_t U_EXPORT2 -uspoof_getSkeletonUTF8(const USpoofChecker *sc, - uint32_t type, - const char *id, int32_t length, - char *dest, int32_t destCapacity, +U_CAPI int32_t U_EXPORT2 uspoof_getSkeletonUTF8(const USpoofChecker *sc, uint32_t type, const char *id, + int32_t length, char *dest, int32_t destCapacity, UErrorCode *status) { SpoofImpl::validateThis(sc, *status); if (U_FAILURE(*status)) { @@ -744,7 +808,8 @@ uspoof_getSkeletonUTF8(const USpoofChecker *sc, return 0; } - UnicodeString srcStr = UnicodeString::fromUTF8(StringPiece(id, length>=0 ? length : static_cast<int32_t>(uprv_strlen(id)))); + UnicodeString srcStr = UnicodeString::fromUTF8( + StringPiece(id, length >= 0 ? length : static_cast<int32_t>(uprv_strlen(id)))); UnicodeString destStr; uspoof_getSkeletonUnicodeString(sc, type, srcStr, destStr, status); if (U_FAILURE(*status)) { @@ -752,8 +817,28 @@ uspoof_getSkeletonUTF8(const USpoofChecker *sc, } int32_t lengthInUTF8 = 0; - u_strToUTF8(dest, destCapacity, &lengthInUTF8, - destStr.getBuffer(), destStr.length(), status); + u_strToUTF8(dest, destCapacity, &lengthInUTF8, destStr.getBuffer(), destStr.length(), status); + return lengthInUTF8; +} + +U_CAPI int32_t U_EXPORT2 uspoof_getBidiSkeletonUTF8(const USpoofChecker *sc, UBiDiDirection direction, + const char *id, int32_t length, char *dest, + int32_t destCapacity, UErrorCode *status) { + if (length < -1) { + *status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + + UnicodeString srcStr = UnicodeString::fromUTF8( + StringPiece(id, length >= 0 ? length : static_cast<int32_t>(uprv_strlen(id)))); + UnicodeString destStr; + uspoof_getBidiSkeletonUnicodeString(sc, direction, srcStr, destStr, status); + if (U_FAILURE(*status)) { + return 0; + } + + int32_t lengthInUTF8 = 0; + u_strToUTF8(dest, destCapacity, &lengthInUTF8, destStr.getBuffer(), destStr.length(), status); return lengthInUTF8; } diff --git a/contrib/libs/icu/i18n/uspoof_conf.cpp b/contrib/libs/icu/i18n/uspoof_conf.cpp index 42dba1c037..dbbf627286 100644 --- a/contrib/libs/icu/i18n/uspoof_conf.cpp +++ b/contrib/libs/icu/i18n/uspoof_conf.cpp @@ -393,7 +393,6 @@ void ConfusabledataBuilder::build(const char * confusables, int32_t confusablesL // All of the intermediate allocated data belongs to the ConfusabledataBuilder // object (this), and is deleted in the destructor. - return; } // diff --git a/contrib/libs/icu/i18n/uspoof_impl.cpp b/contrib/libs/icu/i18n/uspoof_impl.cpp index 7a6084a109..93402e670b 100644 --- a/contrib/libs/icu/i18n/uspoof_impl.cpp +++ b/contrib/libs/icu/i18n/uspoof_impl.cpp @@ -108,7 +108,7 @@ USpoofChecker *SpoofImpl::asUSpoofChecker() { // received from the C API. // const SpoofImpl *SpoofImpl::validateThis(const USpoofChecker *sc, UErrorCode &status) { - auto* This = validate(sc, status); + const auto* This = validate(sc, status); if (U_FAILURE(status)) { return nullptr; } diff --git a/contrib/libs/icu/i18n/utrans.cpp b/contrib/libs/icu/i18n/utrans.cpp index 390335f334..1e4970c3db 100644 --- a/contrib/libs/icu/i18n/utrans.cpp +++ b/contrib/libs/icu/i18n/utrans.cpp @@ -323,7 +323,7 @@ utrans_enum_unext(UEnumeration *uenum, int32_t* resultLength, UErrorCode *pErrorCode) { if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) { - return 0; + return nullptr; } UTransEnumeration *ute=(UTransEnumeration *)uenum; @@ -405,7 +405,7 @@ utrans_trans(const UTransliterator* trans, utrans_ENTRY(status); - if (trans == 0 || rep == 0 || repFunc == 0 || limit == 0) { + if (trans == nullptr || rep == nullptr || repFunc == nullptr || limit == nullptr) { *status = U_ILLEGAL_ARGUMENT_ERROR; return; } @@ -424,7 +424,7 @@ utrans_transIncremental(const UTransliterator* trans, utrans_ENTRY(status); - if (trans == 0 || rep == 0 || repFunc == 0 || pos == 0) { + if (trans == nullptr || rep == nullptr || repFunc == nullptr || pos == nullptr) { *status = U_ILLEGAL_ARGUMENT_ERROR; return; } @@ -445,7 +445,7 @@ utrans_transUChars(const UTransliterator* trans, utrans_ENTRY(status); - if (trans == 0 || text == 0 || limit == 0) { + if (trans == nullptr || text == nullptr || limit == nullptr) { *status = U_ILLEGAL_ARGUMENT_ERROR; return; } @@ -475,7 +475,7 @@ utrans_transIncrementalUChars(const UTransliterator* trans, utrans_ENTRY(status); - if (trans == 0 || text == 0 || pos == 0) { + if (trans == nullptr || text == nullptr || pos == nullptr) { *status = U_ILLEGAL_ARGUMENT_ERROR; return; } diff --git a/contrib/libs/icu/i18n/vtzone.cpp b/contrib/libs/icu/i18n/vtzone.cpp index 25af556aa2..31ad09c721 100644 --- a/contrib/libs/icu/i18n/vtzone.cpp +++ b/contrib/libs/icu/i18n/vtzone.cpp @@ -985,12 +985,8 @@ VTimeZone::VTimeZone(const VTimeZone& source) } VTimeZone::~VTimeZone() { - if (tz != nullptr) { - delete tz; - } - if (vtzlines != nullptr) { - delete vtzlines; - } + delete tz; + delete vtzlines; } VTimeZone& @@ -2132,12 +2128,8 @@ VTimeZone::writeZone(VTZWriter& w, BasicTimeZone& basictz, cleanupWriteZone: - if (finalStdRule != nullptr) { - delete finalStdRule; - } - if (finalDstRule != nullptr) { - delete finalDstRule; - } + delete finalStdRule; + delete finalDstRule; } void diff --git a/contrib/libs/icu/i18n/vzone.cpp b/contrib/libs/icu/i18n/vzone.cpp index 5517e5144c..50935618ed 100644 --- a/contrib/libs/icu/i18n/vzone.cpp +++ b/contrib/libs/icu/i18n/vzone.cpp @@ -87,8 +87,6 @@ vzone_write(VZone* zone, char16_t* & result, int32_t & resultLength, UErrorCode& resultLength = s.length(); result = (char16_t*)uprv_malloc(resultLength); memcpy(result,s.getBuffer(),resultLength); - - return; } U_CAPI void U_EXPORT2 @@ -99,8 +97,6 @@ vzone_writeFromStart(VZone* zone, UDate start, char16_t* & result, int32_t & res resultLength = s.length(); result = (char16_t*)uprv_malloc(resultLength); memcpy(result,s.getBuffer(),resultLength); - - return; } U_CAPI void U_EXPORT2 @@ -111,8 +107,6 @@ vzone_writeSimple(VZone* zone, UDate time, char16_t* & result, int32_t & resultL resultLength = s.length(); result = (char16_t*)uprv_malloc(resultLength); memcpy(result,s.getBuffer(),resultLength); - - return; } U_CAPI int32_t U_EXPORT2 diff --git a/contrib/libs/icu/i18n/windtfmt.cpp b/contrib/libs/icu/i18n/windtfmt.cpp index 2118f92dce..0241ec3b44 100644 --- a/contrib/libs/icu/i18n/windtfmt.cpp +++ b/contrib/libs/icu/i18n/windtfmt.cpp @@ -30,7 +30,9 @@ #include "unicode/timezone.h" #include "unicode/utmscale.h" +#include "charstr.h" #include "cmemory.h" +#include "ulocimp.h" #include "uresimp.h" #include "windtfmt.h" #include "wintzimpl.h" @@ -99,10 +101,9 @@ UnicodeString* Win32DateFormat::getTimeDateFormat(const Calendar *cal, const Loc static UErrorCode GetEquivalentWindowsLocaleName(const Locale& locale, UnicodeString** buffer) { UErrorCode status = U_ZERO_ERROR; - char asciiBCP47Tag[LOCALE_NAME_MAX_LENGTH] = {}; // Convert from names like "en_CA" and "de_DE@collation=phonebook" to "en-CA" and "de-DE-u-co-phonebk". - (void)uloc_toLanguageTag(locale.getName(), asciiBCP47Tag, UPRV_LENGTHOF(asciiBCP47Tag), false, &status); + CharString asciiBCP47Tag = ulocimp_toLanguageTag(locale.getName(), false, status); if (U_SUCCESS(status)) { @@ -406,4 +407,3 @@ U_NAMESPACE_END #endif /* #if !UCONFIG_NO_FORMATTING */ #endif // U_PLATFORM_USES_ONLY_WIN32_API - diff --git a/contrib/libs/icu/i18n/winnmfmt.cpp b/contrib/libs/icu/i18n/winnmfmt.cpp index 6efa9a63d8..a23e3eb8c5 100644 --- a/contrib/libs/icu/i18n/winnmfmt.cpp +++ b/contrib/libs/icu/i18n/winnmfmt.cpp @@ -24,8 +24,10 @@ #include "unicode/locid.h" #include "unicode/ustring.h" +#include "charstr.h" #include "cmemory.h" #include "uassert.h" +#include "ulocimp.h" #include "locmap.h" #ifndef WIN32_LEAN_AND_MEAN @@ -144,10 +146,9 @@ static void freeCurrencyFormat(CURRENCYFMTW *fmt) static UErrorCode GetEquivalentWindowsLocaleName(const Locale& locale, UnicodeString** buffer) { UErrorCode status = U_ZERO_ERROR; - char asciiBCP47Tag[LOCALE_NAME_MAX_LENGTH] = {}; // Convert from names like "en_CA" and "de_DE@collation=phonebook" to "en-CA" and "de-DE-u-co-phonebk". - (void) uloc_toLanguageTag(locale.getName(), asciiBCP47Tag, UPRV_LENGTHOF(asciiBCP47Tag), false, &status); + CharString asciiBCP47Tag = ulocimp_toLanguageTag(locale.getName(), false, status); if (U_SUCCESS(status)) { diff --git a/contrib/libs/icu/i18n/zonemeta.cpp b/contrib/libs/icu/i18n/zonemeta.cpp index 42051e2f41..78d2391479 100644 --- a/contrib/libs/icu/i18n/zonemeta.cpp +++ b/contrib/libs/icu/i18n/zonemeta.cpp @@ -120,6 +120,7 @@ static const char gKeyTypeData[] = "keyTypeData"; static const char gTypeAliasTag[] = "typeAlias"; static const char gTypeMapTag[] = "typeMap"; static const char gTimezoneTag[] = "timezone"; +static const char gIanaMapTag[] = "ianaMap"; static const char gPrimaryZonesTag[] = "primaryZones"; @@ -389,6 +390,35 @@ ZoneMeta::getCanonicalCLDRID(const TimeZone& tz) { return getCanonicalCLDRID(tz.getID(tzID), status); } +UnicodeString& U_EXPORT2 +ZoneMeta::getIanaID(const UnicodeString& tzid, UnicodeString& ianaID, UErrorCode& status) { + // First, get CLDR canonical ID + const char16_t *canonicalID = getCanonicalCLDRID(tzid, status); + if (U_FAILURE(status) || canonicalID == nullptr) { + ianaID.setToBogus(); + return ianaID; + } + // Find IANA mapping if any. + UErrorCode tmpStatus = U_ZERO_ERROR; + UnicodeString tmpKey(canonicalID); + tmpKey.findAndReplace(UnicodeString("/"), UnicodeString(":")); + char keyBuf[ZID_KEY_MAX + 1]; + /* int32_t keyLen = */ tmpKey.extract(0, tmpKey.length(), keyBuf, sizeof(keyBuf), US_INV); + + StackUResourceBundle r; + ures_openDirectFillIn(r.getAlias(), nullptr, gKeyTypeData, &tmpStatus); + ures_getByKey(r.getAlias(), gIanaMapTag, r.getAlias(), &tmpStatus); + ures_getByKey(r.getAlias(), gTimezoneTag, r.getAlias(), &tmpStatus); + int32_t tmpLen = 0; + const char16_t* tmpIana = ures_getStringByKey(r.getAlias(), keyBuf, &tmpLen, &tmpStatus); + if (U_SUCCESS(tmpStatus)) { + ianaID.setTo(true, tmpIana, -1); + } else { + ianaID.setTo(true, canonicalID, -1); + } + return ianaID; +} + static void U_CALLCONV countryInfoVectorsInit(UErrorCode &status) { // Create empty vectors // No deleters for these UVectors, it's a reference to a resource bundle string. diff --git a/contrib/libs/icu/i18n/zonemeta.h b/contrib/libs/icu/i18n/zonemeta.h index 8c5840c265..dec0a65c3c 100644 --- a/contrib/libs/icu/i18n/zonemeta.h +++ b/contrib/libs/icu/i18n/zonemeta.h @@ -55,6 +55,17 @@ public: static const char16_t* U_EXPORT2 getCanonicalCLDRID(const TimeZone& tz); /** + * Returns primary IANA zone ID for the input zone ID, which might be the id itself. + * If the given system tzid is not known, U_ILLEGAL_ARGUMENT_ERROR is set in the status. + * + * @param tzid Zone ID + * @param ianaID Output IANA ID + * @param status Receives the status + * @return A primary IANA zone ID equivalent to the input zone ID. + */ + static UnicodeString& U_EXPORT2 getIanaID(const UnicodeString& tzid, UnicodeString& ianaID, UErrorCode& status); + + /** * Return the canonical country code for this tzid. If we have none, or if the time zone * is not associated with a country, return bogus string. * @param tzid Zone ID diff --git a/contrib/libs/icu/i18n/zrule.cpp b/contrib/libs/icu/i18n/zrule.cpp index 1ba0c9705e..39f6eeedfd 100644 --- a/contrib/libs/icu/i18n/zrule.cpp +++ b/contrib/libs/icu/i18n/zrule.cpp @@ -45,7 +45,6 @@ zrule_getName(ZRule* rule, char16_t* name, int32_t nameLength) { s = ((TimeZoneRule*)rule)->TimeZoneRule::getName(s); nameLength = s.length(); memcpy(name, s.getBuffer(), nameLength); - return; } U_CAPI int32_t U_EXPORT2 @@ -96,7 +95,6 @@ izrule_getName(IZRule* rule, char16_t* & name, int32_t & nameLength) { nameLength = s.length(); name = (char16_t*)uprv_malloc(nameLength); memcpy(name, s.getBuffer(), nameLength); - return; } U_CAPI int32_t U_EXPORT2 diff --git a/contrib/libs/icu/icudt73_dat.rodata b/contrib/libs/icu/icudt75_dat.rodata Binary files differindex 3fe621b7ed..972a755804 100644 --- a/contrib/libs/icu/icudt73_dat.rodata +++ b/contrib/libs/icu/icudt75_dat.rodata diff --git a/contrib/libs/icu/include/unicode/brkiter.h b/contrib/libs/icu/include/unicode/brkiter.h index 108652799e..bd96629285 100644 --- a/contrib/libs/icu/include/unicode/brkiter.h +++ b/contrib/libs/icu/include/unicode/brkiter.h @@ -146,14 +146,13 @@ public: * will return distinct unequal values. * @stable ICU 2.0 */ - virtual UClassID getDynamicClassID(void) const override = 0; + virtual UClassID getDynamicClassID() const override = 0; /** * Return a CharacterIterator over the text being analyzed. * @stable ICU 2.0 */ - virtual CharacterIterator& getText(void) const = 0; - + virtual CharacterIterator& getText() const = 0; /** * Get a UText for the text being analyzed. @@ -228,14 +227,14 @@ public: * @return The offset of the beginning of the text, zero. * @stable ICU 2.0 */ - virtual int32_t first(void) = 0; + virtual int32_t first() = 0; /** * Set the iterator position to the index immediately BEYOND the last character in the text being scanned. * @return The index immediately BEYOND the last character in the text being scanned. * @stable ICU 2.0 */ - virtual int32_t last(void) = 0; + virtual int32_t last() = 0; /** * Set the iterator position to the boundary preceding the current boundary. @@ -243,7 +242,7 @@ public: * boundaries have been returned. * @stable ICU 2.0 */ - virtual int32_t previous(void) = 0; + virtual int32_t previous() = 0; /** * Advance the iterator to the boundary following the current boundary. @@ -251,14 +250,14 @@ public: * boundaries have been returned. * @stable ICU 2.0 */ - virtual int32_t next(void) = 0; + virtual int32_t next() = 0; /** * Return character index of the current iterator position within the text. * @return The boundary most recently returned. * @stable ICU 2.0 */ - virtual int32_t current(void) const = 0; + virtual int32_t current() const = 0; /** * Advance the iterator to the first boundary following the specified offset. @@ -530,7 +529,7 @@ public: * must be closed by an explicit call to the destructor (not delete). * @deprecated ICU 52. Always delete the BreakIterator. */ - inline UBool isBufferClone(void); + inline UBool isBufferClone(); #endif /* U_HIDE_DEPRECATED_API */ @@ -575,7 +574,7 @@ public: * @return a StringEnumeration over the locales available at the time of the call * @stable ICU 2.4 */ - static StringEnumeration* U_EXPORT2 getAvailableLocales(void); + static StringEnumeration* U_EXPORT2 getAvailableLocales(); #endif /** @@ -649,6 +648,7 @@ private: /** @internal (private) */ char actualLocale[ULOC_FULLNAME_CAPACITY]; char validLocale[ULOC_FULLNAME_CAPACITY]; + char requestLocale[ULOC_FULLNAME_CAPACITY]; }; #ifndef U_HIDE_DEPRECATED_API diff --git a/contrib/libs/icu/include/unicode/calendar.h b/contrib/libs/icu/include/unicode/calendar.h index aa83866ac9..fbe501c9d1 100644 --- a/contrib/libs/icu/include/unicode/calendar.h +++ b/contrib/libs/icu/include/unicode/calendar.h @@ -413,7 +413,7 @@ public: * @return The current UTC time in milliseconds. * @stable ICU 2.0 */ - static UDate U_EXPORT2 getNow(void); + static UDate U_EXPORT2 getNow(); /** * Gets this Calendar's time as milliseconds. May involve recalculation of time due @@ -850,7 +850,7 @@ public: * @return The time zone object associated with this calendar. * @stable ICU 2.0 */ - const TimeZone& getTimeZone(void) const; + const TimeZone& getTimeZone() const; /** * Returns the time zone owned by this calendar. The caller owns the returned object @@ -860,7 +860,7 @@ public: * @return The time zone object which was associated with this calendar. * @stable ICU 2.0 */ - TimeZone* orphanTimeZone(void); + TimeZone* orphanTimeZone(); /** * Queries if the current date for this Calendar is in Daylight Savings Time. @@ -892,7 +892,7 @@ public: * @return True tells that date/time interpretation is to be lenient. * @stable ICU 2.0 */ - UBool isLenient(void) const; + UBool isLenient() const; /** * Sets the behavior for handling wall time repeating multiple times @@ -925,7 +925,7 @@ public: * @see #setRepeatedWallTimeOption * @stable ICU 49 */ - UCalendarWallTimeOption getRepeatedWallTimeOption(void) const; + UCalendarWallTimeOption getRepeatedWallTimeOption() const; /** * Sets the behavior for handling skipped wall time at positive time zone offset @@ -960,7 +960,7 @@ public: * @see #setSkippedWallTimeOption * @stable ICU 49 */ - UCalendarWallTimeOption getSkippedWallTimeOption(void) const; + UCalendarWallTimeOption getSkippedWallTimeOption() const; /** * Sets what the first day of the week is; e.g., Sunday in US, Monday in France. @@ -977,7 +977,7 @@ public: * @return The first day of the week. * @deprecated ICU 2.6 use the overload with error code */ - EDaysOfWeek getFirstDayOfWeek(void) const; + EDaysOfWeek getFirstDayOfWeek() const; #endif /* U_HIDE_DEPRECATED_API */ /** @@ -1009,7 +1009,7 @@ public: * @return The minimal days required in the first week of the year. * @stable ICU 2.0 */ - uint8_t getMinimalDaysInFirstWeek(void) const; + uint8_t getMinimalDaysInFirstWeek() const; #ifndef U_FORCE_HIDE_DEPRECATED_API /** @@ -1232,12 +1232,13 @@ public: * resolving of time into time fields. * @stable ICU 2.0 */ - void clear(void); + void clear(); /** * Clears the value in the given time field, both making it unset and assigning it a * value of zero. This field value will be determined during the next resolving of - * time into time fields. + * time into time fields. Clearing UCAL_ORDINAL_MONTH or UCAL_MONTH will + * clear both fields. * * @param field The time field to be cleared. * @stable ICU 2.6. @@ -1259,7 +1260,7 @@ public: * same class ID. Objects of other classes have different class IDs. * @stable ICU 2.0 */ - virtual UClassID getDynamicClassID(void) const override = 0; + virtual UClassID getDynamicClassID() const override = 0; /** * Returns the calendar type name string for this Calendar object. @@ -1347,9 +1348,8 @@ public: * this calendar system, false otherwise. * @stable ICU 4.4 */ - virtual UBool isWeekend(void) const; + virtual UBool isWeekend() const; -#ifndef U_FORCE_HIDE_DRAFT_API /** * Returns true if the date is in a leap year. Recalculate the current time * field values if the time value has been changed by a call to * setTime(). @@ -1362,7 +1362,7 @@ public: * @param status ICU Error Code * @return True if the date in the fields is in a Temporal proposal * defined leap year. False otherwise. - * @draft ICU 73 + * @stable ICU 73 */ virtual bool inTemporalLeapYear(UErrorCode& status) const; @@ -1382,7 +1382,7 @@ public: * * @param status ICU Error Code * @return One of 25 possible strings in {"M01".."M13", "M01L".."M12L"}. - * @draft ICU 73 + * @stable ICU 73 */ virtual const char* getTemporalMonthCode(UErrorCode& status) const; @@ -1403,12 +1403,10 @@ public: * @param temporalMonth The value to be set for temporal monthCode. * @param status ICU Error Code * - * @draft ICU 73 + * @stable ICU 73 */ virtual void setTemporalMonthCode(const char* temporalMonth, UErrorCode& status); -#endif // U_FORCE_HIDE_DRAFT_API - protected: /** @@ -1549,6 +1547,13 @@ protected: * @internal */ inline int32_t internalGet(UCalendarDateFields field) const {return fFields[field];} + + /** + * The year in this calendar is counting from 1 backward if the era is 0. + * @return The year in era 0 of this calendar is counting backward from 1. + * @internal + */ + virtual bool isEra0CountingBackward() const { return false; } #endif /* U_HIDE_INTERNAL_API */ /** @@ -1560,7 +1565,7 @@ protected: * @return The value for the UCAL_MONTH. * @internal */ - virtual int32_t internalGetMonth() const; + virtual int32_t internalGetMonth(UErrorCode& status) const; /** * Use this function instead of internalGet(UCAL_MONTH, defaultValue). The implementation @@ -1570,10 +1575,12 @@ protected: * * @param defaultValue a default value used if the UCAL_MONTH and * UCAL_ORDINAL are both unset. + * @param status Output param set to failure code on function return + * when this function fails. * @return The value for the UCAL_MONTH. * @internal */ - virtual int32_t internalGetMonth(int32_t defaultValue) const; + virtual int32_t internalGetMonth(int32_t defaultValue, UErrorCode& status) const; #ifndef U_HIDE_DEPRECATED_API /** @@ -1662,12 +1669,14 @@ protected: * @param useMonth if false, compute the day before the first day of * the given year, otherwise, compute the day before the first day of * the given month + * @param status Output param set to failure code on function return + * when this function fails. * @return the Julian day number of the day before the first * day of the given month and year * @internal */ - virtual int32_t handleComputeMonthStart(int32_t eyear, int32_t month, - UBool useMonth) const = 0; + virtual int64_t handleComputeMonthStart(int32_t eyear, int32_t month, + UBool useMonth, UErrorCode& status) const = 0; /** * Return the number of days in the given month of the given extended @@ -1676,7 +1685,7 @@ protected: * implementation than the default implementation in Calendar. * @internal */ - virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month) const ; + virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month, UErrorCode& status) const ; /** * Return the number of days in the given extended year of this @@ -1693,20 +1702,22 @@ protected: * use the UCAL_EXTENDED_YEAR field or the UCAL_YEAR and supra-year fields (such * as UCAL_ERA) specific to the calendar system, depending on which set of * fields is newer. + * @param status ICU Error Code * @return the extended year * @internal */ - virtual int32_t handleGetExtendedYear() = 0; + virtual int32_t handleGetExtendedYear(UErrorCode& status) = 0; /** * Subclasses may override this. This method calls * handleGetMonthLength() to obtain the calendar-specific month * length. * @param bestField which field to use to calculate the date + * @param status ICU Error Code * @return julian day specified by calendar fields. * @internal */ - virtual int32_t handleComputeJulianDay(UCalendarDateFields bestField); + virtual int32_t handleComputeJulianDay(UCalendarDateFields bestField, UErrorCode &status); /** * Subclasses must override this to convert from week fields @@ -1716,7 +1727,7 @@ protected: * @return the extended year, UCAL_EXTENDED_YEAR * @internal */ - virtual int32_t handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t woy); + virtual int32_t handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t woy, UErrorCode& status); /** * Validate a single field of this calendar. Subclasses should @@ -1730,10 +1741,11 @@ protected: /** * Compute the Julian day from fields. Will determine whether to use * the JULIAN_DAY field directly, or other fields. + * @param status ICU Error Code * @return the julian day * @internal */ - int32_t computeJulianDay(); + int32_t computeJulianDay(UErrorCode &status); /** * Compute the milliseconds in the day from the fields. This is a @@ -1911,7 +1923,7 @@ protected: * @return the current time without recomputing. * @stable ICU 2.0 */ - UDate internalGetTime(void) const { return fTime; } + UDate internalGetTime() const { return fTime; } /** * Set the current time without affecting flags or fields. @@ -2021,9 +2033,11 @@ protected: * Called by computeJulianDay. Returns the default month (0-based) for the year, * taking year and era into account. Defaults to 0 for Gregorian, which doesn't care. * @param eyear The extended year + * @param status Output param set to failure code on function return + * when this function fails. * @internal */ - virtual int32_t getDefaultMonthInYear(int32_t eyear) ; + virtual int32_t getDefaultMonthInYear(int32_t eyear, UErrorCode& status); /** @@ -2154,7 +2168,7 @@ protected: * returns the local DOW, valid range 0..6 * @internal */ - int32_t getLocalDOW(); + int32_t getLocalDOW(UErrorCode& status); #endif /* U_HIDE_INTERNAL_API */ private: @@ -2339,7 +2353,7 @@ private: * @return Day number from 1..7 (SUN..SAT). * @internal */ - static uint8_t julianDayToDayOfWeek(double julian); + static uint8_t julianDayToDayOfWeek(int32_t julian); #endif /* U_HIDE_INTERNAL_API */ private: @@ -2359,7 +2373,7 @@ private: * @return a StringEnumeration over the locales available at the time of the call * @internal */ - static StringEnumeration* getAvailableLocales(void); + static StringEnumeration* getAvailableLocales(); /** * Register a new Calendar factory. The factory will be adopted. @@ -2550,6 +2564,16 @@ Calendar::internalSet(UCalendarDateFields field, int32_t value) fIsSet[field] = true; // Remove later } +/** + * Macro for the class to declare it override + * haveDefaultCentury, defaultCenturyStart, and + * defaultCenturyStartYear functions in this class. + * @internal + */ +#define DECLARE_OVERRIDE_SYSTEM_DEFAULT_CENTURY \ + virtual UBool haveDefaultCentury() const override; \ + virtual UDate defaultCenturyStart() const override; \ + virtual int32_t defaultCenturyStartYear() const override; #ifndef U_HIDE_INTERNAL_API inline int32_t Calendar::weekNumber(int32_t dayOfPeriod, int32_t dayOfWeek) diff --git a/contrib/libs/icu/include/unicode/caniter.h b/contrib/libs/icu/include/unicode/caniter.h index 035bd0e64e..b904ef2ff8 100644 --- a/contrib/libs/icu/include/unicode/caniter.h +++ b/contrib/libs/icu/include/unicode/caniter.h @@ -128,9 +128,10 @@ public: * @param skipZeros determine if skip zeros * @param result the results in a set. * @param status Fill-in parameter which receives the status of this operation. + * @param depth depth of the call. * @internal */ - static void U_EXPORT2 permute(UnicodeString &source, UBool skipZeros, Hashtable *result, UErrorCode &status); + static void U_EXPORT2 permute(UnicodeString &source, UBool skipZeros, Hashtable *result, UErrorCode &status, int32_t depth=0); #endif /* U_HIDE_INTERNAL_API */ /** @@ -182,8 +183,8 @@ private: // transient fields UnicodeString buffer; - const Normalizer2 &nfd; - const Normalizer2Impl &nfcImpl; + const Normalizer2 *nfd; + const Normalizer2Impl *nfcImpl; // we have a segment, in NFD. Find all the strings that are canonically equivalent to it. UnicodeString *getEquivalents(const UnicodeString &segment, int32_t &result_len, UErrorCode &status); //private String[] getEquivalents(String segment) diff --git a/contrib/libs/icu/include/unicode/chariter.h b/contrib/libs/icu/include/unicode/chariter.h index 45f4d984c7..411825677f 100644 --- a/contrib/libs/icu/include/unicode/chariter.h +++ b/contrib/libs/icu/include/unicode/chariter.h @@ -133,8 +133,8 @@ public: * @return the hash code. * @stable ICU 2.0 */ - virtual int32_t hashCode(void) const = 0; - + virtual int32_t hashCode() const = 0; + /** * Returns a UClassID for this ForwardCharacterIterator ("poor man's * RTTI").<P> Despite the fact that this function is public, @@ -142,8 +142,8 @@ public: * @return a UClassID for this ForwardCharacterIterator * @stable ICU 2.0 */ - virtual UClassID getDynamicClassID(void) const override = 0; - + virtual UClassID getDynamicClassID() const override = 0; + /** * Gets the current code unit for returning and advances to the next code unit * in the iteration range @@ -152,8 +152,8 @@ public: * @return the current code unit. * @stable ICU 2.0 */ - virtual char16_t nextPostInc(void) = 0; - + virtual char16_t nextPostInc() = 0; + /** * Gets the current code point for returning and advances to the next code point * in the iteration range @@ -162,8 +162,8 @@ public: * @return the current code point. * @stable ICU 2.0 */ - virtual UChar32 next32PostInc(void) = 0; - + virtual UChar32 next32PostInc() = 0; + /** * Returns false if there are no more code units or code points * at or after the current position in the iteration range. @@ -389,7 +389,7 @@ public: * @return the first code unit in its iteration range. * @stable ICU 2.0 */ - virtual char16_t first(void) = 0; + virtual char16_t first() = 0; /** * Sets the iterator to refer to the first code unit in its @@ -399,7 +399,7 @@ public: * @return the first code unit in its iteration range. * @stable ICU 2.0 */ - virtual char16_t firstPostInc(void); + virtual char16_t firstPostInc(); /** * Sets the iterator to refer to the first code point in its @@ -410,7 +410,7 @@ public: * @return the first code point in its iteration range. * @stable ICU 2.0 */ - virtual UChar32 first32(void) = 0; + virtual UChar32 first32() = 0; /** * Sets the iterator to refer to the first code point in its @@ -420,7 +420,7 @@ public: * @return the first code point in its iteration range. * @stable ICU 2.0 */ - virtual UChar32 first32PostInc(void); + virtual UChar32 first32PostInc(); /** * Sets the iterator to refer to the first code unit or code point in its @@ -438,8 +438,8 @@ public: * @return the last code unit. * @stable ICU 2.0 */ - virtual char16_t last(void) = 0; - + virtual char16_t last() = 0; + /** * Sets the iterator to refer to the last code point in its * iteration range, and returns that code unit. @@ -447,7 +447,7 @@ public: * @return the last code point. * @stable ICU 2.0 */ - virtual UChar32 last32(void) = 0; + virtual UChar32 last32() = 0; /** * Sets the iterator to the end of its iteration range, just behind @@ -486,15 +486,15 @@ public: * @return the current code unit. * @stable ICU 2.0 */ - virtual char16_t current(void) const = 0; - + virtual char16_t current() const = 0; + /** * Returns the code point the iterator currently refers to. * @return the current code point. * @stable ICU 2.0 */ - virtual UChar32 current32(void) const = 0; - + virtual UChar32 current32() const = 0; + /** * Advances to the next code unit in the iteration range * (toward endIndex()), and returns that code unit. If there are @@ -502,8 +502,8 @@ public: * @return the next code unit. * @stable ICU 2.0 */ - virtual char16_t next(void) = 0; - + virtual char16_t next() = 0; + /** * Advances to the next code point in the iteration range * (toward endIndex()), and returns that code point. If there are @@ -514,8 +514,8 @@ public: * @return the next code point. * @stable ICU 2.0 */ - virtual UChar32 next32(void) = 0; - + virtual UChar32 next32() = 0; + /** * Advances to the previous code unit in the iteration range * (toward startIndex()), and returns that code unit. If there are @@ -523,7 +523,7 @@ public: * @return the previous code unit. * @stable ICU 2.0 */ - virtual char16_t previous(void) = 0; + virtual char16_t previous() = 0; /** * Advances to the previous code point in the iteration range @@ -532,7 +532,7 @@ public: * @return the previous code point. * @stable ICU 2.0 */ - virtual UChar32 previous32(void) = 0; + virtual UChar32 previous32() = 0; /** * Returns false if there are no more code units or code points @@ -555,8 +555,8 @@ public: * object of the character returned by first(). * @stable ICU 2.0 */ - inline int32_t startIndex(void) const; - + inline int32_t startIndex() const; + /** * Returns the numeric index in the underlying text-storage * object of the position immediately BEYOND the character @@ -566,8 +566,8 @@ public: * returned by last(). * @stable ICU 2.0 */ - inline int32_t endIndex(void) const; - + inline int32_t endIndex() const; + /** * Returns the numeric index in the underlying text-storage * object of the character the iterator currently refers to @@ -576,7 +576,7 @@ public: * the character the iterator currently refers to * @stable ICU 2.0 */ - inline int32_t getIndex(void) const; + inline int32_t getIndex() const; /** * Returns the length of the entire text in the underlying @@ -708,22 +708,22 @@ CharacterIterator::setToEnd() { } inline int32_t -CharacterIterator::startIndex(void) const { +CharacterIterator::startIndex() const { return begin; } inline int32_t -CharacterIterator::endIndex(void) const { +CharacterIterator::endIndex() const { return end; } inline int32_t -CharacterIterator::getIndex(void) const { +CharacterIterator::getIndex() const { return pos; } inline int32_t -CharacterIterator::getLength(void) const { +CharacterIterator::getLength() const { return textLength; } diff --git a/contrib/libs/icu/include/unicode/choicfmt.h b/contrib/libs/icu/include/unicode/choicfmt.h index 429fa0cebd..2b6fb626ac 100644 --- a/contrib/libs/icu/include/unicode/choicfmt.h +++ b/contrib/libs/icu/include/unicode/choicfmt.h @@ -454,7 +454,7 @@ public: * other classes have different class IDs. * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments. */ - virtual UClassID getDynamicClassID(void) const override; + virtual UClassID getDynamicClassID() const override; /** * Returns the class ID for this class. This is useful only for @@ -467,7 +467,7 @@ public: * @return The class ID for all objects of this class. * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments. */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); private: /** diff --git a/contrib/libs/icu/include/unicode/coleitr.h b/contrib/libs/icu/include/unicode/coleitr.h index bd0c569f35..1b7fec0d1d 100644 --- a/contrib/libs/icu/include/unicode/coleitr.h +++ b/contrib/libs/icu/include/unicode/coleitr.h @@ -171,7 +171,7 @@ public: * Resets the cursor to the beginning of the string. * @stable ICU 2.0 */ - void reset(void); + void reset(); /** * Gets the ordering priority of the next character in the string. @@ -263,7 +263,7 @@ public: * @return the offset of the character. * @stable ICU 2.0 */ - int32_t getOffset(void) const; + int32_t getOffset() const; /** * Sets the offset of the currently processed character in the source string. diff --git a/contrib/libs/icu/include/unicode/coll.h b/contrib/libs/icu/include/unicode/coll.h index fc5af95349..4845e8f02c 100644 --- a/contrib/libs/icu/include/unicode/coll.h +++ b/contrib/libs/icu/include/unicode/coll.h @@ -535,7 +535,7 @@ public: * Generates the hash code for the collation object * @stable ICU 2.0 */ - virtual int32_t hashCode(void) const = 0; + virtual int32_t hashCode() const = 0; #ifndef U_FORCE_HIDE_DEPRECATED_API /** @@ -599,7 +599,7 @@ public: * @see Collator#setStrength * @deprecated ICU 2.6 Use getAttribute(UCOL_STRENGTH...) instead */ - virtual ECollationStrength getStrength(void) const; + virtual ECollationStrength getStrength() const; /** * Sets the minimum strength to be used in comparison or transformation. @@ -730,7 +730,7 @@ public: * @return a StringEnumeration over the locales available at the time of the call * @stable ICU 2.6 */ - static StringEnumeration* U_EXPORT2 getAvailableLocales(void); + static StringEnumeration* U_EXPORT2 getAvailableLocales(); /** * Create a string enumerator of all possible keywords that are relevant to @@ -864,7 +864,7 @@ public: * IDs. * @stable ICU 2.0 */ - virtual UClassID getDynamicClassID(void) const override = 0; + virtual UClassID getDynamicClassID() const override = 0; /** * Universal attribute setter @@ -1245,7 +1245,7 @@ public: * @return true if the factory is visible. * @stable ICU 2.6 */ - virtual UBool visible(void) const; + virtual UBool visible() const; /** * Return a collator for the provided locale. If the locale diff --git a/contrib/libs/icu/include/unicode/datefmt.h b/contrib/libs/icu/include/unicode/datefmt.h index 27240a4e1c..9b05ea457c 100644 --- a/contrib/libs/icu/include/unicode/datefmt.h +++ b/contrib/libs/icu/include/unicode/datefmt.h @@ -532,7 +532,7 @@ public: * @return A date/time formatter which the caller owns. * @stable ICU 2.0 */ - static DateFormat* U_EXPORT2 createInstance(void); + static DateFormat* U_EXPORT2 createInstance(); /** * Creates a time formatter with the given formatting style for the given @@ -673,7 +673,7 @@ public: * numeric processing is lenient. * @stable ICU 2.0 */ - virtual UBool isLenient(void) const; + virtual UBool isLenient() const; /** * Specifies whether date/time parsing is to be lenient. With @@ -702,8 +702,7 @@ public: * Returns whether date/time parsing in the encapsulated Calendar object processing is lenient. * @stable ICU 53 */ - virtual UBool isCalendarLenient(void) const; - + virtual UBool isCalendarLenient() const; /** * Specifies whether encapsulated Calendar date/time parsing is to be lenient. With @@ -725,7 +724,7 @@ public: * @return the calendar associated with this date/time formatter. * @stable ICU 2.0 */ - virtual const Calendar* getCalendar(void) const; + virtual const Calendar* getCalendar() const; /** * Set the calendar to be used by this date format. Initially, the default @@ -754,7 +753,7 @@ public: * @return the number formatter which this date/time formatter uses. * @stable ICU 2.0 */ - virtual const NumberFormat* getNumberFormat(void) const; + virtual const NumberFormat* getNumberFormat() const; /** * Allows you to set the number formatter. The caller should @@ -776,7 +775,7 @@ public: * @return the time zone associated with the calendar of DateFormat. * @stable ICU 2.0 */ - virtual const TimeZone& getTimeZone(void) const; + virtual const TimeZone& getTimeZone() const; /** * Sets the time zone for the calendar of this DateFormat object. The caller diff --git a/contrib/libs/icu/include/unicode/dcfmtsym.h b/contrib/libs/icu/include/unicode/dcfmtsym.h index 6b79c99000..52f2268434 100644 --- a/contrib/libs/icu/include/unicode/dcfmtsym.h +++ b/contrib/libs/icu/include/unicode/dcfmtsym.h @@ -455,13 +455,13 @@ public: * Returns that pattern stored in currency info. Internal API for use by NumberFormat API. * @internal */ - inline const char16_t* getCurrencyPattern(void) const; + inline const char16_t* getCurrencyPattern() const; /** * Returns the numbering system with which this DecimalFormatSymbols was initialized. * @internal */ - inline const char* getNumberingSystemName(void) const; + inline const char* getNumberingSystemName() const; #endif /* U_HIDE_INTERNAL_API */ private: diff --git a/contrib/libs/icu/include/unicode/decimfmt.h b/contrib/libs/icu/include/unicode/decimfmt.h index f72ba68725..1c55e36778 100644 --- a/contrib/libs/icu/include/unicode/decimfmt.h +++ b/contrib/libs/icu/include/unicode/decimfmt.h @@ -60,11 +60,9 @@ class UFormattedNumberData; } } -namespace numparse { -namespace impl { +namespace numparse::impl { class NumberParserImpl; } -} /** * **IMPORTANT:** New users are strongly encouraged to see if @@ -1163,7 +1161,7 @@ class U_I18N_API DecimalFormat : public NumberFormat { * @see DecimalFormatSymbols * @stable ICU 2.0 */ - virtual const DecimalFormatSymbols* getDecimalFormatSymbols(void) const; + virtual const DecimalFormatSymbols* getDecimalFormatSymbols() const; /** * Sets the decimal format symbols, which is generally not changed @@ -1188,7 +1186,7 @@ class U_I18N_API DecimalFormat : public NumberFormat { * @return desired CurrencyPluralInfo * @stable ICU 4.2 */ - virtual const CurrencyPluralInfo* getCurrencyPluralInfo(void) const; + virtual const CurrencyPluralInfo* getCurrencyPluralInfo() const; /** * Sets the currency plural format information, @@ -1315,7 +1313,7 @@ class U_I18N_API DecimalFormat : public NumberFormat { * Examples: with 100, 1.23 -> "123", and "123" -> 1.23 * @stable ICU 2.0 */ - int32_t getMultiplier(void) const; + int32_t getMultiplier() const; /** * Set the multiplier for use in percent, permill, etc. @@ -1344,7 +1342,7 @@ class U_I18N_API DecimalFormat : public NumberFormat { * @return the current value of the power-of-ten multiplier. * @stable ICU 62 */ - int32_t getMultiplierScale(void) const; + int32_t getMultiplierScale() const; /** * Sets a power of ten by which number should be multiplied before formatting, which @@ -1376,7 +1374,7 @@ class U_I18N_API DecimalFormat : public NumberFormat { * @see #setRoundingMode * @stable ICU 2.0 */ - virtual double getRoundingIncrement(void) const; + virtual double getRoundingIncrement() const; /** * Set the rounding increment. In the absence of a rounding increment, @@ -1399,7 +1397,7 @@ class U_I18N_API DecimalFormat : public NumberFormat { * @see #setRoundingMode * @stable ICU 2.0 */ - virtual ERoundingMode getRoundingMode(void) const override; + virtual ERoundingMode getRoundingMode() const override; /** * Set the rounding mode. @@ -1422,7 +1420,7 @@ class U_I18N_API DecimalFormat : public NumberFormat { * @see #setPadPosition * @stable ICU 2.0 */ - virtual int32_t getFormatWidth(void) const; + virtual int32_t getFormatWidth() const; /** * Set the width to which the output of format() is padded. @@ -1485,7 +1483,7 @@ class U_I18N_API DecimalFormat : public NumberFormat { * @see #EPadPosition * @stable ICU 2.0 */ - virtual EPadPosition getPadPosition(void) const; + virtual EPadPosition getPadPosition() const; /** * Set the position at which padding will take place. This is the location @@ -1515,7 +1513,7 @@ class U_I18N_API DecimalFormat : public NumberFormat { * @see #setExponentSignAlwaysShown * @stable ICU 2.0 */ - virtual UBool isScientificNotation(void) const; + virtual UBool isScientificNotation() const; /** * Set whether or not scientific notation is used. When scientific notation @@ -1544,7 +1542,7 @@ class U_I18N_API DecimalFormat : public NumberFormat { * @see #setExponentSignAlwaysShown * @stable ICU 2.0 */ - virtual int8_t getMinimumExponentDigits(void) const; + virtual int8_t getMinimumExponentDigits() const; /** * Set the minimum exponent digits that will be shown. This has no @@ -1572,7 +1570,7 @@ class U_I18N_API DecimalFormat : public NumberFormat { * @see #setExponentSignAlwaysShown * @stable ICU 2.0 */ - virtual UBool isExponentSignAlwaysShown(void) const; + virtual UBool isExponentSignAlwaysShown() const; /** * Set whether the exponent sign is always shown. This has no effect @@ -1600,7 +1598,7 @@ class U_I18N_API DecimalFormat : public NumberFormat { * @see DecimalFormatSymbols::getGroupingSeparator * @stable ICU 2.0 */ - int32_t getGroupingSize(void) const; + int32_t getGroupingSize() const; /** * Set the grouping size. Grouping size is the number of digits between @@ -1633,7 +1631,7 @@ class U_I18N_API DecimalFormat : public NumberFormat { * @see DecimalFormatSymbols::getGroupingSeparator * @stable ICU 2.4 */ - int32_t getSecondaryGroupingSize(void) const; + int32_t getSecondaryGroupingSize() const; /** * Set the secondary grouping size. If set to a value less than 1, @@ -1700,7 +1698,7 @@ class U_I18N_API DecimalFormat : public NumberFormat { * Example: Decimal ON: 12345 -> 12345.; OFF: 12345 -> 12345 * @stable ICU 2.0 */ - UBool isDecimalSeparatorAlwaysShown(void) const; + UBool isDecimalSeparatorAlwaysShown() const; /** * Allows you to set the behavior of the decimal separator with integers. @@ -1718,7 +1716,7 @@ class U_I18N_API DecimalFormat : public NumberFormat { * @return true if input must contain a match to decimal mark in pattern * @stable ICU 54 */ - UBool isDecimalPatternMatchRequired(void) const; + UBool isDecimalPatternMatchRequired() const; /** * Allows you to set the parse behavior of the pattern decimal mark. @@ -2124,7 +2122,7 @@ class U_I18N_API DecimalFormat : public NumberFormat { * @return The class ID for all objects of this class. * @stable ICU 2.0 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. @@ -2137,7 +2135,7 @@ class U_I18N_API DecimalFormat : public NumberFormat { * other classes have different class IDs. * @stable ICU 2.0 */ - UClassID getDynamicClassID(void) const override; + UClassID getDynamicClassID() const override; private: diff --git a/contrib/libs/icu/include/unicode/displayoptions.h b/contrib/libs/icu/include/unicode/displayoptions.h index 7bc763bbac..9cc822626b 100644 --- a/contrib/libs/icu/include/unicode/displayoptions.h +++ b/contrib/libs/icu/include/unicode/displayoptions.h @@ -22,8 +22,6 @@ U_NAMESPACE_BEGIN -#ifndef U_HIDE_DRAFT_API - /** * Represents all the display options that are supported by CLDR such as grammatical case, noun * class, ... etc. It currently supports enums, but may be extended in the future to have other @@ -40,14 +38,14 @@ U_NAMESPACE_BEGIN * .build(); * ``` * - * @draft ICU 72 + * @stable ICU 72 */ class U_I18N_API DisplayOptions { public: /** * Responsible for building `DisplayOptions`. * - * @draft ICU 72 + * @stable ICU 72 */ class U_I18N_API Builder { public: @@ -56,7 +54,7 @@ public: * * @param grammaticalCase The grammatical case. * @return Builder - * @draft ICU 72 + * @stable ICU 72 */ Builder &setGrammaticalCase(UDisplayOptionsGrammaticalCase grammaticalCase) { this->grammaticalCase = grammaticalCase; @@ -68,7 +66,7 @@ public: * * @param nounClass The noun class. * @return Builder - * @draft ICU 72 + * @stable ICU 72 */ Builder &setNounClass(UDisplayOptionsNounClass nounClass) { this->nounClass = nounClass; @@ -80,7 +78,7 @@ public: * * @param pluralCategory The plural category. * @return Builder - * @draft ICU 72 + * @stable ICU 72 */ Builder &setPluralCategory(UDisplayOptionsPluralCategory pluralCategory) { this->pluralCategory = pluralCategory; @@ -92,7 +90,7 @@ public: * * @param capitalization The capitalization. * @return Builder - * @draft ICU 72 + * @stable ICU 72 */ Builder &setCapitalization(UDisplayOptionsCapitalization capitalization) { this->capitalization = capitalization; @@ -104,7 +102,7 @@ public: * * @param nameStyle The name style. * @return Builder - * @draft ICU 72 + * @stable ICU 72 */ Builder &setNameStyle(UDisplayOptionsNameStyle nameStyle) { this->nameStyle = nameStyle; @@ -116,7 +114,7 @@ public: * * @param displayLength The display length. * @return Builder - * @draft ICU 72 + * @stable ICU 72 */ Builder &setDisplayLength(UDisplayOptionsDisplayLength displayLength) { this->displayLength = displayLength; @@ -128,7 +126,7 @@ public: * * @param substituteHandling The substitute handling. * @return Builder - * @draft ICU 72 + * @stable ICU 72 */ Builder &setSubstituteHandling(UDisplayOptionsSubstituteHandling substituteHandling) { this->substituteHandling = substituteHandling; @@ -139,7 +137,7 @@ public: * Builds the display options. * * @return DisplayOptions - * @draft ICU 72 + * @stable ICU 72 */ DisplayOptions build() { return DisplayOptions(*this); } @@ -162,21 +160,21 @@ public: * Creates a builder with the `UNDEFINED` values for all the parameters. * * @return Builder - * @draft ICU 72 + * @stable ICU 72 */ static Builder builder(); /** * Creates a builder with the same parameters from this object. * * @return Builder - * @draft ICU 72 + * @stable ICU 72 */ Builder copyToBuilder() const; /** * Gets the grammatical case. * * @return UDisplayOptionsGrammaticalCase - * @draft ICU 72 + * @stable ICU 72 */ UDisplayOptionsGrammaticalCase getGrammaticalCase() const { return grammaticalCase; } @@ -184,7 +182,7 @@ public: * Gets the noun class. * * @return UDisplayOptionsNounClass - * @draft ICU 72 + * @stable ICU 72 */ UDisplayOptionsNounClass getNounClass() const { return nounClass; } @@ -192,7 +190,7 @@ public: * Gets the plural category. * * @return UDisplayOptionsPluralCategory - * @draft ICU 72 + * @stable ICU 72 */ UDisplayOptionsPluralCategory getPluralCategory() const { return pluralCategory; } @@ -200,7 +198,7 @@ public: * Gets the capitalization. * * @return UDisplayOptionsCapitalization - * @draft ICU 72 + * @stable ICU 72 */ UDisplayOptionsCapitalization getCapitalization() const { return capitalization; } @@ -208,7 +206,7 @@ public: * Gets the dialect handling. * * @return UDisplayOptionsNameStyle - * @draft ICU 72 + * @stable ICU 72 */ UDisplayOptionsNameStyle getNameStyle() const { return nameStyle; } @@ -216,7 +214,7 @@ public: * Gets the display length. * * @return UDisplayOptionsDisplayLength - * @draft ICU 72 + * @stable ICU 72 */ UDisplayOptionsDisplayLength getDisplayLength() const { return displayLength; } @@ -224,7 +222,7 @@ public: * Gets the substitute handling. * * @return UDisplayOptionsSubstituteHandling - * @draft ICU 72 + * @stable ICU 72 */ UDisplayOptionsSubstituteHandling getSubstituteHandling() const { return substituteHandling; } @@ -232,7 +230,7 @@ public: * Copies the DisplayOptions. * * @param other The options to copy. - * @draft ICU 72 + * @stable ICU 72 */ DisplayOptions &operator=(const DisplayOptions &other) = default; @@ -240,7 +238,7 @@ public: * Moves the DisplayOptions. * * @param other The options to move from. - * @draft ICU 72 + * @stable ICU 72 */ DisplayOptions &operator=(DisplayOptions &&other) noexcept = default; @@ -248,7 +246,7 @@ public: * Copies the DisplayOptions. * * @param other The options to copy. - * @draft ICU 72 + * @stable ICU 72 */ DisplayOptions(const DisplayOptions &other) = default; @@ -263,8 +261,6 @@ private: UDisplayOptionsSubstituteHandling substituteHandling; }; -#endif // U_HIDE_DRAFT_API - U_NAMESPACE_END #endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/contrib/libs/icu/include/unicode/dtfmtsym.h b/contrib/libs/icu/include/unicode/dtfmtsym.h index 3cd54092e0..df8da36d81 100644 --- a/contrib/libs/icu/include/unicode/dtfmtsym.h +++ b/contrib/libs/icu/include/unicode/dtfmtsym.h @@ -567,7 +567,7 @@ public: * @return the non-localized date-time pattern characters * @stable ICU 2.0 */ - static const char16_t * U_EXPORT2 getPatternUChars(void); + static const char16_t* U_EXPORT2 getPatternUChars(); /** * Gets localized date-time pattern characters. For example: 'u', 't', etc. @@ -971,7 +971,7 @@ private: /** * Delete all the storage owned by this object. */ - void dispose(void); + void dispose(); /** * Copy all of the other's data to this. @@ -982,12 +982,12 @@ private: /** * Create zone strings array by locale if not yet available */ - void initZoneStringsArray(void); + void initZoneStringsArray(); /** * Delete just the zone strings. */ - void disposeZoneStrings(void); + void disposeZoneStrings(); /** * Returns the date format field index of the pattern character c, diff --git a/contrib/libs/icu/include/unicode/dtintrv.h b/contrib/libs/icu/include/unicode/dtintrv.h index 8c172eb7a5..1fd0ba5dee 100644 --- a/contrib/libs/icu/include/unicode/dtintrv.h +++ b/contrib/libs/icu/include/unicode/dtintrv.h @@ -76,7 +76,7 @@ public: * @return The class ID for all objects of this class. * @stable ICU 4.0 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This @@ -89,9 +89,8 @@ public: * other classes have different class IDs. * @stable ICU 4.0 */ - virtual UClassID getDynamicClassID(void) const override; + virtual UClassID getDynamicClassID() const override; - /** * Copy constructor. * @stable ICU 4.0 diff --git a/contrib/libs/icu/include/unicode/dtitvfmt.h b/contrib/libs/icu/include/unicode/dtitvfmt.h index b4dc8cabf0..7bfdf2d8a2 100644 --- a/contrib/libs/icu/include/unicode/dtitvfmt.h +++ b/contrib/libs/icu/include/unicode/dtitvfmt.h @@ -344,11 +344,6 @@ public: * @param status output param set to success/failure code on exit * @return a date time interval formatter which the caller owns. * @stable ICU 4.0 - * <p> - * <h4>Sample code</h4> - * \snippet samples/dtitvfmtsample/dtitvfmtsample.cpp dtitvfmtPreDefined1 - * \snippet samples/dtitvfmtsample/dtitvfmtsample.cpp dtitvfmtPreDefined - * <p> */ static DateIntervalFormat* U_EXPORT2 createInstance( @@ -410,11 +405,6 @@ public: * @param status output param set to success/failure code on exit * @return a date time interval formatter which the caller owns. * @stable ICU 4.0 - * <p> - * <h4>Sample code</h4> - * \snippet samples/dtitvfmtsample/dtitvfmtsample.cpp dtitvfmtPreDefined1 - * \snippet samples/dtitvfmtsample/dtitvfmtsample.cpp dtitvfmtCustomized - * <p> */ static DateIntervalFormat* U_EXPORT2 createInstance( const UnicodeString& skeleton, @@ -604,8 +594,7 @@ public: * this date interval formatter. * @stable ICU 4.0 */ - const DateIntervalInfo* getDateIntervalInfo(void) const; - + const DateIntervalInfo* getDateIntervalInfo() const; /** * Set the date time interval patterns. @@ -628,14 +617,14 @@ public: * @return the date formatter associated with this date interval formatter. * @stable ICU 4.0 */ - const DateFormat* getDateFormat(void) const; + const DateFormat* getDateFormat() const; /** * Returns a reference to the TimeZone used by this DateIntervalFormat's calendar. * @return the time zone associated with the calendar of DateIntervalFormat. * @stable ICU 4.8 */ - virtual const TimeZone& getTimeZone(void) const; + virtual const TimeZone& getTimeZone() const; /** * Sets the time zone for the calendar used by this DateIntervalFormat object. The @@ -689,7 +678,7 @@ public: * @return The class ID for all objects of this class. * @stable ICU 4.0 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This @@ -702,7 +691,7 @@ public: * other classes have different class IDs. * @stable ICU 4.0 */ - virtual UClassID getDynamicClassID(void) const override; + virtual UClassID getDynamicClassID() const override; protected: diff --git a/contrib/libs/icu/include/unicode/dtptngen.h b/contrib/libs/icu/include/unicode/dtptngen.h index 8c374a3094..3d09178b22 100644 --- a/contrib/libs/icu/include/unicode/dtptngen.h +++ b/contrib/libs/icu/include/unicode/dtptngen.h @@ -211,11 +211,6 @@ public: * @return conflicting status. The value could be UDATPG_NO_CONFLICT, * UDATPG_BASE_CONFLICT or UDATPG_CONFLICT. * @stable ICU 3.8 - * <p> - * <h4>Sample code</h4> - * \snippet samples/dtptngsample/dtptngsample.cpp getBestPatternExample1 - * \snippet samples/dtptngsample/dtptngsample.cpp addPatternExample - * <p> */ UDateTimePatternConflict addPattern(const UnicodeString& pattern, UBool override, @@ -388,11 +383,6 @@ public: * @return bestPattern * The best pattern found from the given skeleton. * @stable ICU 3.8 - * <p> - * <h4>Sample code</h4> - * \snippet samples/dtptngsample/dtptngsample.cpp getBestPatternExample1 - * \snippet samples/dtptngsample/dtptngsample.cpp getBestPatternExample - * <p> */ UnicodeString getBestPattern(const UnicodeString& skeleton, UErrorCode& status); @@ -436,11 +426,6 @@ public: * which must not indicate a failure before the function call. * @return pattern adjusted to match the skeleton fields widths and subtypes. * @stable ICU 3.8 - * <p> - * <h4>Sample code</h4> - * \snippet samples/dtptngsample/dtptngsample.cpp getBestPatternExample1 - * \snippet samples/dtptngsample/dtptngsample.cpp replaceFieldTypesExample - * <p> */ UnicodeString replaceFieldTypes(const UnicodeString& pattern, const UnicodeString& skeleton, @@ -571,7 +556,7 @@ public: * * @stable ICU 3.8 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); private: /** @@ -645,7 +630,7 @@ private: UnicodeString& getMutableFieldDisplayName(UDateTimePatternField field, UDateTimePGDisplayWidth width); void getAppendName(UDateTimePatternField field, UnicodeString& value); UnicodeString mapSkeletonMetacharacters(const UnicodeString& patternForm, int32_t* flags, UErrorCode& status); - const UnicodeString* getBestRaw(DateTimeMatcher& source, int32_t includeMask, DistanceInfo* missingFields, UErrorCode& status, const PtnSkeleton** specifiedSkeletonPtr = 0); + const UnicodeString* getBestRaw(DateTimeMatcher& source, int32_t includeMask, DistanceInfo* missingFields, UErrorCode& status, const PtnSkeleton** specifiedSkeletonPtr = nullptr); UnicodeString adjustFieldTypes(const UnicodeString& pattern, const PtnSkeleton* specifiedSkeleton, int32_t flags, UDateTimePatternMatchOptions options = UDATPG_MATCH_NO_OPTIONS); UnicodeString getBestAppending(int32_t missingFields, int32_t flags, UErrorCode& status, UDateTimePatternMatchOptions options = UDATPG_MATCH_NO_OPTIONS); int32_t getTopBitNumber(int32_t foundMask) const; diff --git a/contrib/libs/icu/include/unicode/dtrule.h b/contrib/libs/icu/include/unicode/dtrule.h index 19e94bc981..6e10bfcb04 100644 --- a/contrib/libs/icu/include/unicode/dtrule.h +++ b/contrib/libs/icu/include/unicode/dtrule.h @@ -160,7 +160,7 @@ public: * @return The date rule type. * @stable ICU 3.8 */ - DateRuleType getDateRuleType(void) const; + DateRuleType getDateRuleType() const; /** * Gets the time rule type @@ -168,14 +168,14 @@ public: * or <code>UTC_TIME</code>. * @stable ICU 3.8 */ - TimeRuleType getTimeRuleType(void) const; + TimeRuleType getTimeRuleType() const; /** * Gets the rule month. * @return The rule month. * @stable ICU 3.8 */ - int32_t getRuleMonth(void) const; + int32_t getRuleMonth() const; /** * Gets the rule day of month. When the date rule type @@ -183,7 +183,7 @@ public: * @return The rule day of month * @stable ICU 3.8 */ - int32_t getRuleDayOfMonth(void) const; + int32_t getRuleDayOfMonth() const; /** * Gets the rule day of week. When the date rule type @@ -191,7 +191,7 @@ public: * @return The rule day of week. * @stable ICU 3.8 */ - int32_t getRuleDayOfWeek(void) const; + int32_t getRuleDayOfWeek() const; /** * Gets the ordinal number of the occurrence of the day of week @@ -200,16 +200,16 @@ public: * @return The rule day of week ordinal number in the month. * @stable ICU 3.8 */ - int32_t getRuleWeekInMonth(void) const; + int32_t getRuleWeekInMonth() const; /** * Gets the rule time in the rule day. * @return The time in the rule day in milliseconds. * @stable ICU 3.8 */ - int32_t getRuleMillisInDay(void) const; + int32_t getRuleMillisInDay() const; -private: + private: int32_t fMonth; int32_t fDayOfMonth; int32_t fDayOfWeek; @@ -230,7 +230,7 @@ public: * @return The class ID for all objects of this class. * @stable ICU 3.8 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This @@ -243,7 +243,7 @@ public: * other classes have different class IDs. * @stable ICU 3.8 */ - virtual UClassID getDynamicClassID(void) const override; + virtual UClassID getDynamicClassID() const override; }; U_NAMESPACE_END diff --git a/contrib/libs/icu/include/unicode/fieldpos.h b/contrib/libs/icu/include/unicode/fieldpos.h index 0c092a0052..23c6a1884e 100644 --- a/contrib/libs/icu/include/unicode/fieldpos.h +++ b/contrib/libs/icu/include/unicode/fieldpos.h @@ -192,14 +192,14 @@ public: * @return the field identifier. * @stable ICU 2.0 */ - int32_t getField(void) const { return fField; } + int32_t getField() const { return fField; } /** * Retrieve the index of the first character in the requested field. * @return the index of the first character in the requested field. * @stable ICU 2.0 */ - int32_t getBeginIndex(void) const { return fBeginIndex; } + int32_t getBeginIndex() const { return fBeginIndex; } /** * Retrieve the index of the character following the last character in the @@ -208,8 +208,8 @@ public: * requested field. * @stable ICU 2.0 */ - int32_t getEndIndex(void) const { return fEndIndex; } - + int32_t getEndIndex() const { return fEndIndex; } + /** * Set the field. * @param f the new value of the field. diff --git a/contrib/libs/icu/include/unicode/fmtable.h b/contrib/libs/icu/include/unicode/fmtable.h index 6bda357604..d251d35ba8 100644 --- a/contrib/libs/icu/include/unicode/fmtable.h +++ b/contrib/libs/icu/include/unicode/fmtable.h @@ -35,11 +35,10 @@ U_NAMESPACE_BEGIN class CharString; -namespace number { -namespace impl { + +namespace number::impl { class DecimalQuantity; } -} /** * Formattable objects can be passed to the Format class or @@ -274,7 +273,7 @@ public: * @return the data type of this Formattable object. * @stable ICU 2.0 */ - Type getType(void) const; + Type getType() const; /** * Returns true if the data type of this Formattable object @@ -290,7 +289,7 @@ public: * @return the double value of this object. * @stable ICU 2.0 */ - double getDouble(void) const { return fValue.fDouble; } + double getDouble() const { return fValue.fDouble; } /** * Gets the double value of this object. If this object is of type @@ -312,7 +311,7 @@ public: * @return the long value of this object. * @stable ICU 2.0 */ - int32_t getLong(void) const { return (int32_t)fValue.fInt64; } + int32_t getLong() const { return (int32_t)fValue.fInt64; } /** * Gets the long value of this object. If the magnitude is too @@ -338,7 +337,7 @@ public: * @return the int64 value of this object. * @stable ICU 2.8 */ - int64_t getInt64(void) const { return fValue.fInt64; } + int64_t getInt64() const { return fValue.fInt64; } /** * Gets the int64 value of this object. If this object is of a numeric @@ -403,7 +402,7 @@ public: * @return a const reference to the string value of this object. * @stable ICU 2.0 */ - inline const UnicodeString& getString(void) const; + inline const UnicodeString& getString() const; /** * Gets a const reference to the string value of this object. If @@ -421,7 +420,7 @@ public: * @return a reference to the string value of this object. * @stable ICU 2.0 */ - inline UnicodeString& getString(void); + inline UnicodeString& getString(); /** * Gets a reference to the string value of this object. If the @@ -680,7 +679,7 @@ private: * Cleans up the memory for unwanted values. For example, the adopted * string or array objects. */ - void dispose(void); + void dispose(); /** * Common initialization, for use by constructors. @@ -719,11 +718,11 @@ inline UDate Formattable::getDate(UErrorCode& status) const { return fValue.fDate; } -inline const UnicodeString& Formattable::getString(void) const { +inline const UnicodeString& Formattable::getString() const { return *fValue.fString; } -inline UnicodeString& Formattable::getString(void) { +inline UnicodeString& Formattable::getString() { return *fValue.fString; } diff --git a/contrib/libs/icu/include/unicode/formattednumber.h b/contrib/libs/icu/include/unicode/formattednumber.h index 198c9d8478..6b212d7c82 100644 --- a/contrib/libs/icu/include/unicode/formattednumber.h +++ b/contrib/libs/icu/include/unicode/formattednumber.h @@ -25,6 +25,7 @@ U_NAMESPACE_BEGIN class FieldPositionIteratorHandler; +class SimpleDateFormat; namespace number { // icu::number @@ -140,19 +141,15 @@ class U_I18N_API FormattedNumber : public UMemory, public FormattedValue { */ MeasureUnit getOutputUnit(UErrorCode& status) const; -#ifndef U_HIDE_DRAFT_API - /** * Gets the noun class of the formatted output. Returns `UNDEFINED` when the noun class * is not supported yet. * * @return UDisplayOptionsNounClass - * @draft ICU 72 + * @stable ICU 72 */ UDisplayOptionsNounClass getNounClass(UErrorCode &status) const; -#endif // U_HIDE_DRAFT_API - #ifndef U_HIDE_INTERNAL_API /** @@ -194,6 +191,9 @@ class U_I18N_API FormattedNumber : public UMemory, public FormattedValue { // To give C API access to internals friend struct impl::UFormattedNumberImpl; + + // To give access to the data pointer for non-heap allocation + friend class icu::SimpleDateFormat; }; template<typename StringClass> diff --git a/contrib/libs/icu/include/unicode/fpositer.h b/contrib/libs/icu/include/unicode/fpositer.h index 0e38d0b78b..cae0dafd29 100644 --- a/contrib/libs/icu/include/unicode/fpositer.h +++ b/contrib/libs/icu/include/unicode/fpositer.h @@ -67,7 +67,7 @@ public: * Constructs a new, empty iterator. * @stable ICU 4.4 */ - FieldPositionIterator(void); + FieldPositionIterator(); /** * Copy constructor. If the copy failed for some reason, the new iterator will diff --git a/contrib/libs/icu/include/unicode/gregocal.h b/contrib/libs/icu/include/unicode/gregocal.h index b85deb5ecf..5112548522 100644 --- a/contrib/libs/icu/include/unicode/gregocal.h +++ b/contrib/libs/icu/include/unicode/gregocal.h @@ -324,7 +324,7 @@ public: * @return The Gregorian cutover time for this calendar. * @stable ICU 2.0 */ - UDate getGregorianChange(void) const; + UDate getGregorianChange() const; /** * Return true if the given year is a leap year. Determination of whether a year is @@ -435,7 +435,7 @@ public: * same class ID. Objects of other classes have different class IDs. * @stable ICU 2.0 */ - virtual UClassID getDynamicClassID(void) const override; + virtual UClassID getDynamicClassID() const override; /** * Return the class ID for this class. This is useful only for comparing to a return @@ -448,7 +448,7 @@ public: * @return The class ID for all objects of this class. * @stable ICU 2.0 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * Returns the calendar type name string for this Calendar object. @@ -483,22 +483,24 @@ public: * @param useMonth if false, compute the day before the first day of * the given year, otherwise, compute the day before the first day of * the given month + * @param status Fill-in parameter which receives the status of this operation. * @return the Julian day number of the day before the first * day of the given month and year * @internal */ - virtual int32_t handleComputeMonthStart(int32_t eyear, int32_t month, - UBool useMonth) const override; + virtual int64_t handleComputeMonthStart(int32_t eyear, int32_t month, + UBool useMonth, UErrorCode& status) const override; /** * Subclasses may override this. This method calls * handleGetMonthLength() to obtain the calendar-specific month * length. * @param bestField which field to use to calculate the date + * @param status Fill-in parameter which receives the status of this operation. * @return julian day specified by calendar fields. * @internal */ - virtual int32_t handleComputeJulianDay(UCalendarDateFields bestField) override; + virtual int32_t handleComputeJulianDay(UCalendarDateFields bestField, UErrorCode& status) override; /** * Return the number of days in the given month of the given extended @@ -507,7 +509,7 @@ public: * implementation than the default implementation in Calendar. * @internal */ - virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month) const override; + virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month, UErrorCode& status) const override; /** * Return the number of days in the given extended year of this @@ -521,10 +523,11 @@ public: /** * return the length of the given month. * @param month the given month. + * @param status Fill-in parameter which receives the status of this operation. * @return the length of the given month. * @internal */ - virtual int32_t monthLength(int32_t month) const; + virtual int32_t monthLength(int32_t month, UErrorCode& status) const; /** * return the length of the month according to the given year. @@ -537,28 +540,12 @@ public: #ifndef U_HIDE_INTERNAL_API /** - * return the length of the given year. - * @param year the given year. - * @return the length of the given year. - * @internal - */ - int32_t yearLength(int32_t year) const; - - /** * return the length of the year field. * @return the length of the year field * @internal */ - int32_t yearLength(void) const; + int32_t yearLength() const; - /** - * After adjustments such as add(MONTH), add(YEAR), we don't want the - * month to jump around. E.g., we don't want Jan 31 + 1 month to go to Mar - * 3, we want it to go to Feb 28. Adjustments which might run into this - * problem call this method to retain the proper month. - * @internal - */ - void pinDayOfMonth(void); #endif /* U_HIDE_INTERNAL_API */ /** @@ -598,10 +585,11 @@ public: * use the UCAL_EXTENDED_YEAR field or the UCAL_YEAR and supra-year fields (such * as UCAL_ERA) specific to the calendar system, depending on which set of * fields is newer. + * @param status * @return the extended year * @internal */ - virtual int32_t handleGetExtendedYear() override; + virtual int32_t handleGetExtendedYear(UErrorCode& status) override; /** * Subclasses may override this to convert from week fields @@ -611,7 +599,7 @@ public: * @return the extended year, UCAL_EXTENDED_YEAR * @internal */ - virtual int32_t handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t woy) override; + virtual int32_t handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t woy, UErrorCode& status) override; /** @@ -631,6 +619,15 @@ public: */ virtual void handleComputeFields(int32_t julianDay, UErrorCode &status) override; +#ifndef U_HIDE_INTERNAL_API + /** + * The year in this calendar is counting from 1 backward if the era is 0. + * @return The year in era 0 of this calendar is counting backward from 1. + * @internal + */ + virtual bool isEra0CountingBackward() const override { return true; } +#endif // U_HIDE_INTERNAL_API + private: /** * Compute the julian day number of the given year. @@ -646,7 +643,7 @@ public: * Validates the values of the set time fields. True if they're all valid. * @return True if the set time fields are all valid. */ - UBool validateFields(void) const; + UBool validateFields() const; /** * Validates the value of the given time field. True if it's valid. @@ -725,23 +722,8 @@ public: public: // internal implementation - /** - * @return true if this calendar has the notion of a default century - * @internal - */ - virtual UBool haveDefaultCentury() const override; - - /** - * @return the start of the default century - * @internal - */ - virtual UDate defaultCenturyStart() const override; + DECLARE_OVERRIDE_SYSTEM_DEFAULT_CENTURY - /** - * @return the beginning year of the default century - * @internal - */ - virtual int32_t defaultCenturyStartYear() const override; }; U_NAMESPACE_END diff --git a/contrib/libs/icu/include/unicode/localematcher.h b/contrib/libs/icu/include/unicode/localematcher.h index 603daf7231..e16f1a31ca 100644 --- a/contrib/libs/icu/include/unicode/localematcher.h +++ b/contrib/libs/icu/include/unicode/localematcher.h @@ -11,6 +11,8 @@ #if U_SHOW_CPLUSPLUS_API +#include <optional> + #include "unicode/locid.h" #include "unicode/stringpiece.h" #include "unicode/uobject.h" @@ -133,10 +135,10 @@ U_NAMESPACE_BEGIN struct LSR; +class LikelySubtags; class LocaleDistance; class LocaleLsrIterator; class UVector; -class XLikelySubtags; /** * Immutable class that picks the best match between a user's desired locales and @@ -678,9 +680,9 @@ private: int32_t putIfAbsent(const LSR &lsr, int32_t i, int32_t suppLength, UErrorCode &errorCode); - int32_t getBestSuppIndex(LSR desiredLSR, LocaleLsrIterator *remainingIter, UErrorCode &errorCode) const; + std::optional<int32_t> getBestSuppIndex(LSR desiredLSR, LocaleLsrIterator *remainingIter, UErrorCode &errorCode) const; - const XLikelySubtags &likelySubtags; + const LikelySubtags &likelySubtags; const LocaleDistance &localeDistance; int32_t thresholdDistance; int32_t demotionPerDesiredLocale; diff --git a/contrib/libs/icu/include/unicode/localpointer.h b/contrib/libs/icu/include/unicode/localpointer.h index b8be3d7942..9c891bf308 100644 --- a/contrib/libs/icu/include/unicode/localpointer.h +++ b/contrib/libs/icu/include/unicode/localpointer.h @@ -162,11 +162,11 @@ protected: T *ptr; private: // No comparison operators with other LocalPointerBases. - bool operator==(const LocalPointerBase<T> &other); - bool operator!=(const LocalPointerBase<T> &other); + bool operator==(const LocalPointerBase<T> &other) = delete; + bool operator!=(const LocalPointerBase<T> &other) = delete; // No ownership sharing: No copy constructor, no assignment operator. - LocalPointerBase(const LocalPointerBase<T> &other); - void operator=(const LocalPointerBase<T> &other); + LocalPointerBase(const LocalPointerBase<T> &other) = delete; + void operator=(const LocalPointerBase<T> &other) = delete; }; /** @@ -548,46 +548,60 @@ public: * @stable ICU 4.4 */ #define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction) \ - class LocalPointerClassName : public LocalPointerBase<Type> { \ - public: \ - using LocalPointerBase<Type>::operator*; \ - using LocalPointerBase<Type>::operator->; \ - explicit LocalPointerClassName(Type *p=nullptr) : LocalPointerBase<Type>(p) {} \ - LocalPointerClassName(LocalPointerClassName &&src) noexcept \ - : LocalPointerBase<Type>(src.ptr) { \ - src.ptr=nullptr; \ - } \ - /* TODO: Be agnostic of the deleter function signature from the user-provided std::unique_ptr? */ \ - explicit LocalPointerClassName(std::unique_ptr<Type, decltype(&closeFunction)> &&p) \ - : LocalPointerBase<Type>(p.release()) {} \ - ~LocalPointerClassName() { if (ptr != nullptr) { closeFunction(ptr); } } \ - LocalPointerClassName &operator=(LocalPointerClassName &&src) noexcept { \ - if (ptr != nullptr) { closeFunction(ptr); } \ - LocalPointerBase<Type>::ptr=src.ptr; \ - src.ptr=nullptr; \ - return *this; \ - } \ - /* TODO: Be agnostic of the deleter function signature from the user-provided std::unique_ptr? */ \ - LocalPointerClassName &operator=(std::unique_ptr<Type, decltype(&closeFunction)> &&p) { \ - adoptInstead(p.release()); \ - return *this; \ - } \ - void swap(LocalPointerClassName &other) noexcept { \ - Type *temp=LocalPointerBase<Type>::ptr; \ - LocalPointerBase<Type>::ptr=other.ptr; \ - other.ptr=temp; \ - } \ - friend inline void swap(LocalPointerClassName &p1, LocalPointerClassName &p2) noexcept { \ - p1.swap(p2); \ - } \ - void adoptInstead(Type *p) { \ - if (ptr != nullptr) { closeFunction(ptr); } \ - ptr=p; \ - } \ - operator std::unique_ptr<Type, decltype(&closeFunction)> () && { \ - return std::unique_ptr<Type, decltype(&closeFunction)>(LocalPointerBase<Type>::orphan(), closeFunction); \ - } \ + using LocalPointerClassName = internal::LocalOpenPointer<Type, closeFunction> + +#ifndef U_IN_DOXYGEN +namespace internal { +/** + * Implementation, do not use directly: use U_DEFINE_LOCAL_OPEN_POINTER. + * + * @see U_DEFINE_LOCAL_OPEN_POINTER + * @internal + */ +template <typename Type, auto closeFunction> +class LocalOpenPointer : public LocalPointerBase<Type> { + using LocalPointerBase<Type>::ptr; +public: + using LocalPointerBase<Type>::operator*; + using LocalPointerBase<Type>::operator->; + explicit LocalOpenPointer(Type *p=nullptr) : LocalPointerBase<Type>(p) {} + LocalOpenPointer(LocalOpenPointer &&src) noexcept + : LocalPointerBase<Type>(src.ptr) { + src.ptr=nullptr; + } + /* TODO: Be agnostic of the deleter function signature from the user-provided std::unique_ptr? */ + explicit LocalOpenPointer(std::unique_ptr<Type, decltype(closeFunction)> &&p) + : LocalPointerBase<Type>(p.release()) {} + ~LocalOpenPointer() { if (ptr != nullptr) { closeFunction(ptr); } } + LocalOpenPointer &operator=(LocalOpenPointer &&src) noexcept { + if (ptr != nullptr) { closeFunction(ptr); } + LocalPointerBase<Type>::ptr=src.ptr; + src.ptr=nullptr; + return *this; + } + /* TODO: Be agnostic of the deleter function signature from the user-provided std::unique_ptr? */ + LocalOpenPointer &operator=(std::unique_ptr<Type, decltype(closeFunction)> &&p) { + adoptInstead(p.release()); + return *this; + } + void swap(LocalOpenPointer &other) noexcept { + Type *temp=LocalPointerBase<Type>::ptr; + LocalPointerBase<Type>::ptr=other.ptr; + other.ptr=temp; + } + friend inline void swap(LocalOpenPointer &p1, LocalOpenPointer &p2) noexcept { + p1.swap(p2); } + void adoptInstead(Type *p) { + if (ptr != nullptr) { closeFunction(ptr); } + ptr=p; + } + operator std::unique_ptr<Type, decltype(closeFunction)> () && { + return std::unique_ptr<Type, decltype(closeFunction)>(LocalPointerBase<Type>::orphan(), closeFunction); + } +}; +} // namespace internal +#endif U_NAMESPACE_END diff --git a/contrib/libs/icu/include/unicode/locid.h b/contrib/libs/icu/include/unicode/locid.h index a6fbbb7041..60282d623d 100644 --- a/contrib/libs/icu/include/unicode/locid.h +++ b/contrib/libs/icu/include/unicode/locid.h @@ -195,51 +195,50 @@ class UnicodeString; class U_COMMON_API Locale : public UObject { public: /** Useful constant for the Root locale. @stable ICU 4.4 */ - static const Locale &U_EXPORT2 getRoot(void); + static const Locale& U_EXPORT2 getRoot(); /** Useful constant for this language. @stable ICU 2.0 */ - static const Locale &U_EXPORT2 getEnglish(void); + static const Locale& U_EXPORT2 getEnglish(); /** Useful constant for this language. @stable ICU 2.0 */ - static const Locale &U_EXPORT2 getFrench(void); + static const Locale& U_EXPORT2 getFrench(); /** Useful constant for this language. @stable ICU 2.0 */ - static const Locale &U_EXPORT2 getGerman(void); + static const Locale& U_EXPORT2 getGerman(); /** Useful constant for this language. @stable ICU 2.0 */ - static const Locale &U_EXPORT2 getItalian(void); + static const Locale& U_EXPORT2 getItalian(); /** Useful constant for this language. @stable ICU 2.0 */ - static const Locale &U_EXPORT2 getJapanese(void); + static const Locale& U_EXPORT2 getJapanese(); /** Useful constant for this language. @stable ICU 2.0 */ - static const Locale &U_EXPORT2 getKorean(void); + static const Locale& U_EXPORT2 getKorean(); /** Useful constant for this language. @stable ICU 2.0 */ - static const Locale &U_EXPORT2 getChinese(void); + static const Locale& U_EXPORT2 getChinese(); /** Useful constant for this language. @stable ICU 2.0 */ - static const Locale &U_EXPORT2 getSimplifiedChinese(void); + static const Locale& U_EXPORT2 getSimplifiedChinese(); /** Useful constant for this language. @stable ICU 2.0 */ - static const Locale &U_EXPORT2 getTraditionalChinese(void); + static const Locale& U_EXPORT2 getTraditionalChinese(); /** Useful constant for this country/region. @stable ICU 2.0 */ - static const Locale &U_EXPORT2 getFrance(void); + static const Locale& U_EXPORT2 getFrance(); /** Useful constant for this country/region. @stable ICU 2.0 */ - static const Locale &U_EXPORT2 getGermany(void); + static const Locale& U_EXPORT2 getGermany(); /** Useful constant for this country/region. @stable ICU 2.0 */ - static const Locale &U_EXPORT2 getItaly(void); + static const Locale& U_EXPORT2 getItaly(); /** Useful constant for this country/region. @stable ICU 2.0 */ - static const Locale &U_EXPORT2 getJapan(void); + static const Locale& U_EXPORT2 getJapan(); /** Useful constant for this country/region. @stable ICU 2.0 */ - static const Locale &U_EXPORT2 getKorea(void); + static const Locale& U_EXPORT2 getKorea(); /** Useful constant for this country/region. @stable ICU 2.0 */ - static const Locale &U_EXPORT2 getChina(void); + static const Locale& U_EXPORT2 getChina(); /** Useful constant for this country/region. @stable ICU 2.0 */ - static const Locale &U_EXPORT2 getPRC(void); + static const Locale& U_EXPORT2 getPRC(); /** Useful constant for this country/region. @stable ICU 2.0 */ - static const Locale &U_EXPORT2 getTaiwan(void); + static const Locale& U_EXPORT2 getTaiwan(); /** Useful constant for this country/region. @stable ICU 2.0 */ - static const Locale &U_EXPORT2 getUK(void); + static const Locale& U_EXPORT2 getUK(); /** Useful constant for this country/region. @stable ICU 2.0 */ - static const Locale &U_EXPORT2 getUS(void); + static const Locale& U_EXPORT2 getUS(); /** Useful constant for this country/region. @stable ICU 2.0 */ - static const Locale &U_EXPORT2 getCanada(void); + static const Locale& U_EXPORT2 getCanada(); /** Useful constant for this country/region. @stable ICU 2.0 */ - static const Locale &U_EXPORT2 getCanadaFrench(void); - + static const Locale& U_EXPORT2 getCanadaFrench(); /** * Construct a default locale object, a Locale for the default locale ID. @@ -274,10 +273,10 @@ public: * @see uloc_getDefault * @stable ICU 2.0 */ - Locale( const char * language, - const char * country = 0, - const char * variant = 0, - const char * keywordsAndValues = 0); + Locale(const char* language, + const char* country = nullptr, + const char* variant = nullptr, + const char* keywordsAndValues = nullptr); /** * Initializes a Locale object from another Locale object. @@ -370,7 +369,7 @@ public: * @system * @stable ICU 2.0 */ - static const Locale& U_EXPORT2 getDefault(void); + static const Locale& U_EXPORT2 getDefault(); /** * Sets the default. Normally set once at the beginning of a process, @@ -518,20 +517,20 @@ public: * If this Locale is already in the maximal form, or not valid, or there is * no data available for maximization, the Locale will be unchanged. * - * For example, "und-Zzzz" cannot be maximized, since there is no + * For example, "sh" cannot be maximized, since there is no * reasonable maximization. * * Examples: * + * "und_Zzzz" maximizes to "en_Latn_US" + * * "en" maximizes to "en_Latn_US" * - * "de" maximizes to "de_Latn_US" + * "de" maximizes to "de_Latn_DE" * * "sr" maximizes to "sr_Cyrl_RS" * - * "sh" maximizes to "sr_Latn_RS" (Note this will not reverse.) - * - * "zh_Hani" maximizes to "zh_Hans_CN" (Note this will not reverse.) + * "zh_Hani" maximizes to "zh_Hani_CN" * * @param status error information if maximizing this Locale failed. * If this Locale is not well-formed, the error code is @@ -792,7 +791,7 @@ public: * there is no Windows LCID value that corresponds to this locale, returns 0. * @stable ICU 2.0 */ - uint32_t getLCID(void) const; + uint32_t getLCID() const; /** * Returns whether this locale's script is written right-to-left. @@ -944,7 +943,7 @@ public: * Generates a hash code for the locale. * @stable ICU 2.0 */ - int32_t hashCode(void) const; + int32_t hashCode() const; /** * Sets the locale to bogus @@ -961,7 +960,7 @@ public: * @return false if it is a real locale, true if it is a bogus locale * @stable ICU 2.1 */ - inline UBool isBogus(void) const; + inline UBool isBogus() const; /** * Returns a list of all installed locales. @@ -984,7 +983,10 @@ public: static const char* const* U_EXPORT2 getISOCountries(); /** - * Gets a list of all available language codes defined in ISO 639. This is a pointer + * Returns a list of all unique language codes defined in ISO 639. + * They can be 2 or 3 letter codes, as defined by + * <a href="https://www.ietf.org/rfc/bcp/bcp47.html#section-2.2.1"> + * BCP 47, section 2.2.1</a>. This is a pointer * to an array of pointers to arrays of char. All of these pointers are owned * by ICU-- do not delete them, and do not write through them. The array is * terminated with a null pointer. @@ -1110,6 +1112,15 @@ protected: /* only protected for testing purposes. DO NOT USE. */ * @internal */ void setFromPOSIXID(const char *posixID); + /** + * Minimize the subtags for this Locale, per the algorithm described + * @param favorScript favor to keep script if true, to keep region if false. + * @param status error information if maximizing this Locale failed. + * If this Locale is not well-formed, the error code is + * U_ILLEGAL_ARGUMENT_ERROR. + * @internal + */ + void minimizeSubtags(bool favorScript, UErrorCode& status); #endif /* U_HIDE_INTERNAL_API */ private: @@ -1135,7 +1146,7 @@ private: /** * Initialize the locale cache for commonly used locales */ - static Locale *getLocaleCache(void); + static Locale* getLocaleCache(); char language[ULOC_LANG_CAPACITY]; char script[ULOC_SCRIPT_CAPACITY]; @@ -1172,6 +1183,7 @@ Locale::operator!=(const Locale& other) const template<typename StringClass> inline StringClass Locale::toLanguageTag(UErrorCode& status) const { + if (U_FAILURE(status)) { return {}; } StringClass result; StringByteSink<StringClass> sink(&result); toLanguageTag(sink, status); @@ -1199,7 +1211,7 @@ Locale::getScript() const inline const char * Locale::getVariant() const { - return &baseName[variantBegin]; + return fIsBogus ? "" : &baseName[variantBegin]; } inline const char * @@ -1211,6 +1223,7 @@ Locale::getName() const template<typename StringClass, typename OutputIterator> inline void Locale::getKeywords(OutputIterator iterator, UErrorCode& status) const { + if (U_FAILURE(status)) { return; } LocalPointer<StringEnumeration> keys(createKeywords(status)); if (U_FAILURE(status) || keys.isNull()) { return; @@ -1228,6 +1241,7 @@ Locale::getKeywords(OutputIterator iterator, UErrorCode& status) const template<typename StringClass, typename OutputIterator> inline void Locale::getUnicodeKeywords(OutputIterator iterator, UErrorCode& status) const { + if (U_FAILURE(status)) { return; } LocalPointer<StringEnumeration> keys(createUnicodeKeywords(status)); if (U_FAILURE(status) || keys.isNull()) { return; @@ -1245,6 +1259,7 @@ Locale::getUnicodeKeywords(OutputIterator iterator, UErrorCode& status) const template<typename StringClass> inline StringClass Locale::getKeywordValue(StringPiece keywordName, UErrorCode& status) const { + if (U_FAILURE(status)) { return {}; } StringClass result; StringByteSink<StringClass> sink(&result); getKeywordValue(keywordName, sink, status); @@ -1254,6 +1269,7 @@ Locale::getKeywordValue(StringPiece keywordName, UErrorCode& status) const template<typename StringClass> inline StringClass Locale::getUnicodeKeywordValue(StringPiece keywordName, UErrorCode& status) const { + if (U_FAILURE(status)) { return {}; } StringClass result; StringByteSink<StringClass> sink(&result); getUnicodeKeywordValue(keywordName, sink, status); @@ -1261,7 +1277,7 @@ Locale::getUnicodeKeywordValue(StringPiece keywordName, UErrorCode& status) cons } inline UBool -Locale::isBogus(void) const { +Locale::isBogus() const { return fIsBogus; } diff --git a/contrib/libs/icu/include/unicode/measfmt.h b/contrib/libs/icu/include/unicode/measfmt.h index 59bf546a90..c9894f0b59 100644 --- a/contrib/libs/icu/include/unicode/measfmt.h +++ b/contrib/libs/icu/include/unicode/measfmt.h @@ -273,7 +273,7 @@ class U_I18N_API MeasureFormat : public Format { * @return The class ID for all objects of this class. * @stable ICU 53 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This @@ -286,7 +286,7 @@ class U_I18N_API MeasureFormat : public Format { * other classes have different class IDs. * @stable ICU 53 */ - virtual UClassID getDynamicClassID(void) const override; + virtual UClassID getDynamicClassID() const override; protected: /** diff --git a/contrib/libs/icu/include/unicode/measunit.h b/contrib/libs/icu/include/unicode/measunit.h index f7acc6990b..9ce9b1a65d 100644 --- a/contrib/libs/icu/include/unicode/measunit.h +++ b/contrib/libs/icu/include/unicode/measunit.h @@ -33,11 +33,9 @@ U_NAMESPACE_BEGIN class StringEnumeration; class MeasureUnitImpl; -namespace number { -namespace impl { +namespace number::impl { class LongNameHandler; -} -} // namespace number +} // namespace number::impl /** * Enumeration for unit complexity. There are three levels: @@ -107,13 +105,34 @@ typedef enum UMeasurePrefix { */ UMEASURE_PREFIX_YOTTA = UMEASURE_PREFIX_ONE + 24, +#ifndef U_HIDE_DRAFT_API + /** + * SI prefix: ronna, 10^27. + * + * @draft ICU 75 + */ + UMEASURE_PREFIX_RONNA = UMEASURE_PREFIX_ONE + 27, + + /** + * SI prefix: quetta, 10^30. + * + * @draft ICU 75 + */ + UMEASURE_PREFIX_QUETTA = UMEASURE_PREFIX_ONE + 30, +#endif /* U_HIDE_DRAFT_API */ + #ifndef U_HIDE_INTERNAL_API /** * ICU use only. * Used to determine the set of base-10 SI prefixes. * @internal */ +#ifndef U_HIDE_DRAFT_API + UMEASURE_PREFIX_INTERNAL_MAX_SI = UMEASURE_PREFIX_QUETTA, +#else /* U_HIDE_DRAFT_API */ UMEASURE_PREFIX_INTERNAL_MAX_SI = UMEASURE_PREFIX_YOTTA, +#endif /* U_HIDE_DRAFT_API */ + #endif /* U_HIDE_INTERNAL_API */ /** @@ -249,13 +268,34 @@ typedef enum UMeasurePrefix { */ UMEASURE_PREFIX_YOCTO = UMEASURE_PREFIX_ONE + -24, +#ifndef U_HIDE_DRAFT_API + /** + * SI prefix: ronto, 10^-27. + * + * @draft ICU 75 + */ + UMEASURE_PREFIX_RONTO = UMEASURE_PREFIX_ONE + -27, + + /** + * SI prefix: quecto, 10^-30. + * + * @draft ICU 75 + */ + UMEASURE_PREFIX_QUECTO = UMEASURE_PREFIX_ONE + -30, +#endif /* U_HIDE_DRAFT_API */ + #ifndef U_HIDE_INTERNAL_API /** * ICU use only. * Used to determine the set of base-10 SI prefixes. * @internal */ +#ifndef U_HIDE_DRAFT_API + UMEASURE_PREFIX_INTERNAL_MIN_SI = UMEASURE_PREFIX_QUECTO, +#else /* U_HIDE_DRAFT_API */ UMEASURE_PREFIX_INTERNAL_MIN_SI = UMEASURE_PREFIX_YOCTO, +#endif /* U_HIDE_DRAFT_API */ + #endif // U_HIDE_INTERNAL_API // Cannot conditionalize the following with #ifndef U_HIDE_INTERNAL_API, @@ -371,7 +411,8 @@ class U_I18N_API MeasureUnit: public UObject { /** * Default constructor. - * Populates the instance with the base dimensionless unit. + * Populates the instance with the base dimensionless unit, which means that there will be + * no unit on the formatted number. * @stable ICU 3.0 */ MeasureUnit(); @@ -647,7 +688,7 @@ class U_I18N_API MeasureUnit: public UObject { * @return The class ID for all objects of this class. * @stable ICU 53 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This @@ -660,7 +701,7 @@ class U_I18N_API MeasureUnit: public UObject { * other classes have different class IDs. * @stable ICU 53 */ - virtual UClassID getDynamicClassID(void) const override; + virtual UClassID getDynamicClassID() const override; #ifndef U_HIDE_INTERNAL_API /** @@ -1527,23 +1568,21 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit getNanosecond(); -#ifndef U_HIDE_DRAFT_API /** * Returns by pointer, unit of duration: quarter. * Caller owns returned value and must free it. * Also see {@link #getQuarter()}. * @param status ICU error code. - * @draft ICU 72 + * @stable ICU 72 */ static MeasureUnit *createQuarter(UErrorCode &status); /** * Returns by value, unit of duration: quarter. * Also see {@link #createQuarter()}. - * @draft ICU 72 + * @stable ICU 72 */ static MeasureUnit getQuarter(); -#endif /* U_HIDE_DRAFT_API */ /** * Returns by pointer, unit of duration: second. @@ -2737,23 +2776,21 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit getTon(); -#ifndef U_HIDE_DRAFT_API /** * Returns by pointer, unit of mass: tonne. * Caller owns returned value and must free it. * Also see {@link #getTonne()}. * @param status ICU error code. - * @draft ICU 72 + * @stable ICU 72 */ static MeasureUnit *createTonne(UErrorCode &status); /** * Returns by value, unit of mass: tonne. * Also see {@link #createTonne()}. - * @draft ICU 72 + * @stable ICU 72 */ static MeasureUnit getTonne(); -#endif /* U_HIDE_DRAFT_API */ /** * Returns by pointer, unit of power: gigawatt. @@ -2883,6 +2920,24 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit getBar(); +#ifndef U_HIDE_DRAFT_API + /** + * Returns by pointer, unit of pressure: gasoline-energy-density. + * Caller owns returned value and must free it. + * Also see {@link #getGasolineEnergyDensity()}. + * @param status ICU error code. + * @draft ICU 74 + */ + static MeasureUnit *createGasolineEnergyDensity(UErrorCode &status); + + /** + * Returns by value, unit of pressure: gasoline-energy-density. + * Also see {@link #createGasolineEnergyDensity()}. + * @draft ICU 74 + */ + static MeasureUnit getGasolineEnergyDensity(); +#endif /* U_HIDE_DRAFT_API */ + /** * Returns by pointer, unit of pressure: hectopascal. * Caller owns returned value and must free it. @@ -3011,23 +3066,21 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit getPoundPerSquareInch(); -#ifndef U_HIDE_DRAFT_API /** * Returns by pointer, unit of speed: beaufort. * Caller owns returned value and must free it. * Also see {@link #getBeaufort()}. * @param status ICU error code. - * @draft ICU 73 + * @stable ICU 73 */ static MeasureUnit *createBeaufort(UErrorCode &status); /** * Returns by value, unit of speed: beaufort. * Also see {@link #createBeaufort()}. - * @draft ICU 73 + * @stable ICU 73 */ static MeasureUnit getBeaufort(); -#endif /* U_HIDE_DRAFT_API */ /** * Returns by pointer, unit of speed: kilometer-per-hour. diff --git a/contrib/libs/icu/include/unicode/measure.h b/contrib/libs/icu/include/unicode/measure.h index 31f931d7d4..86d7b51211 100644 --- a/contrib/libs/icu/include/unicode/measure.h +++ b/contrib/libs/icu/include/unicode/measure.h @@ -89,6 +89,16 @@ class U_I18N_API Measure: public UObject { */ bool operator==(const UObject& other) const; +#ifndef U_HIDE_DRAFT_API + /** + * Inequality operator. Returns true if this object is not equal to the other object. + * @param other the object to compare with + * @return true if the objects are not equal + * @draft ICU 74 + */ + inline bool operator!=(const UObject& other) const { return !operator==(other); } +#endif // U_HIDE_DRAFT_API + /** * Return a reference to the numeric value of this object. The * numeric value may be of any numeric type supported by @@ -114,7 +124,7 @@ class U_I18N_API Measure: public UObject { * @return The class ID for all objects of this class. * @stable ICU 53 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This @@ -127,7 +137,7 @@ class U_I18N_API Measure: public UObject { * other classes have different class IDs. * @stable ICU 53 */ - virtual UClassID getDynamicClassID(void) const override; + virtual UClassID getDynamicClassID() const override; protected: /** diff --git a/contrib/libs/icu/include/unicode/messageformat2.h b/contrib/libs/icu/include/unicode/messageformat2.h new file mode 100644 index 0000000000..d23ac8409d --- /dev/null +++ b/contrib/libs/icu/include/unicode/messageformat2.h @@ -0,0 +1,399 @@ +// © 2024 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#ifndef MESSAGEFORMAT2_H +#define MESSAGEFORMAT2_H + +#if U_SHOW_CPLUSPLUS_API + +#if !UCONFIG_NO_FORMATTING + +#if !UCONFIG_NO_MF2 + +/** + * \file + * \brief C++ API: Formats messages using the draft MessageFormat 2.0. + */ + +#include "unicode/messageformat2_arguments.h" +#include "unicode/messageformat2_data_model.h" +#include "unicode/messageformat2_function_registry.h" +#include "unicode/unistr.h" + +#ifndef U_HIDE_DEPRECATED_API + +U_NAMESPACE_BEGIN + +namespace message2 { + + class Environment; + class MessageContext; + class ResolvedSelector; + class StaticErrors; + + /** + * <p>MessageFormatter is a Technical Preview API implementing MessageFormat 2.0. + * + * <p>See <a target="github" href="https://github.com/unicode-org/message-format-wg/blob/main/spec/syntax.md">the + * description of the syntax with examples and use cases</a> and the corresponding + * <a target="github" href="https://github.com/unicode-org/message-format-wg/blob/main/spec/message.abnf">ABNF</a> grammar.</p> + * + * The MessageFormatter class is mutable and movable. It is not copyable. + * (It is mutable because if it has a custom function registry, the registry may include + * `FormatterFactory` objects implementing custom formatters, which are allowed to contain + * mutable state.) + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API MessageFormatter : public UObject { + // Note: This class does not currently inherit from the existing + // `Format` class. + public: + /** + * Move assignment operator: + * The source MessageFormatter will be left in a valid but undefined state. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + MessageFormatter& operator=(MessageFormatter&&) noexcept; + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~MessageFormatter(); + + /** + * Formats the message to a string, using the data model that was previously set or parsed, + * and the given `arguments` object. + * + * @param arguments Reference to message arguments + * @param status Input/output error code used to indicate syntax errors, data model + * errors, resolution errors, formatting errors, selection errors, as well + * as other errors (such as memory allocation failures). Partial output + * is still provided in the presence of most error types. + * @return The string result of formatting the message with the given arguments. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + UnicodeString formatToString(const MessageArguments& arguments, UErrorCode &status); + + /** + * Not yet implemented; formats the message to a `FormattedMessage` object, + * using the data model that was previously set or parsed, + * and the given `arguments` object. + * + * @param arguments Reference to message arguments + * @param status Input/output error code used to indicate syntax errors, data model + * errors, resolution errors, formatting errors, selection errors, as well + * as other errors (such as memory allocation failures). Partial output + * is still provided in the presence of most error types. + * @return The `FormattedMessage` representing the formatted message. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + FormattedMessage format(const MessageArguments& arguments, UErrorCode &status) const { + (void) arguments; + if (U_SUCCESS(status)) { + status = U_UNSUPPORTED_ERROR; + } + return FormattedMessage(status); + } + + /** + * Accesses the locale that this `MessageFormatter` object was created with. + * + * @return A reference to the locale. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const Locale& getLocale() const { return locale; } + + /** + * Serializes the data model as a string in MessageFormat 2.0 syntax. + * + * @return result A string representation of the data model. + * The string is a valid MessageFormat 2.0 message. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + UnicodeString getPattern() const; + + /** + * Accesses the data model referred to by this + * `MessageFormatter` object. + * + * @return A reference to the data model. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const MFDataModel& getDataModel() const; + + /** + * The mutable Builder class allows each part of the MessageFormatter to be initialized + * separately; calling its `build()` method yields an immutable MessageFormatter. + * + * Not copyable or movable. + */ + class U_I18N_API Builder : public UObject { + private: + friend class MessageFormatter; + + // The pattern to be parsed to generate the formatted message + UnicodeString pattern; + bool hasPattern = false; + bool hasDataModel = false; + // The data model to be used to generate the formatted message + // Initialized either by `setDataModel()`, or by the parser + // through a call to `setPattern()` + MFDataModel dataModel; + // Normalized representation of the pattern; + // ignored if `setPattern()` wasn't called + UnicodeString normalizedInput; + // Errors (internal representation of parse errors) + // Ignored if `setPattern()` wasn't called + StaticErrors* errors; + Locale locale; + // Not owned + const MFFunctionRegistry* customMFFunctionRegistry; + + public: + /** + * Sets the locale to use for formatting. + * + * @param locale The desired locale. + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& setLocale(const Locale& locale); + /** + * Sets the pattern (contents of the message) and parses it + * into a data model. If a data model was + * previously set, it is removed. + * + * @param pattern A string in MessageFormat 2.0 syntax. + * @param parseError Struct to receive information on the position + * of an error within the pattern. + * @param status Input/output error code. If the + * pattern cannot be parsed, set to failure code. + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& setPattern(const UnicodeString& pattern, UParseError& parseError, UErrorCode& status); + /** + * Sets a custom function registry. + * + * @param functionRegistry Reference to the function registry to use. + * `functionRegistry` is not copied, + * and the caller must ensure its lifetime contains + * the lifetime of the `MessageFormatter` object built by this + * builder. + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& setFunctionRegistry(const MFFunctionRegistry& functionRegistry); + /** + * Sets a data model. If a pattern was previously set, it is removed. + * + * @param dataModel Data model to format. Passed by move. + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& setDataModel(MFDataModel&& dataModel); + /** + * Constructs a new immutable MessageFormatter using the pattern or data model + * that was previously set, and the locale (if it was previously set) + * or default locale (otherwise). + * + * The builder object (`this`) can still be used after calling `build()`. + * + * @param status Input/output error code. If neither the pattern + * nor the data model is set, set to failure code. + * @return The new MessageFormatter object + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + MessageFormatter build(UErrorCode& status) const; + /** + * Default constructor. + * Returns a Builder with the default locale and with no + * data model or pattern set. Either `setPattern()` + * or `setDataModel()` has to be called before calling `build()`. + * + * @param status Input/output error code. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder(UErrorCode& status); + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~Builder(); + }; // class MessageFormatter::Builder + + // TODO: Shouldn't be public; only used for testing + /** + * Returns a string consisting of the input with optional spaces removed. + * + * @return A normalized string representation of the input + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const UnicodeString& getNormalizedPattern() const { return normalizedInput; } + + private: + friend class Builder; + friend class MessageContext; + + MessageFormatter(const MessageFormatter::Builder& builder, UErrorCode &status); + + MessageFormatter() = delete; // default constructor not implemented + + // Do not define default assignment operator + const MessageFormatter &operator=(const MessageFormatter &) = delete; + + ResolvedSelector resolveVariables(const Environment& env, const data_model::Operand&, MessageContext&, UErrorCode &) const; + ResolvedSelector resolveVariables(const Environment& env, const data_model::Expression&, MessageContext&, UErrorCode &) const; + + // Selection methods + + // Takes a vector of FormattedPlaceholders + void resolveSelectors(MessageContext&, const Environment& env, UErrorCode&, UVector&) const; + // Takes a vector of vectors of strings (input) and a vector of PrioritizedVariants (output) + void filterVariants(const UVector&, UVector&, UErrorCode&) const; + // Takes a vector of vectors of strings (input) and a vector of PrioritizedVariants (input/output) + void sortVariants(const UVector&, UVector&, UErrorCode&) const; + // Takes a vector of strings (input) and a vector of strings (output) + void matchSelectorKeys(const UVector&, MessageContext&, ResolvedSelector&& rv, UVector&, UErrorCode&) const; + // Takes a vector of FormattedPlaceholders (input), + // and a vector of vectors of strings (output) + void resolvePreferences(MessageContext&, UVector&, UVector&, UErrorCode&) const; + + // Formatting methods + [[nodiscard]] FormattedPlaceholder formatLiteral(const data_model::Literal&) const; + void formatPattern(MessageContext&, const Environment&, const data_model::Pattern&, UErrorCode&, UnicodeString&) const; + // Formats a call to a formatting function + // Dispatches on argument type + [[nodiscard]] FormattedPlaceholder evalFormatterCall(FormattedPlaceholder&& argument, + MessageContext& context, + UErrorCode& status) const; + // Dispatches on function name + [[nodiscard]] FormattedPlaceholder evalFormatterCall(const FunctionName& functionName, + FormattedPlaceholder&& argument, + FunctionOptions&& options, + MessageContext& context, + UErrorCode& status) const; + // Formats an expression that appears as a selector + ResolvedSelector formatSelectorExpression(const Environment& env, const data_model::Expression&, MessageContext&, UErrorCode&) const; + // Formats an expression that appears in a pattern or as the definition of a local variable + [[nodiscard]] FormattedPlaceholder formatExpression(const Environment&, const data_model::Expression&, MessageContext&, UErrorCode&) const; + [[nodiscard]] FunctionOptions resolveOptions(const Environment& env, const OptionMap&, MessageContext&, UErrorCode&) const; + [[nodiscard]] FormattedPlaceholder formatOperand(const Environment&, const data_model::Operand&, MessageContext&, UErrorCode&) const; + [[nodiscard]] FormattedPlaceholder evalArgument(const data_model::VariableName&, MessageContext&, UErrorCode&) const; + void formatSelectors(MessageContext& context, const Environment& env, UErrorCode &status, UnicodeString& result) const; + + // Function registry methods + bool hasCustomMFFunctionRegistry() const { + return (customMFFunctionRegistry != nullptr); + } + + // Precondition: custom function registry exists + // Note: this is non-const because the values in the MFFunctionRegistry are mutable + // (a FormatterFactory can have mutable state) + const MFFunctionRegistry& getCustomMFFunctionRegistry() const; + + bool isCustomFormatter(const FunctionName&) const; + FormatterFactory* lookupFormatterFactory(const FunctionName&, UErrorCode& status) const; + bool isBuiltInSelector(const FunctionName&) const; + bool isBuiltInFormatter(const FunctionName&) const; + bool isCustomSelector(const FunctionName&) const; + const SelectorFactory* lookupSelectorFactory(MessageContext&, const FunctionName&, UErrorCode&) const; + bool isSelector(const FunctionName& fn) const { return isBuiltInSelector(fn) || isCustomSelector(fn); } + bool isFormatter(const FunctionName& fn) const { return isBuiltInFormatter(fn) || isCustomFormatter(fn); } + const Formatter* lookupFormatter(const FunctionName&, UErrorCode&) const; + + Selector* getSelector(MessageContext&, const FunctionName&, UErrorCode&) const; + Formatter* getFormatter(const FunctionName&, UErrorCode&) const; + bool getDefaultFormatterNameByType(const UnicodeString&, FunctionName&) const; + + // Checking for resolution errors + void checkDeclarations(MessageContext&, Environment*&, UErrorCode&) const; + void check(MessageContext&, const Environment&, const data_model::Expression&, UErrorCode&) const; + void check(MessageContext&, const Environment&, const data_model::Operand&, UErrorCode&) const; + void check(MessageContext&, const Environment&, const OptionMap&, UErrorCode&) const; + + void initErrors(UErrorCode&); + void clearErrors() const; + void cleanup() noexcept; + + // The locale this MessageFormatter was created with + /* const */ Locale locale; + + // Registry for built-in functions + MFFunctionRegistry standardMFFunctionRegistry; + // Registry for custom functions; may be null if no custom registry supplied + // Note: this is *not* owned by the MessageFormatter object + // The reason for this choice is to have a non-destructive MessageFormatter::Builder, + // while also not requiring the function registry to be deeply-copyable. Making the + // function registry copyable would impose a requirement on any implementations + // of the FormatterFactory and SelectorFactory interfaces to implement a custom + // clone() method, which is necessary to avoid sharing between copies of the + // function registry (and thus double-frees) + // Not deeply immutable (the values in the function registry are mutable, + // as a FormatterFactory can have mutable state + const MFFunctionRegistry* customMFFunctionRegistry; + + // Data model, representing the parsed message + MFDataModel dataModel; + + // Normalized version of the input string (optional whitespace removed) + UnicodeString normalizedInput; + + // Errors -- only used while parsing and checking for data model errors; then + // the MessageContext keeps track of errors + // Must be a raw pointer to avoid including the internal header file + // defining StaticErrors + // Owned by `this` + StaticErrors* errors; + + }; // class MessageFormatter + +} // namespace message2 + +U_NAMESPACE_END + +#endif // U_HIDE_DEPRECATED_API + +#endif /* #if !UCONFIG_NO_MF2 */ + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif /* U_SHOW_CPLUSPLUS_API */ + +#endif // MESSAGEFORMAT2_H + +// eof diff --git a/contrib/libs/icu/include/unicode/messageformat2_arguments.h b/contrib/libs/icu/include/unicode/messageformat2_arguments.h new file mode 100644 index 0000000000..f79865a43f --- /dev/null +++ b/contrib/libs/icu/include/unicode/messageformat2_arguments.h @@ -0,0 +1,138 @@ +// © 2024 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#ifndef MESSAGEFORMAT2_ARGUMENTS_H +#define MESSAGEFORMAT2_ARGUMENTS_H + +#if U_SHOW_CPLUSPLUS_API + +#if !UCONFIG_NO_FORMATTING + +#if !UCONFIG_NO_MF2 + +/** + * \file + * \brief C++ API: Formats messages using the draft MessageFormat 2.0. + */ + +#include "unicode/messageformat2_data_model_names.h" +#include "unicode/messageformat2_formattable.h" +#include "unicode/unistr.h" + +#ifndef U_HIDE_DEPRECATED_API + +#include <map> + +U_NAMESPACE_BEGIN + +/// @cond DOXYGEN_IGNORE +// Export an explicit template instantiation of the LocalPointer that is used as a +// data member of various MessageFormatDataModel classes. +// (When building DLLs for Windows this is required.) +// (See measunit_impl.h, datefmt.h, collationiterator.h, erarules.h and others +// for similar examples.) +#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN +template class U_I18N_API LocalPointerBase<UnicodeString>; +template class U_I18N_API LocalPointerBase<message2::Formattable>; +template class U_I18N_API LocalArray<UnicodeString>; +template class U_I18N_API LocalArray<message2::Formattable>; +#endif +/// @endcond + +namespace message2 { + + class MessageContext; + + // Arguments + // ---------- + + /** + * + * The `MessageArguments` class represents the named arguments to a message. + * It is immutable and movable. It is not copyable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API MessageArguments : public UObject { + public: + /** + * Message arguments constructor, which takes a map and returns a container + * of arguments that can be passed to a `MessageFormatter`. + * + * @param args A reference to a map from strings (argument names) to `message2::Formattable` + * objects (argument values). The keys and values of the map are copied into the result. + * @param status Input/output error code. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + MessageArguments(const std::map<UnicodeString, Formattable>& args, UErrorCode& status) { + if (U_FAILURE(status)) { + return; + } + argumentNames = LocalArray<UnicodeString>(new UnicodeString[argsLen = (int32_t) args.size()]); + arguments = LocalArray<Formattable>(new Formattable[argsLen]); + if (!argumentNames.isValid() || !arguments.isValid()) { + status = U_MEMORY_ALLOCATION_ERROR; + return; + } + int32_t i = 0; + for (auto iter = args.begin(); iter != args.end(); ++iter) { + argumentNames[i] = iter->first; + arguments[i] = iter->second; + i++; + } + } + /** + * Move operator: + * The source MessageArguments will be left in a valid but undefined state. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + MessageArguments& operator=(MessageArguments&&) noexcept; + /** + * Default constructor. + * Returns an empty arguments mapping. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + MessageArguments() = default; + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~MessageArguments(); + private: + friend class MessageContext; + + const Formattable* getArgument(const data_model::VariableName&, UErrorCode&) const; + + // Avoids using Hashtable so that code constructing a Hashtable + // doesn't have to appear in this header file + LocalArray<UnicodeString> argumentNames; + LocalArray<Formattable> arguments; + int32_t argsLen = 0; + }; // class MessageArguments + +} // namespace message2 + +U_NAMESPACE_END + +#endif // U_HIDE_DEPRECATED_API + +#endif /* #if !UCONFIG_NO_MF2 */ + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif /* U_SHOW_CPLUSPLUS_API */ + +#endif // MESSAGEFORMAT2_ARGUMENTS_H + +// eof diff --git a/contrib/libs/icu/include/unicode/messageformat2_data_model.h b/contrib/libs/icu/include/unicode/messageformat2_data_model.h new file mode 100644 index 0000000000..942a03f735 --- /dev/null +++ b/contrib/libs/icu/include/unicode/messageformat2_data_model.h @@ -0,0 +1,3090 @@ +// © 2024 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#ifndef MESSAGEFORMAT_DATA_MODEL_H +#define MESSAGEFORMAT_DATA_MODEL_H + +#if U_SHOW_CPLUSPLUS_API + +#if !UCONFIG_NO_FORMATTING + +#if !UCONFIG_NO_MF2 + +#include "unicode/localpointer.h" +#include "unicode/messageformat2_data_model_names.h" + +#ifndef U_HIDE_DEPRECATED_API + +#include <algorithm> +#include <cstddef> +#include <iterator> +#include <optional> +#include <variant> +#include <vector> + +U_NAMESPACE_BEGIN + +class UVector; + +// Helpers + +// Note: this _must_ be declared `inline` or else gcc will generate code +// for its instantiations, which needs to be avoided because it returns +// a std::vector +template<typename T> +static inline std::vector<T> toStdVector(const T* arr, int32_t len) { + std::vector<T> result; + for (int32_t i = 0; i < len; i++) { + result.push_back(arr[i]); + } + return result; +} + +#if defined(U_REAL_MSVC) +#pragma warning(push) +// Ignore warning 4251 as these templates are instantiated later in this file, +// after the classes used to instantiate them have been defined. +#pragma warning(disable: 4251) +#endif + +namespace message2 { + class Checker; + class MFDataModel; + class MessageFormatter; + class Parser; + class Serializer; + + + namespace data_model { + class Binding; + class Literal; + class Operator; + + /** + * The `Reserved` class represents a `reserved` annotation, as in the `reserved` nonterminal + * in the MessageFormat 2 grammar or the `Reserved` interface + * defined in + * https://github.com/unicode-org/message-format-wg/blob/main/spec/data-model.md#expressions + * + * `Reserved` is immutable, copyable and movable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API Reserved : public UMemory { + public: + /** + * A `Reserved` is a sequence of literals. + * + * @return The number of literals. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + int32_t numParts() const; + /** + * Indexes into the sequence. + * Precondition: i < numParts() + * + * @param i Index of the part being accessed. + * @return A reference to he i'th literal in the sequence + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const Literal& getPart(int32_t i) const; + + /** + * The mutable `Reserved::Builder` class allows the reserved sequence to be + * constructed one part at a time. + * + * Builder is not copyable or movable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API Builder : public UMemory { + private: + UVector* parts; // Not a LocalPointer for the same reason as in `SelectorKeys::Builder` + + public: + /** + * Adds a single literal to the reserved sequence. + * + * @param part The literal to be added. Passed by move. + * @param status Input/output error code + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& add(Literal&& part, UErrorCode& status) noexcept; + /** + * Constructs a new immutable `Reserved` using the list of parts + * set with previous `add()` calls. + * + * The builder object (`this`) can still be used after calling `build()`. + * + * param status Input/output error code + * @return The new Reserved object + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Reserved build(UErrorCode& status) const noexcept; + /** + * Default constructor. + * Returns a builder with an empty Reserved sequence. + * + * param status Input/output error code + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder(UErrorCode& status); + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~Builder(); + Builder(const Builder&) = delete; + Builder& operator=(const Builder&) = delete; + Builder(Builder&&) = delete; + Builder& operator=(Builder&&) = delete; + }; // class Reserved::Builder + /** + * Non-member swap function. + * @param r1 will get r2's contents + * @param r2 will get r1's contents + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + friend inline void swap(Reserved& r1, Reserved& r2) noexcept { + using std::swap; + + swap(r1.bogus, r2.bogus); + swap(r1.parts, r2.parts); + swap(r1.len, r2.len); + } + /** + * Copy constructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Reserved(const Reserved& other); + /** + * Assignment operator + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Reserved& operator=(Reserved) noexcept; + /** + * Default constructor. + * Puts the Reserved into a valid but undefined state. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Reserved() { parts = LocalArray<Literal>(); } + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~Reserved(); + private: + friend class Builder; + friend class Operator; + + // True if a copy failed; this has to be distinguished + // from a valid `Reserved` with empty parts + bool bogus = false; + + // Possibly-empty list of parts + // `literal` reserved as a quoted literal; `reserved-char` / `reserved-escape` + // strings represented as unquoted literals + /* const */ LocalArray<Literal> parts; + int32_t len = 0; + + Reserved(const UVector& parts, UErrorCode& status) noexcept; + // Helper + static void initLiterals(Reserved&, const Reserved&); + }; + + /** + * The `Literal` class corresponds to the `literal` nonterminal in the MessageFormat 2 grammar, + * https://github.com/unicode-org/message-format-wg/blob/main/spec/message.abnf and the + * `Literal` interface defined in + * // https://github.com/unicode-org/message-format-wg/blob/main/spec/data-model.md#expressions + * + * `Literal` is immutable, copyable and movable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API Literal : public UObject { + public: + /** + * Returns the quoted representation of this literal (enclosed in '|' characters) + * + * @return A string representation of the literal enclosed in quote characters. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + UnicodeString quoted() const; + /** + * Returns the parsed string contents of this literal. + * + * @return A string representation of this literal. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const UnicodeString& unquoted() const; + /** + * Determines if this literal appeared as a quoted literal in the message. + * + * @return true if and only if this literal appeared as a quoted literal in the + * message. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + UBool isQuoted() const { return thisIsQuoted; } + /** + * Literal constructor. + * + * @param q True if and only if this literal was parsed with the `quoted` nonterminal + * (appeared enclosed in '|' characters in the message text). + * @param s The string contents of this literal; escape sequences are assumed to have + * been interpreted already. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Literal(UBool q, const UnicodeString& s) : thisIsQuoted(q), contents(s) {} + /** + * Copy constructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Literal(const Literal& other) : thisIsQuoted(other.thisIsQuoted), contents(other.contents) {} + /** + * Non-member swap function. + * @param l1 will get l2's contents + * @param l2 will get l1's contents + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + friend inline void swap(Literal& l1, Literal& l2) noexcept { + using std::swap; + + swap(l1.thisIsQuoted, l2.thisIsQuoted); + swap(l1.contents, l2.contents); + } + /** + * Assignment operator. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Literal& operator=(Literal) noexcept; + /** + * Default constructor. + * Puts the Literal into a valid but undefined state. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Literal() = default; + /** + * Less than operator. Compares `this.stringContents()` with + * `other.stringContents()`. This method is used in representing + * the mapping from key lists to patterns in a message with variants, + * and is not expected to be useful otherwise. + * + * @param other The Literal to compare to this one. + * @return true if the parsed string corresponding to this `Literal` + * is less than the parsed string corresponding to the other `Literal` + * (according to `UnicodeString`'s less-than operator). + * Returns false otherwise. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + bool operator<(const Literal& other) const; + /** + * Equality operator. Compares `this.stringContents()` with + * `other.stringContents()`. This method is used in representing + * the mapping from key lists to patterns in a message with variants, + * and is not expected to be useful otherwise. + * + * @param other The Literal to compare to this one. + * @return true if the parsed string corresponding to this `Literal` + * equals the parsed string corresponding to the other `Literal` + * (according to `UnicodeString`'s equality operator). + * Returns false otherwise. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + bool operator==(const Literal& other) const; + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~Literal(); + + private: + friend class Reserved::Builder; + + /* const */ bool thisIsQuoted = false; + /* const */ UnicodeString contents; + }; + } // namespace data_model +} // namespace message2 + +/// @cond DOXYGEN_IGNORE +// Export an explicit template instantiation of the LocalPointer that is used as a +// data member of various MFDataModel classes. +// (When building DLLs for Windows this is required.) +// (See measunit_impl.h, datefmt.h, collationiterator.h, erarules.h and others +// for similar examples.) +#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN +template class U_I18N_API LocalPointerBase<message2::data_model::Literal>; +template class U_I18N_API LocalArray<message2::data_model::Literal>; +#endif +#if defined(U_REAL_MSVC) +#pragma warning(pop) +#endif +/// @endcond + +U_NAMESPACE_END + +/// @cond DOXYGEN_IGNORE +// Export an explicit template instantiation of the std::variants and std::optionals +// that are used as a data member of various MFDataModel classes. +// (When building DLLs for Windows this is required.) +// (See measunit_impl.h, datefmt.h, collationiterator.h, erarules.h and others +// for similar examples.) +#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN +#if defined(U_REAL_MSVC) && defined(_MSVC_STL_VERSION) +struct U_I18N_API std::_Nontrivial_dummy_type; +template class U_I18N_API std::_Variant_storage_<false, icu::UnicodeString, icu::message2::data_model::Literal>; +#endif +template class U_I18N_API std::variant<icu::UnicodeString, icu::message2::data_model::Literal>; +template class U_I18N_API std::optional<std::variant<icu::UnicodeString, icu::message2::data_model::Literal>>; +template class U_I18N_API std::optional<icu::message2::data_model::Literal>; +#endif +/// @endcond + +U_NAMESPACE_BEGIN + +namespace message2 { + namespace data_model { + + /** + * The `Operand` class corresponds to the `operand` nonterminal in the MessageFormat 2 grammar, + * https://github.com/unicode-org/message-format-wg/blob/main/spec/message.abnf . + * It represents a `Literal | VariableRef` -- see the `operand?` field of the `FunctionRef` + * interface defined at: + * https://github.com/unicode-org/message-format-wg/blob/main/spec/data-model.md#expressions + * with the difference that it can also represent a null operand (the absent operand in an + * `annotation` with no operand). + * + * `Operand` is immutable and is copyable and movable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API Operand : public UObject { + public: + /** + * Determines if this operand represents a variable. + * + * @return True if and only if the operand is a variable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + UBool isVariable() const; + /** + * Determines if this operand represents a literal. + * + * @return True if and only if the operand is a literal. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + UBool isLiteral() const; + /** + * Determines if this operand is the null operand. + * + * @return True if and only if the operand is the null operand. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual UBool isNull() const; + /** + * Returns a reference to this operand's variable name. + * Precondition: isVariable() + * + * @return A reference to the name of the variable + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const UnicodeString& asVariable() const; + /** + * Returns a reference to this operand's literal contents. + * Precondition: isLiteral() + * + * @return A reference to the literal + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const Literal& asLiteral() const; + /** + * Default constructor. + * Creates a null Operand. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Operand() : contents(std::nullopt) {} + /** + * Variable operand constructor. + * + * @param v The variable name; an operand corresponding + * to a reference to `v` is returned. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + explicit Operand(const UnicodeString& v) : contents(VariableName(v)) {} + /** + * Literal operand constructor. + * + * @param l The literal to use for this operand; an operand + * corresponding to `l` is returned. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + explicit Operand(const Literal& l) : contents(l) {} + /** + * Non-member swap function. + * @param o1 will get o2's contents + * @param o2 will get o1's contents + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + friend inline void swap(Operand& o1, Operand& o2) noexcept { + using std::swap; + (void) o1; + (void) o2; + swap(o1.contents, o2.contents); + } + /** + * Assignment operator. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual Operand& operator=(Operand) noexcept; + /** + * Copy constructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Operand(const Operand&); + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~Operand(); + private: + std::optional<std::variant<VariableName, Literal>> contents; + }; // class Operand + + /** + * The `Key` class corresponds to the `key` nonterminal in the MessageFormat 2 grammar, + * https://github.com/unicode-org/message-format-wg/blob/main/spec/message.abnf . + * It also corresponds to + * the `Literal | CatchallKey` that is the + * element type of the `keys` array in the `Variant` interface + * defined in https://github.com/unicode-org/message-format-wg/blob/main/spec/data-model.md#messages + * + * A key is either a literal or the wildcard symbol (represented in messages as '*') + * + * `Key` is immutable, copyable and movable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API Key : public UObject { + public: + /** + * Determines if this is a wildcard key + * + * @return True if and only if this is the wildcard key + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + UBool isWildcard() const { return !contents.has_value(); } + /** + * Returns the contents of this key as a literal. + * Precondition: !isWildcard() + * + * @return The literal contents of the key + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const Literal& asLiteral() const; + /** + * Copy constructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Key(const Key& other) : contents(other.contents) {} + /** + * Wildcard constructor; constructs a Key representing the + * catchall or wildcard key, '*'. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Key() : contents(std::nullopt) {} + /** + * Literal key constructor. + * + * @param lit A Literal to use for this key. The result matches the + * literal `lit`. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + explicit Key(const Literal& lit) : contents(lit) {} + /** + * Non-member swap function. + * @param k1 will get k2's contents + * @param k2 will get k1's contents + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + friend inline void swap(Key& k1, Key& k2) noexcept { + using std::swap; + + swap(k1.contents, k2.contents); + } + /** + * Assignment operator + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Key& operator=(Key) noexcept; + /** + * Less than operator. Compares the literal of `this` with the literal of `other`. + * This method is used in representing the mapping from key lists to patterns + * in a message with variants, and is not expected to be useful otherwise. + * + * @param other The Key to compare to this one. + * @return true if the two `Key`s are not wildcards and if `this.asLiteral()` + * < `other.asLiteral()`. + * Returns false otherwise. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + bool operator<(const Key& other) const; + /** + * Equality operator. Compares the literal of `this` with the literal of `other`. + * This method is used in representing the mapping from key lists to patterns + * in a message with variants, and is not expected to be useful otherwise. + * + * @param other The Key to compare to this one. + * @return true if either both `Key`s are wildcards, or `this.asLiteral()` + * == `other.asLiteral()`. + * Returns false otherwise. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + bool operator==(const Key& other) const; + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~Key(); + private: + /* const */ std::optional<Literal> contents; + }; // class Key + } // namespace data_model +} // namespace message2 + +/// @cond DOXYGEN_IGNORE +// Export an explicit template instantiation of the LocalPointer that is used as a +// data member of various MFDataModel classes. +// (When building DLLs for Windows this is required.) +// (See measunit_impl.h, datefmt.h, collationiterator.h, erarules.h and others +// for similar examples.) +#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN +template class U_I18N_API LocalPointerBase<message2::data_model::Key>; +template class U_I18N_API LocalArray<message2::data_model::Key>; +#endif +/// @endcond + +namespace message2 { + namespace data_model { + /** + * The `SelectorKeys` class represents the key list for a single variant. + * It corresponds to the `keys` array in the `Variant` interface + * defined in https://github.com/unicode-org/message-format-wg/blob/main/spec/data-model.md#messages + * + * `SelectorKeys` is immutable, copyable and movable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API SelectorKeys : public UObject { + public: + /** + * Returns the underlying list of keys. + * + * @return The list of keys for this variant. + * Returns an empty list if allocating this `SelectorKeys` + * object previously failed. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + std::vector<Key> getKeys() const { + return toStdVector<Key>(keys.getAlias(), len); + } + /** + * The mutable `SelectorKeys::Builder` class allows the key list to be constructed + * one key at a time. + * + * Builder is not copyable or movable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API Builder : public UMemory { + private: + friend class SelectorKeys; + UVector* keys; // This is a raw pointer and not a LocalPointer<UVector> to avoid undefined behavior warnings, + // since UVector is forward-declared + // The vector owns its elements + public: + /** + * Adds a single key to the list. + * + * @param key The key to be added. Passed by move + * @param status Input/output error code + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& add(Key&& key, UErrorCode& status) noexcept; + /** + * Constructs a new immutable `SelectorKeys` using the list of keys + * set with previous `add()` calls. + * + * The builder object (`this`) can still be used after calling `build()`. + * + * @param status Input/output error code + * @return The new SelectorKeys object + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + SelectorKeys build(UErrorCode& status) const; + /** + * Default constructor. + * Returns a Builder with an empty list of keys. + * + * @param status Input/output error code + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder(UErrorCode& status); + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~Builder(); + Builder(const Builder&) = delete; + Builder& operator=(const Builder&) = delete; + Builder(Builder&&) = delete; + Builder& operator=(Builder&&) = delete; + }; // class SelectorKeys::Builder + /** + * Less than operator. Compares the two key lists lexicographically. + * This method makes it possible for a `SelectorKeys` to be used as a map + * key, which allows variants to be represented as a map. It is not expected + * to be useful otherwise. + * + * @param other The SelectorKeys to compare to this one. + * @return true if `this` is less than `other`, comparing the two key lists + * lexicographically. + * Returns false otherwise. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + bool operator<(const SelectorKeys& other) const; + /** + * Default constructor. + * Puts the SelectorKeys into a valid but undefined state. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + SelectorKeys() : len(0) {} + /** + * Non-member swap function. + * @param s1 will get s2's contents + * @param s2 will get s1's contents + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + friend inline void swap(SelectorKeys& s1, SelectorKeys& s2) noexcept { + using std::swap; + + swap(s1.len, s2.len); + swap(s1.keys, s2.keys); + } + /** + * Copy constructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + SelectorKeys(const SelectorKeys& other); + /** + * Assignment operator. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + SelectorKeys& operator=(SelectorKeys other) noexcept; + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~SelectorKeys(); + private: + friend class Builder; + friend class message2::Checker; + friend class message2::MessageFormatter; + friend class message2::Serializer; + + /* const */ LocalArray<Key> keys; + /* const */ int32_t len; + + const Key* getKeysInternal() const; + SelectorKeys(const UVector& ks, UErrorCode& status); + }; // class SelectorKeys + + + } // namespace data_model + + + namespace data_model { + class Operator; + + /** + * An `Option` pairs an option name with an Operand. + * + * `Option` is immutable, copyable and movable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API Option : public UObject { + public: + /** + * Accesses the right-hand side of the option. + * + * @return A reference to the operand. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const Operand& getValue() const { return rand; } + /** + * Accesses the left-hand side of the option. + * + * @return A reference to the option name. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const UnicodeString& getName() const { return name; } + /** + * Constructor. Returns an `Option` representing the + * named option "name=rand". + * + * @param n The name of the option. + * @param r The value of the option. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Option(const UnicodeString& n, Operand&& r) : name(n), rand(std::move(r)) {} + /** + * Default constructor. + * Returns an Option in a valid but undefined state. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Option() {} + /** + * Non-member swap function. + * @param o1 will get o2's contents + * @param o2 will get o1's contents + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + friend inline void swap(Option& o1, Option& o2) noexcept { + using std::swap; + + swap(o1.name, o2.name); + swap(o1.rand, o2.rand); + } + /** + * Copy constructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Option(const Option& other); + /** + * Assignment operator + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Option& operator=(Option other) noexcept; + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~Option(); + private: + /* const */ UnicodeString name; + /* const */ Operand rand; + }; // class Option + } // namespace data_model +} // namespace message2 + + /// @cond DOXYGEN_IGNORE +// Export an explicit template instantiation of the LocalPointer that is used as a +// data member of various MFDataModel classes. +// (When building DLLs for Windows this is required.) +// (See measunit_impl.h, datefmt.h, collationiterator.h, erarules.h and others +// for similar examples.) +#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN +template class U_I18N_API LocalPointerBase<message2::data_model::Option>; +template class U_I18N_API LocalArray<message2::data_model::Option>; +#endif +/// @endcond + +namespace message2 { + namespace data_model { + // Internal only + #ifndef U_IN_DOXYGEN + // Options + // This is a wrapper class around a vector of options that provides lookup operations + class U_I18N_API OptionMap : public UObject { + public: + int32_t size() const; + // Needs to take an error code b/c an earlier copy might have failed + const Option& getOption(int32_t, UErrorCode&) const; + friend inline void swap(OptionMap& m1, OptionMap& m2) noexcept { + using std::swap; + + swap(m1.bogus, m2.bogus); + swap(m1.options, m2.options); + swap(m1.len, m2.len); + } + OptionMap() : len(0) {} + OptionMap(const OptionMap&); + OptionMap& operator=(OptionMap); + std::vector<Option> getOptions() const { + return toStdVector<Option>(options.getAlias(), len); + } + OptionMap(const UVector&, UErrorCode&); + OptionMap(Option*, int32_t); + virtual ~OptionMap(); + + class U_I18N_API Builder : public UObject { + private: + UVector* options; + bool checkDuplicates = true; + public: + Builder& add(Option&& opt, UErrorCode&); + Builder(UErrorCode&); + static Builder attributes(UErrorCode&); + // As this class is private, build() is destructive + OptionMap build(UErrorCode&); + friend inline void swap(Builder& m1, Builder& m2) noexcept { + using std::swap; + + swap(m1.options, m2.options); + swap(m1.checkDuplicates, m2.checkDuplicates); + } + Builder(Builder&&); + Builder(const Builder&) = delete; + Builder& operator=(Builder) noexcept; + virtual ~Builder(); + }; // class OptionMap::Builder + private: + friend class message2::Serializer; + + bool bogus = false; + LocalArray<Option> options; + int32_t len; + }; // class OptionMap + #endif + + // Internal use only + #ifndef U_IN_DOXYGEN + class U_I18N_API Callable : public UObject { + public: + friend inline void swap(Callable& c1, Callable& c2) noexcept { + using std::swap; + + swap(c1.name, c2.name); + swap(c1.options, c2.options); + } + const FunctionName& getName() const { return name; } + const OptionMap& getOptions() const { return options; } + Callable(const FunctionName& f, const OptionMap& opts) : name(f), options(opts) {} + Callable& operator=(Callable) noexcept; + Callable(const Callable&); + Callable() = default; + virtual ~Callable(); + private: + /* const */ FunctionName name; + /* const */ OptionMap options; + }; + #endif + } // namespace data_model +} // namespace message2 + +U_NAMESPACE_END + +/// @cond DOXYGEN_IGNORE +// Export an explicit template instantiation of the std::variant that is used as a +// data member of various MFDataModel classes. +// (When building DLLs for Windows this is required.) +// (See measunit_impl.h, datefmt.h, collationiterator.h, erarules.h and others +// for similar examples.) +#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN +#if defined(U_REAL_MSVC) && defined(_MSVC_STL_VERSION) +template class U_I18N_API std::_Variant_storage_<false, icu::message2::data_model::Reserved,icu::message2::data_model::Callable>; +#endif +template class U_I18N_API std::variant<icu::message2::data_model::Reserved,icu::message2::data_model::Callable>; +#endif +/// @endcond + +U_NAMESPACE_BEGIN + +namespace message2 { + namespace data_model { + /** + * The `Operator` class corresponds to the `FunctionRef | Reserved` type in the + * `Expression` interface defined in + * https://github.com/unicode-org/message-format-wg/blob/main/spec/data-model.md#patterns + * + * It represents the annotation that an expression can have: either a function name paired + * with a map from option names to operands (possibly empty), + * or a reserved sequence, which has no meaning and results in an error if the formatter + * is invoked. + * + * `Operator` is immutable, copyable and movable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API Operator : public UObject { + public: + /** + * Determines if this operator is a reserved annotation. + * + * @return true if and only if this operator represents a reserved sequence. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + UBool isReserved() const { return std::holds_alternative<Reserved>(contents); } + /** + * Accesses the function name. + * Precondition: !isReserved() + * + * @return The function name of this operator. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const FunctionName& getFunctionName() const; + /** + * Accesses the underlying reserved sequence. + * Precondition: isReserved() + * + * @return The reserved sequence represented by this operator. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const Reserved& asReserved() const; + /** + * Accesses function options. + * Precondition: !isReserved() + * + * @return A vector of function options for this operator. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + std::vector<Option> getOptions() const { + const Callable* f = std::get_if<Callable>(&contents); + // This case should never happen, as the precondition is !isReserved() + if (f == nullptr) { return {}; } + const OptionMap& opts = f->getOptions(); + return opts.getOptions(); + } + /** + * The mutable `Operator::Builder` class allows the operator to be constructed + * incrementally. + * + * Builder is not copyable or movable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API Builder : public UMemory { + private: + friend class Operator; + bool isReservedSequence = false; + bool hasFunctionName = false; + bool hasOptions = false; + Reserved asReserved; + FunctionName functionName; + OptionMap::Builder options; + public: + /** + * Sets this operator to be a reserved sequence. + * If a function name and/or options were previously set, + * clears them. + * + * @param reserved The reserved sequence to set as the contents of this Operator. + * (Passed by move.) + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& setReserved(Reserved&& reserved); + /** + * Sets this operator to be a function annotation and sets its name + * to `func`. + * If a reserved sequence was previously set, clears it. + * + * @param func The function name. + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& setFunctionName(FunctionName&& func); + /** + * Sets this operator to be a function annotation and adds a + * single option. + * If a reserved sequence was previously set, clears it. + * + * @param key The name of the option. + * @param value The value (right-hand side) of the option. + * @param status Input/output error code. + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& addOption(const UnicodeString &key, Operand&& value, UErrorCode& status) noexcept; + /** + * Constructs a new immutable `Operator` using the `reserved` annotation + * or the function name and options that were previously set. + * If neither `setReserved()` nor `setFunctionName()` was previously + * called, then `status` is set to U_INVALID_STATE_ERROR. + * + * The builder object (`this`) can still be used after calling `build()`. + * + * The `build()` method is non-const for internal implementation reasons, + * but is observably const. + * + * @param status Input/output error code. + * @return The new Operator + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Operator build(UErrorCode& status); + /** + * Default constructor. + * Returns a Builder with no function name or reserved sequence set. + * + * @param status Input/output error code. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder(UErrorCode& status); + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~Builder(); + Builder(const Builder&) = delete; + Builder& operator=(const Builder&) = delete; + Builder(Builder&&) = delete; + Builder& operator=(Builder&&) = delete; + }; // class Operator::Builder + /** + * Copy constructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Operator(const Operator& other) noexcept; + /** + * Non-member swap function. + * @param o1 will get o2's contents + * @param o2 will get o1's contents + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + friend inline void swap(Operator& o1, Operator& o2) noexcept { + using std::swap; + + swap(o1.contents, o2.contents); + } + /** + * Assignment operator. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Operator& operator=(Operator) noexcept; + /** + * Default constructor. + * Puts the Operator into a valid but undefined state. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Operator() : contents(Reserved()) {} + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~Operator(); + private: + friend class Binding; + friend class Builder; + friend class message2::Checker; + friend class message2::MessageFormatter; + friend class message2::Serializer; + + // Function call constructor + Operator(const FunctionName& f, const UVector& options, UErrorCode&); + // Reserved sequence constructor + Operator(const Reserved& r) : contents(r) {} + + const OptionMap& getOptionsInternal() const; + Operator(const FunctionName&, const OptionMap&); + /* const */ std::variant<Reserved, Callable> contents; + }; // class Operator + } // namespace data_model +} // namespace message2 + +U_NAMESPACE_END + +/// @cond DOXYGEN_IGNORE +// Export an explicit template instantiation of the std::optional that is used as a +// data member of various MFDataModel classes. +// (When building DLLs for Windows this is required.) +// (See measunit_impl.h, datefmt.h, collationiterator.h, erarules.h and others +// for similar examples.) +#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN +template class U_I18N_API std::optional<icu::message2::data_model::Operator>; +template class U_I18N_API std::optional<icu::message2::data_model::Reserved>; +#endif +/// @endcond + +U_NAMESPACE_BEGIN + +namespace message2 { + namespace data_model { + // Internal only + typedef enum UMarkupType { + UMARKUP_OPEN = 0, + UMARKUP_CLOSE, + UMARKUP_STANDALONE, + UMARKUP_COUNT + } UMarkupType; + + /** + * The `Markup` class corresponds to the `markup` nonterminal in the MessageFormat 2 + * grammar and the `markup` interface defined in + * https://github.com/unicode-org/message-format-wg/blob/main/spec/data-model/message.json + * + * `Markup` is immutable, copyable and movable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API Markup : public UObject { + public: + /** + * Checks if this markup is an opening tag. + * + * @return True if and only if this represents an opening tag. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + UBool isOpen() const { return (type == UMARKUP_OPEN); } + /** + * Checks if this markup is an closing tag. + * + * @return True if and only if this represents an closing tag. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + UBool isClose() const { return (type == UMARKUP_CLOSE); } + /** + * Checks if this markup is an standalone tag. + * + * @return True if and only if this represents a standalone tag. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + UBool isStandalone() const { return (type == UMARKUP_STANDALONE); } + /** + * Gets the name of this markup + * + * @return A reference to the string identifying the markup + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const UnicodeString& getName() const { return name; } + /** + * Gets the options of this markup + * + * @return A reference to the string identifying the markup + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + std::vector<Option> getOptions() const { return options.getOptions(); } + /** + * Gets the attributes of this markup + * + * @return A vector of attributes + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + std::vector<Option> getAttributes() const { return attributes.getOptions(); } + /** + * Default constructor. + * Puts the Markup into a valid but undefined state. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Markup() {} + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~Markup(); + /** + * The mutable `Markup::Builder` class allows the markup to be constructed + * incrementally. + * + * Builder is not copyable or movable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API Builder : public UMemory { + private: + friend class Markup; + + UnicodeString name; + OptionMap::Builder options; + OptionMap::Builder attributes; + UMarkupType type = UMARKUP_COUNT; + public: + /** + * Sets the name of this markup. + * + * @param n A string representing the name. + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& setName(const UnicodeString& n) { name = n; return *this; } + /** + * Sets this to be an opening markup. + * + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& setOpen() { type = UMARKUP_OPEN; return *this; } + /** + * Sets this to be an closing markup. + * + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& setClose() { type = UMARKUP_CLOSE; return *this; } + /** + * Sets this to be a standalone markup. + * + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& setStandalone() { type = UMARKUP_STANDALONE; return *this; } + /** + * Adds a single option. + * + * @param key The name of the option. + * @param value The value (right-hand side) of the option. + * @param status Input/output error code. + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& addOption(const UnicodeString &key, Operand&& value, UErrorCode& status); + /** + * Adds a single attribute. + * + * @param key The name of the attribute. + * @param value The value (right-hand side) of the attribute. + * @param status Input/output error code. + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& addAttribute(const UnicodeString &key, Operand&& value, UErrorCode& status); + /** + * Constructs a new immutable `Markup` using the name and type + * and (optionally) options and attributes that were previously set. + * If `setName()` and at least one of `setOpen()`, `setClose()`, and `setStandalone()` + * were not previously called, + * then `status` is set to U_INVALID_STATE_ERROR. + * + * The builder object (`this`) can still be used after calling `build()`. + * The `build()` method is non-const for internal implementation reasons, + * but is observably const. + * + * @param status Input/output error code. + * @return The new Markup. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Markup build(UErrorCode& status); + /** + * Default constructor. + * Returns a Builder with no name, type, options, or attributes set. + * + * @param status Input/output error code. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder(UErrorCode& status); + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~Builder(); + Builder(const Builder&) = delete; + Builder& operator=(const Builder&) = delete; + Builder(Builder&&) = delete; + Builder& operator=(Builder&&) = delete; + }; // class Markup::Builder + + private: + friend class Builder; + friend class message2::Serializer; + + UMarkupType type; + UnicodeString name; + OptionMap options; + OptionMap attributes; + const OptionMap& getOptionsInternal() const { return options; } + const OptionMap& getAttributesInternal() const { return attributes; } + Markup(UMarkupType, UnicodeString, OptionMap&&, OptionMap&&); + }; // class Markup + + /** + * The `Expression` class corresponds to the `expression` nonterminal in the MessageFormat 2 + * grammar and the `Expression` interface defined in + * https://github.com/unicode-org/message-format-wg/blob/main/spec/data-model.md#patterns + * + * It represents either an operand with no annotation; an annotation with no operand; + * or an operand annotated with an annotation. + * + * `Expression` is immutable, copyable and movable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API Expression : public UObject { + public: + /** + * Checks if this expression is an annotation + * with no operand. + * + * @return True if and only if the expression has + * an annotation and has no operand. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + UBool isStandaloneAnnotation() const; + /** + * Checks if this expression has a function + * annotation (with or without an operand). A reserved + * sequence is not a function annotation. + * + * @return True if and only if the expression has an annotation + * that is a function. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + UBool isFunctionCall() const; + /** + * Returns true if and only if this expression is + * annotated with a reserved sequence. + * + * @return True if and only if the expression has an + * annotation that is a reserved sequence, + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + UBool isReserved() const; + /** + * Accesses the function or reserved sequence + * annotating this expression. + * If !(isFunctionCall() || isReserved()), sets + * `status` to U_INVALID_STATE_ERROR. + * + * @param status Input/output error code. + * @return A non-owned pointer to the operator of this expression, + * which does not outlive the expression. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const Operator* getOperator(UErrorCode& status) const; + /** + * Accesses the operand of this expression. + * + * @return A reference to the operand of this expression, + * which may be the null operand. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const Operand& getOperand() const; + /** + * Gets the attributes of this expression + * + * @return A vector of attributes + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + std::vector<Option> getAttributes() const { return attributes.getOptions(); } + /** + * The mutable `Expression::Builder` class allows the operator to be constructed + * incrementally. + * + * Builder is not copyable or movable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API Builder : public UMemory { + private: + friend class Expression; + + bool hasOperand = false; + bool hasOperator = false; + Operand rand; + Operator rator; + OptionMap::Builder attributes; + public: + /** + * Sets the operand of this expression. + * + * @param rAnd The operand to set. Passed by move. + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& setOperand(Operand&& rAnd); + /** + * Sets the operator of this expression. + * + * @param rAtor The operator to set. Passed by move. + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& setOperator(Operator&& rAtor); + /** + * Adds a single attribute. + * + * @param key The name of the attribute. + * @param value The value (right-hand side) of the attribute. + * @param status Input/output error code. + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& addAttribute(const UnicodeString &key, Operand&& value, UErrorCode& status); + /** + * Constructs a new immutable `Expression` using the operand and operator that + * were previously set. If neither `setOperand()` nor `setOperator()` was + * previously called, or if `setOperand()` was called with the null operand + * and `setOperator()` was never called, then `status` is set to + * U_INVALID_STATE_ERROR. + * + * The builder object (`this`) can still be used after calling `build()`. + * The `build()` method is non-const for internal implementation reasons, + * but is observably const. + + * @param status Input/output error code. + * @return The new Expression. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Expression build(UErrorCode& status); + /** + * Default constructor. + * Returns a Builder with no operator or operand set. + * + * @param status Input/output error code. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder(UErrorCode& status); + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~Builder(); + Builder(const Builder&) = delete; + Builder& operator=(const Builder&) = delete; + Builder(Builder&&) = delete; + Builder& operator=(Builder&&) = delete; + }; // class Expression::Builder + /** + * Non-member swap function. + * @param e1 will get e2's contents + * @param e2 will get e1's contents + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + friend inline void swap(Expression& e1, Expression& e2) noexcept { + using std::swap; + + swap(e1.rator, e2.rator); + swap(e1.rand, e2.rand); + swap(e1.attributes, e2.attributes); + } + /** + * Copy constructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Expression(const Expression& other); + /** + * Assignment operator. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Expression& operator=(Expression) noexcept; + /** + * Default constructor. + * Puts the Expression into a valid but undefined state. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Expression(); + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~Expression(); + private: + friend class message2::Serializer; + + /* + Internally, an expression is represented as the application of an optional operator to an operand. + The operand is always present; for function calls with no operand, it's represented + as an operand for which `isNull()` is true. + + Operator | Operand + -------------------------------- + { |42| :fun opt=value } => (FunctionName=fun, | Literal(quoted=true, contents="42") + options={opt: value}) + { abcd } => null | Literal(quoted=false, contents="abcd") + { : fun opt=value } => (FunctionName=fun, + options={opt: value}) | NullOperand() + */ + + Expression(const Operator &rAtor, const Operand &rAnd, const OptionMap& attrs) : rator(rAtor), rand(rAnd), attributes(attrs) {} + Expression(const Operand &rAnd, const OptionMap& attrs) : rator(std::nullopt), rand(Operand(rAnd)), attributes(attrs) {} + Expression(const Operator &rAtor, const OptionMap& attrs) : rator(rAtor), rand(), attributes(attrs) {} + /* const */ std::optional<Operator> rator; + /* const */ Operand rand; + /* const */ OptionMap attributes; + const OptionMap& getAttributesInternal() const { return attributes; } + }; // class Expression + } // namespace data_model +} // namespace message2 + +/// @cond DOXYGEN_IGNORE +// Export an explicit template instantiation of the LocalPointer that is used as a +// data member of various MFDataModel classes. +// (When building DLLs for Windows this is required.) +// (See measunit_impl.h, datefmt.h, collationiterator.h, erarules.h and others +// for similar examples.) +#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN +template class U_I18N_API LocalPointerBase<message2::data_model::Expression>; +template class U_I18N_API LocalArray<message2::data_model::Expression>; +#endif +/// @endcond + +namespace message2 { + namespace data_model { + /** + * The `UnsupportedStatement` class corresponds to the `reserved-statement` nonterminal in the MessageFormat 2 + * grammar and the `unsupported-statement` type defined in: + * https://github.com/unicode-org/message-format-wg/blob/main/spec/data-model/message.json#L169 + * + * It represents a keyword (string) together with an optional + * `Reserved` annotation and a non-empty list of expressions. + * + * `UnsupportedStatement` is immutable, copyable and movable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API UnsupportedStatement : public UObject { + public: + /** + * Accesses the keyword of this statement. + * + * @return A reference to a string. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const UnicodeString& getKeyword() const { return keyword; } + /** + * Accesses the `reserved-body` of this statement. + * + * @param status Input/output error code. Set to U_ILLEGAL_ARGUMENT_ERROR + * if this unsupported statement has no body. + * @return A non-owned pointer to a `Reserved` annotation, + * which is non-null if U_SUCCESS(status). + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const Reserved* getBody(UErrorCode& status) const; + /** + * Accesses the expressions of this statement. + * + * @return A vector of Expressions. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + std::vector<Expression> getExpressions() const { + if (expressionsLen <= 0 || !expressions.isValid()) { + // This case should never happen, but we can't use an assertion here + return {}; + } + return toStdVector<Expression>(expressions.getAlias(), expressionsLen); + } + /** + * The mutable `UnsupportedStatement::Builder` class allows the statement to be constructed + * incrementally. + * + * Builder is not copyable or movable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API Builder : public UMemory { + private: + friend class UnsupportedStatement; + friend class message2::Parser; + + UnicodeString keyword; + std::optional<Reserved> body; + UVector* expressions; // Vector of expressions; + // not a LocalPointer for + // the same reason as in `SelectorKeys::builder` + public: + /** + * Sets the keyword of this statement. + * + * @param k The keyword to set. + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& setKeyword(const UnicodeString& k); + /** + * Sets the body of this statement. + * + * @param r The `Reserved` annotation to set as the body. Passed by move. + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& setBody(Reserved&& r); + /** + * Adds an expression to this statement. + * + * @param e The expression to add. Passed by move. + * @param status Input/output error code. + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& addExpression(Expression&& e, UErrorCode& status); + /** + * Constructs a new immutable `UnsupportedStatement` using the keyword, + * body and (if applicable) expressions that were previously set. + * If `setKeyword()` was never called, then `status` is set to + * U_INVALID_STATE_ERROR. If `setBody()` was never called, the body is + * treated as absent (not an error). If `addExpression()` was not called + * at least once, then `status` is set to U_INVALID_STATE_ERROR. + * + * The builder object (`this`) can still be used after calling `build()`. + * @param status Input/output error code. + * @return The new UnsupportedStatement + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + UnsupportedStatement build(UErrorCode& status) const; + /** + * Default constructor. + * Returns a Builder with no keyword or body set. + * + * @param status Input/output error code. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder(UErrorCode& status); + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~Builder(); + Builder(const Builder&) = delete; + Builder& operator=(const Builder&) = delete; + Builder(Builder&&) = delete; + Builder& operator=(Builder&&) = delete; + }; // class UnsupportedStatement::Builder + /** + * Non-member swap function. + * @param s1 will get s2's contents + * @param s2 will get s1's contents + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + friend inline void swap(UnsupportedStatement& s1, UnsupportedStatement& s2) noexcept { + using std::swap; + + swap(s1.keyword, s2.keyword); + swap(s1.body, s2.body); + swap(s1.expressions, s2.expressions); + swap(s1.expressionsLen, s2.expressionsLen); + } + /** + * Copy constructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + UnsupportedStatement(const UnsupportedStatement& other); + /** + * Assignment operator. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + UnsupportedStatement& operator=(UnsupportedStatement) noexcept; + /** + * Default constructor. + * Puts the UnsupportedStatement into a valid but undefined state. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + UnsupportedStatement() : expressions(LocalArray<Expression>()) {} + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~UnsupportedStatement(); + private: + friend class message2::Serializer; + + /* const */ UnicodeString keyword; + /* const */ std::optional<Reserved> body; + /* const */ LocalArray<Expression> expressions; + /* const */ int32_t expressionsLen = 0; + + const Expression* getExpressionsInternal() const { return expressions.getAlias(); } + + UnsupportedStatement(const UnicodeString&, const std::optional<Reserved>&, const UVector&, UErrorCode&); + }; // class UnsupportedStatement + + class Pattern; + + // Despite the comments, `PatternPart` is internal-only + /** + * A `PatternPart` is a single element (text or expression) in a `Pattern`. + * It corresponds to the `body` field of the `Pattern` interface + * defined in https://github.com/unicode-org/message-format-wg/blob/main/spec/data-model.md#patterns + * + * `PatternPart` is immutable, copyable and movable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class PatternPart : public UObject { + public: + /** + * Checks if the part is a text part. + * + * @return True if and only if this is a text part. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + UBool isText() const { return std::holds_alternative<UnicodeString>(piece); } + /** + * Checks if the part is a markup part. + * + * @return True if and only if this is a markup part. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + UBool isMarkup() const { return std::holds_alternative<Markup>(piece); } + /** + * Checks if the part is an expression part. + * + * @return True if and only if this is an expression part. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + UBool isExpression() const { return std::holds_alternative<Expression>(piece); } + /** + * Accesses the expression of the part. + * Precondition: isExpression() + * + * @return A reference to the part's underlying expression. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const Expression& contents() const; + /** + * Accesses the expression of the part. + * Precondition: isMarkup() + * + * @return A reference to the part's underlying expression. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const Markup& asMarkup() const; + /** + * Accesses the text contents of the part. + * Precondition: isText() + * + * @return A reference to a string representing the part's text.. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const UnicodeString& asText() const; + /** + * Non-member swap function. + * @param p1 will get p2's contents + * @param p2 will get p1's contents + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + friend inline void swap(PatternPart& p1, PatternPart& p2) noexcept { + using std::swap; + + swap(p1.piece, p2.piece); + } + /** + * Copy constructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + PatternPart(const PatternPart& other); + /** + * Assignment operator. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + PatternPart& operator=(PatternPart) noexcept; + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~PatternPart(); + /** + * Text part constructor. Returns a text pattern part + * with text `t`. + * + * @param t A text string. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + explicit PatternPart(const UnicodeString& t) : piece(t) {} + /** + * Expression part constructor. Returns an Expression pattern + * part with expression `e`. + * + * @param e An Expression. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + explicit PatternPart(Expression&& e) : piece(e) {} + /** + * Markup part constructor. Returns a Markup pattern + * part with markup `m` + * + * @param m A Markup. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + explicit PatternPart(Markup&& m) : piece(m) {} + /** + * Default constructor. + * Puts the PatternPart into a valid but undefined state. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + PatternPart() = default; + private: + friend class Pattern; + + std::variant<UnicodeString, Expression, Markup> piece; + }; // class PatternPart + } // namespace data_model +} // namespace message2 + + /// @cond DOXYGEN_IGNORE +// Export an explicit template instantiation of the LocalPointer that is used as a +// data member of various MFDataModel classes. +// (When building DLLs for Windows this is required.) +// (See measunit_impl.h, datefmt.h, collationiterator.h, erarules.h and others +// for similar examples.) +#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN +template class U_I18N_API LocalPointerBase<message2::data_model::PatternPart>; +template class U_I18N_API LocalArray<message2::data_model::PatternPart>; +template class U_I18N_API LocalPointerBase<message2::data_model::UnsupportedStatement>; +template class U_I18N_API LocalArray<message2::data_model::UnsupportedStatement>; +#endif +/// @endcond + +namespace message2 { + namespace data_model { + /** + * A `Pattern` is a sequence of formattable parts. + * It corresponds to the `Pattern` interface + * defined in https://github.com/unicode-org/message-format-wg/blob/main/spec/data-model.md#patterns + * + * `Pattern` is immutable, copyable and movable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API Pattern : public UObject { + private: + friend class PatternPart; + + public: + struct Iterator; + /** + * Returns the parts of this pattern + * + * @return A forward iterator of variants. Each element is either a string (text part) + * or an expression part. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Iterator begin() const { + return Iterator(this, 0); + } + /** + * Returns a special value to mark the end of iteration + * + * @return A forward iterator of variants. This should only be used for comparisons + * against an iterator returned by incrementing begin(). + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Iterator end() const { + return Iterator(this, len); + } + /** + * The mutable `Pattern::Builder` class allows the pattern to be + * constructed one part at a time. + * + * Builder is not copyable or movable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API Builder : public UMemory { + private: + friend class Pattern; + + UVector* parts; // Not a LocalPointer for the same reason as in `SelectorKeys::Builder` + + public: + /** + * Adds a single expression part to the pattern. + * + * @param part The part to be added (passed by move) + * @param status Input/output error code. + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& add(Expression&& part, UErrorCode& status) noexcept; + /** + * Adds a single markup part to the pattern. + * + * @param part The part to be added (passed by move) + * @param status Input/output error code. + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& add(Markup&& part, UErrorCode& status) noexcept; + /** + * Adds a single text part to the pattern. Copies `part`. + * + * @param part The part to be added (passed by move) + * @param status Input/output error code. + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& add(UnicodeString&& part, UErrorCode& status) noexcept; + /** + * Constructs a new immutable `Pattern` using the list of parts + * set with previous `add()` calls. + * + * The builder object (`this`) can still be used after calling `build()`. + * + * @param status Input/output error code. + * @return The pattern object + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Pattern build(UErrorCode& status) const noexcept; + /** + * Default constructor. + * Returns a Builder with an empty sequence of PatternParts. + * + * @param status Input/output error code + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder(UErrorCode& status); + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~Builder(); + Builder(const Builder&) = delete; + Builder& operator=(const Builder&) = delete; + Builder(Builder&&) = delete; + Builder& operator=(Builder&&) = delete; + }; // class Pattern::Builder + + /** + * Default constructor. + * Puts the Pattern into a valid but undefined state. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Pattern() : parts(LocalArray<PatternPart>()) {} + /** + * Non-member swap function. + * @param p1 will get p2's contents + * @param p2 will get p1's contents + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + friend inline void swap(Pattern& p1, Pattern& p2) noexcept { + using std::swap; + + swap(p1.bogus, p2.bogus); + swap(p1.len, p2.len); + swap(p1.parts, p2.parts); + } + /** + * Copy constructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Pattern(const Pattern& other); + /** + * Assignment operator + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Pattern& operator=(Pattern) noexcept; + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~Pattern(); + + /** + * The `Pattern::Iterator` class provides an iterator over the formattable + * parts of a pattern. + * + * `Pattern::Iterator` is mutable and is not copyable or movable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + struct U_I18N_API Iterator { + private: + using iterator_category = std::forward_iterator_tag; + using difference_type = std::ptrdiff_t; + using value_type = std::variant<UnicodeString, Expression, Markup>; + using pointer = value_type*; + using reference = const value_type&; + + friend class Pattern; + Iterator(const Pattern* p, int32_t i) : pos(i), pat(p) {} + friend bool operator== (const Iterator& a, const Iterator& b) { return (a.pat == b.pat && a.pos == b.pos); } + + int32_t pos; + const Pattern* pat; + + public: + /** + * Dereference operator (gets the element at the current iterator position) + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + reference operator*() const { + const PatternPart& part = pat->parts[pos]; + return patternContents(part); + } + /** + * Increment operator (advances to the next iterator position) + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Iterator operator++() { pos++; return *this; } + /** + * Inequality comparison operator (used for comparing an iterator to the result of end()) + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + friend bool operator!= (const Iterator& a, const Iterator& b) { return !(a == b); } + }; // struct Iterator + + private: + friend class Builder; + friend class message2::MessageFormatter; + friend class message2::Serializer; + + // Set to true if a copy constructor fails; + // needed in order to distinguish an uninitialized + // Pattern from a 0-length pattern + bool bogus = false; + + // Possibly-empty array of parts + int32_t len = 0; + LocalArray<PatternPart> parts; + + Pattern(const UVector& parts, UErrorCode& status); + // Helper + static void initParts(Pattern&, const Pattern&); + + /** + * Returns the size. + * + * @return The number of parts in the pattern. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + int32_t numParts() const; + /** + * Returns the `i`th part in the pattern. + * Precondition: i < numParts() + * + * @param i Index of the part being accessed. + * @return A reference to the part at index `i`. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const PatternPart& getPart(int32_t i) const; + + // Gets around not being able to declare Pattern::Iterator as a friend + // in PatternPart + static const std::variant<UnicodeString, Expression, Markup>& + patternContents(const PatternPart& p) { return p.piece; } + }; // class Pattern + + /** + * A `Variant` pairs a list of keys with a pattern + * It corresponds to the `Variant` interface + * defined in https://github.com/unicode-org/message-format-wg/tree/main/spec/data-model + * + * `Variant` is immutable, copyable and movable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API Variant : public UObject { + public: + /** + * Accesses the pattern of the variant. + * + * @return A reference to the pattern. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const Pattern& getPattern() const { return p; } + /** + * Accesses the keys of the variant. + * + * @return A reference to the keys. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const SelectorKeys& getKeys() const { return k; } + /** + * Constructor. Returns a variant that formats to `pattern` + * when `keys` match the selector expressions in the enclosing + * `match` construct. + * + * @param keys A reference to a `SelectorKeys`. + * @param pattern A pattern (passed by move) + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Variant(const SelectorKeys& keys, Pattern&& pattern) : k(keys), p(std::move(pattern)) {} + /** + * Non-member swap function. + * @param v1 will get v2's contents + * @param v2 will get v1's contents + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + friend inline void swap(Variant& v1, Variant& v2) noexcept { + using std::swap; + + swap(v1.k, v2.k); + swap(v1.p, v2.p); + } + /** + * Assignment operator + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Variant& operator=(Variant other) noexcept; + /** + * Default constructor. + * Returns a Variant in a valid but undefined state. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Variant() = default; + /** + * Copy constructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Variant(const Variant&); + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~Variant(); + private: + /* const */ SelectorKeys k; + /* const */ Pattern p; + }; // class Variant + } // namespace data_model + + namespace data_model { + /** + * A `Binding` pairs a variable name with an expression. + * It corresponds to the `Declaration` interface + * defined in https://github.com/unicode-org/message-format-wg/blob/main/spec/data-model.md#messages + * + * `Binding` is immutable and copyable. It is not movable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API Binding : public UObject { + public: + /** + * Accesses the right-hand side of a binding. + * + * @return A reference to the expression. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const Expression& getValue() const; + /** + * Accesses the left-hand side of the binding. + * + * @return A reference to the variable name. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const VariableName& getVariable() const { return var; } + /** + * Constructor for input binding. + * + * @param variableName The variable name (left-hand side) of the binding. Passed by move. + * @param rhs The right-hand side of the input binding. Passed by move. + * `rhs` must have an operand that is a variable reference to `variableName`. + * If `rhs` has an operator, it must be a function call. + * If either of these properties is violated, `errorCode` is set to + * U_INVALID_STATE_ERROR. + * @param errorCode Input/output error code + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + static Binding input(UnicodeString&& variableName, Expression&& rhs, UErrorCode& errorCode); + /** + * Returns true if and only if this binding represents a local declaration. + * Otherwise, it's an input declaration. + * + * @return True if this binding represents a variable and expression; + * false if it represents a variable plus an annotation. + */ + UBool isLocal() const { return local; } + /** + * Constructor. + * + * @param v A variable name. + * @param e An expression. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Binding(const VariableName& v, Expression&& e) : var(v), expr(std::move(e)), local(true), annotation(nullptr) {} + /** + * Non-member swap function. + * @param b1 will get b2's contents + * @param b2 will get b1's contents + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + friend inline void swap(Binding& b1, Binding& b2) noexcept { + using std::swap; + + swap(b1.var, b2.var); + swap(b1.expr, b2.expr); + swap(b1.local, b2.local); + b1.updateAnnotation(); + b2.updateAnnotation(); + } + /** + * Copy constructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Binding(const Binding& other); + /** + * Copy assignment operator + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Binding& operator=(Binding) noexcept; + /** + * Default constructor. + * Puts the Binding into a valid but undefined state. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Binding() : local(true) {} + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~Binding(); + private: + friend class message2::Checker; + friend class message2::MessageFormatter; + friend class message2::Parser; + friend class message2::Serializer; + + /* const */ VariableName var; + /* const */ Expression expr; + /* const */ bool local; + + // The following field is always nullptr for a local + // declaration, and possibly nullptr for an .input declaration + // If non-null, the referent is a member of `expr` so + // its lifetime is the same as the lifetime of the enclosing Binding + // (as long as there's no mutation) + const Callable* annotation = nullptr; + + const OptionMap& getOptionsInternal() const; + + bool hasAnnotation() const { return !local && (annotation != nullptr); } + void updateAnnotation(); + }; // class Binding + } // namespace data_model +} // namespace message2 + + /// @cond DOXYGEN_IGNORE +// Export an explicit template instantiation of the LocalPointer that is used as a +// data member of various MFDataModel classes. +// (When building DLLs for Windows this is required.) +// (See measunit_impl.h, datefmt.h, collationiterator.h, erarules.h and others +// for similar examples.) +#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN +template class U_I18N_API LocalPointerBase<message2::data_model::Variant>; +template class U_I18N_API LocalPointerBase<message2::data_model::Binding>; +template class U_I18N_API LocalArray<message2::data_model::Variant>; +template class U_I18N_API LocalArray<message2::data_model::Binding>; +#endif +/// @endcond + +namespace message2 { + using namespace data_model; + + + // Internal only + + class MFDataModel; + + #ifndef U_IN_DOXYGEN + class Matcher : public UObject { + public: + Matcher& operator=(Matcher); + Matcher(const Matcher&); + /** + * Non-member swap function. + * @param m1 will get m2's contents + * @param m2 will get m1's contents + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + friend inline void swap(Matcher& m1, Matcher& m2) noexcept { + using std::swap; + + if (m1.bogus) { + m2.bogus = true; + return; + } + if (m2.bogus) { + m1.bogus = true; + return; + } + swap(m1.selectors, m2.selectors); + swap(m1.numSelectors, m2.numSelectors); + swap(m1.variants, m2.variants); + swap(m1.numVariants, m2.numVariants); + } + virtual ~Matcher(); + private: + + friend class MFDataModel; + + Matcher(Expression* ss, int32_t ns, Variant* vs, int32_t nv); + Matcher() {} + + // A Matcher may have numSelectors=0 and numVariants=0 + // (this is a data model error, but it's representable). + // So we have to keep a separate flag to track failed copies. + bool bogus = false; + + // The expressions that are being matched on. + LocalArray<Expression> selectors; + // The number of selectors + int32_t numSelectors = 0; + // The list of `when` clauses (case arms). + LocalArray<Variant> variants; + // The number of variants + int32_t numVariants = 0; + }; // class Matcher + #endif +} // namespace message2 + +U_NAMESPACE_END + +/// @cond DOXYGEN_IGNORE +// Export an explicit template instantiation of the std::variant that is used as a +// data member of various MFDataModel classes. +// (When building DLLs for Windows this is required.) +// (See measunit_impl.h, datefmt.h, collationiterator.h, erarules.h and others +// for similar examples.) +#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN +#if defined(U_REAL_MSVC) && defined(_MSVC_STL_VERSION) +template class U_I18N_API std::_Variant_storage_<false, icu::message2::Matcher,icu::message2::data_model::Pattern>; +#endif +template class U_I18N_API std::variant<icu::message2::Matcher,icu::message2::data_model::Pattern>; +#endif +/// @endcond + +U_NAMESPACE_BEGIN + +namespace message2 { + // ----------------------------------------------------------------------- + // Public MFDataModel class + + /** + * + * The `MFDataModel` class describes a parsed representation of the text of a message. + * This representation is public as higher-level APIs for messages will need to know its public + * interface: for example, to re-instantiate a parsed message with different values for imported + variables. + * + * The MFDataModel API implements <a target="github" + href="https://github.com/unicode-org/message-format-wg/blob/main/spec/data-model.md">the + * specification of the abstract syntax (data model representation)</a> for MessageFormat. + * + * `MFDataModel` is immutable, copyable and movable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API MFDataModel : public UMemory { + /* + Classes that represent nodes in the data model are nested inside the + `MFDataModel` class. + + Classes such as `Expression`, `Pattern` and `VariantMap` are immutable and + are constructed using the builder pattern. + + Most classes representing nodes have copy constructors. This is because builders + contain immutable data that must be copied when calling `build()`, since the builder + could go out of scope before the immutable result of the builder does. Copying is + also necessary to prevent unexpected mutation if intermediate builders are saved + and mutated again after calling `build()`. + + The copy constructors perform a deep copy, for example by copying the entire + list of options for an `Operator` (and copying the entire underlying vector.) + Some internal fields should be `const`, but are declared as non-`const` to make + the copy constructor simpler to implement. (These are noted throughout.) In + other words, those fields are `const` except during the execution of a copy + constructor. + + On the other hand, intermediate `Builder` methods that return a `Builder&` + mutate the state of the builder, so in code like: + + Expression::Builder& exprBuilder = Expression::builder()-> setOperand(foo); + Expression::Builder& exprBuilder2 = exprBuilder.setOperator(bar); + + the call to `setOperator()` would mutate `exprBuilder`, since `exprBuilder` + and `exprBuilder2` are references to the same object. + + An alternate choice would be to make `build()` destructive, so that copying would + be unnecessary. Or, both copying and moving variants of `build()` could be + provided. Copying variants of the intermediate `Builder` methods could be + provided as well, if this proved useful. + */ + public: + /** + * Accesses the local variable declarations for this data model. + * + * @return A vector of bindings for local variables. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + std::vector<Binding> getLocalVariables() const { + std::vector<Binding> result; + if (!bogus) { + return toStdVector<Binding>(bindings.getAlias(), bindingsLen); + } + return {}; + } + /** + * Accesses the selectors. Returns an empty vector if this is a pattern message. + * + * @return A vector of selectors. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const std::vector<Expression> getSelectors() const { + if (std::holds_alternative<Pattern>(body)) { + return {}; + } + const Matcher* match = std::get_if<Matcher>(&body); + // match must be non-null, given the previous check + return toStdVector<Expression>(match->selectors.getAlias(), match->numSelectors); + } + /** + * Accesses the variants. Returns an empty vector if this is a pattern message. + * + * @return A vector of variants. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + std::vector<Variant> getVariants() const { + // Return empty vector if no variants + if (std::holds_alternative<Pattern>(body)) { + return {}; + } + const Matcher* match = std::get_if<Matcher>(&body); + // match must be non-null, given the previous check + return toStdVector<Variant>(match->variants.getAlias(), match->numVariants); + return {}; + } + /** + * Accesses the unsupported statements for this data model. + * + * @return A vector of unsupported statements. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + std::vector<UnsupportedStatement> getUnsupportedStatements() const { + std::vector<UnsupportedStatement> result; + if (!bogus) { + return toStdVector<UnsupportedStatement>(unsupportedStatements.getAlias(), unsupportedStatementsLen); + } + return {}; + } + /** + * Accesses the pattern (in a message without selectors). + * Returns a reference to an empty pattern if the message has selectors. + * + * @return A reference to the pattern. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const Pattern& getPattern() const; + + /** + * The mutable `MFDataModel::Builder` class allows the data model to be + * constructed incrementally. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API Builder; + + /** + * Default constructor. + * Puts the MFDataModel into a valid but undefined state. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + MFDataModel(); + /** + * Non-member swap function. + * @param m1 will get m2's contents + * @param m2 will get m1's contents + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + friend inline void swap(MFDataModel& m1, MFDataModel& m2) noexcept { + using std::swap; + + if (m1.bogus) { + m2.bogus = true; + return; + } + if (m2.bogus) { + m1.bogus = true; + return; + } + swap(m1.body, m2.body); + swap(m1.bindings, m2.bindings); + swap(m1.bindingsLen, m2.bindingsLen); + swap(m1.unsupportedStatements, m2.unsupportedStatements); + swap(m1.unsupportedStatementsLen, m2.unsupportedStatementsLen); + } + /** + * Assignment operator + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + MFDataModel& operator=(MFDataModel) noexcept; + /** + * Copy constructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + MFDataModel(const MFDataModel& other); + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~MFDataModel(); + + /** + * The mutable `MFDataModel::Builder` class allows the data model to be + * constructed incrementally. Builder is not copyable or movable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API Builder : public UMemory { + private: + friend class MFDataModel; + + void checkDuplicate(const VariableName&, UErrorCode&) const; + void buildSelectorsMessage(UErrorCode&); + bool hasPattern = true; + bool hasSelectors = false; + Pattern pattern; + // The following members are not LocalPointers for the same reason as in SelectorKeys::Builder + UVector* selectors = nullptr; + UVector* variants = nullptr; + UVector* bindings = nullptr; + UVector* unsupportedStatements = nullptr; + public: + /** + * Adds a binding, There must not already be a binding + * with the same name. + * + * @param b The binding. Passed by move. + * @param status Input/output error code. Set to U_DUPLICATE_DECLARATION_ERROR + * if `addBinding()` was previously called with a binding + * with the same variable name as `b`. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& addBinding(Binding&& b, UErrorCode& status); + /** + * Adds an unsupported statement. + * + * @param s The statement. Passed by move. + * @param status Input/output error code. + * + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& addUnsupportedStatement(UnsupportedStatement&& s, UErrorCode& status); + /** + * Adds a selector expression. Copies `expression`. + * If a pattern was previously set, clears the pattern. + * + * @param selector Expression to add as a selector. Passed by move. + * @param errorCode Input/output error code + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& addSelector(Expression&& selector, UErrorCode& errorCode) noexcept; + /** + * Adds a single variant. + * If a pattern was previously set using `setPattern()`, clears the pattern. + * + * @param keys Keys for the variant. Passed by move. + * @param pattern Pattern for the variant. Passed by move. + * @param errorCode Input/output error code + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& addVariant(SelectorKeys&& keys, Pattern&& pattern, UErrorCode& errorCode) noexcept; + /** + * Sets the body of the message as a pattern. + * If selectors and/or variants were previously set, clears them. + * + * @param pattern Pattern to represent the body of the message. + * Passed by move. + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& setPattern(Pattern&& pattern); + /** + * Constructs a new immutable data model. + * If `setPattern()` has not been called and if `addSelector()` and + * `addVariant()` were not each called at least once, + * `status` is set to `U_INVALID_STATE_ERROR`. + * If `addSelector()` was called and `addVariant()` was never called, + * or vice versa, then `status` is set to U_INVALID_STATE_ERROR. + * Otherwise, either a Pattern or Selectors message is constructed + * based on the pattern that was previously set, or selectors and variants + * that were previously set. + * + * The builder object (`this`) can still be used after calling `build()`. + * + * @param status Input/output error code. + * @return The new MFDataModel + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + MFDataModel build(UErrorCode& status) const noexcept; + /** + * Default constructor. + * Returns a Builder with no pattern or selectors set. + * Either `setPattern()` or both `addSelector()` and + * `addVariant()` must be called before calling `build()` + * on the resulting builder. + * + * @param status Input/output error code. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder(UErrorCode& status); + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~Builder(); + Builder(const Builder&) = delete; + Builder& operator=(const Builder&) = delete; + Builder(Builder&&) = delete; + Builder& operator=(Builder&&) = delete; + }; // class Builder + + private: + friend class Checker; + friend class MessageFormatter; + friend class Serializer; + + Pattern empty; // Provided so that `getPattern()` can return a result + // if called on a selectors message + bool hasPattern() const { return std::holds_alternative<Pattern>(body); } + + bool bogus = false; // Set if a copy constructor fails + + // A message body is either a matcher (selector list and variant list), + // or a single pattern + std::variant<Matcher, Pattern> body; + + // Bindings for local variables + /* const */ LocalArray<Binding> bindings; + int32_t bindingsLen = 0; + + // Unsupported statements + // (Treated as a type of `declaration` in the data model spec; + // stored separately for convenience) + /* const */ LocalArray<UnsupportedStatement> unsupportedStatements; + int32_t unsupportedStatementsLen = 0; + + const Binding* getLocalVariablesInternal() const; + const Expression* getSelectorsInternal() const; + const Variant* getVariantsInternal() const; + const UnsupportedStatement* getUnsupportedStatementsInternal() const; + + int32_t numSelectors() const { + const Matcher* matcher = std::get_if<Matcher>(&body); + return (matcher == nullptr ? 0 : matcher->numSelectors); + } + int32_t numVariants() const { + const Matcher* matcher = std::get_if<Matcher>(&body); + return (matcher == nullptr ? 0 : matcher->numVariants); + } + + // Helper + void initBindings(const Binding*); + + MFDataModel(const Builder& builder, UErrorCode&) noexcept; + }; // class MFDataModel + +} // namespace message2 + +U_NAMESPACE_END + +#endif // U_HIDE_DEPRECATED_API + +#endif /* #if !UCONFIG_NO_MF2 */ + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif /* U_SHOW_CPLUSPLUS_API */ + +#endif // MESSAGEFORMAT_DATA_MODEL_H + +// eof + diff --git a/contrib/libs/icu/include/unicode/messageformat2_data_model_names.h b/contrib/libs/icu/include/unicode/messageformat2_data_model_names.h new file mode 100644 index 0000000000..fb30707932 --- /dev/null +++ b/contrib/libs/icu/include/unicode/messageformat2_data_model_names.h @@ -0,0 +1,42 @@ +// © 2024 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#ifndef MESSAGEFORMAT_DATA_MODEL_NAMES_H +#define MESSAGEFORMAT_DATA_MODEL_NAMES_H + +#if U_SHOW_CPLUSPLUS_API + +#if !UCONFIG_NO_FORMATTING + +#if !UCONFIG_NO_MF2 + +#include "unicode/unistr.h" + +#ifndef U_HIDE_DEPRECATED_API + +U_NAMESPACE_BEGIN + +namespace message2 { + + namespace data_model { + typedef UnicodeString VariableName; + typedef UnicodeString FunctionName; + } // namespace data_model +} // namespace message2 + +U_NAMESPACE_END + +#endif // U_HIDE_DEPRECATED_API + +#endif /* #if !UCONFIG_NO_MF2 */ + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif /* U_SHOW_CPLUSPLUS_API */ + +#endif // MESSAGEFORMAT_DATA_MODEL_NAMES_H + +// eof + diff --git a/contrib/libs/icu/include/unicode/messageformat2_formattable.h b/contrib/libs/icu/include/unicode/messageformat2_formattable.h new file mode 100644 index 0000000000..8a779adb9a --- /dev/null +++ b/contrib/libs/icu/include/unicode/messageformat2_formattable.h @@ -0,0 +1,1017 @@ +// © 2024 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#ifndef MESSAGEFORMAT2_FORMATTABLE_H +#define MESSAGEFORMAT2_FORMATTABLE_H + +#if U_SHOW_CPLUSPLUS_API + +#if !UCONFIG_NO_FORMATTING + +#if !UCONFIG_NO_MF2 + +#include "unicode/chariter.h" +#include "unicode/numberformatter.h" +#include "unicode/messageformat2_data_model_names.h" + +#ifndef U_HIDE_DEPRECATED_API + +#include <map> +#include <variant> + +U_NAMESPACE_BEGIN + +class Hashtable; +class UVector; + +namespace message2 { + + class Formatter; + class MessageContext; + class Selector; + + // Formattable + // ---------- + + /** + * `FormattableObject` is an abstract class that can be implemented in order to define + * an arbitrary class that can be passed to a custom formatter or selector function. + * To be passed in such a way, it must be wrapped in a `Formattable` object. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API FormattableObject : public UObject { + public: + /** + * Returns an arbitrary string representing the type of this object. + * It's up to the implementor of this class, as well as the implementors + * of any custom functions that rely on particular values of this tag + * corresponding to particular classes that the object contents can be + * downcast to, to ensure that the type tags are used soundly. + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual const UnicodeString& tag() const = 0; + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~FormattableObject(); + }; // class FormattableObject + + class Formattable; +} // namespace message2 + +U_NAMESPACE_END + +/// @cond DOXYGEN_IGNORE +// Export an explicit template instantiation of the std::variant that is used +// to represent the message2::Formattable class. +// (When building DLLs for Windows this is required.) +// (See measunit_impl.h, datefmt.h, collationiterator.h, erarules.h and others +// for similar examples.) +#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN +#if defined(U_REAL_MSVC) && defined(_MSVC_STL_VERSION) +template class U_I18N_API std::_Variant_storage_<false, + double, + int64_t, + icu::UnicodeString, + icu::Formattable, + const icu::message2::FormattableObject *, + std::pair<const icu::message2::Formattable *,int32_t>>; +#endif +typedef std::pair<const icu::message2::Formattable*, int32_t> P; +template class U_I18N_API std::variant<double, + int64_t, + icu::UnicodeString, + icu::Formattable, + const icu::message2::FormattableObject*, + P>; +#endif +/// @endcond + +U_NAMESPACE_BEGIN + +namespace message2 { + /** + * The `Formattable` class represents a typed value that can be formatted, + * originating either from a message argument or a literal in the code. + * ICU's Formattable class is not used in MessageFormat 2 because it's unsafe to copy an + * icu::Formattable value that contains an object. (See ICU-20275). + * + * `Formattable` is immutable (not deeply immutable) and + * is movable and copyable. + * (Copying does not do a deep copy when the wrapped value is an array or + * object. Likewise, while a pointer to a wrapped array or object is `const`, + * the referents of the pointers may be mutated by other code.) + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API Formattable : public UObject { + public: + + /** + * Gets the data type of this Formattable object. + * @return the data type of this Formattable object. + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + UFormattableType getType() const; + + /** + * Gets the double value of this object. If this object is not of type + * UFMT_DOUBLE, then the result is undefined and the error code is set. + * + * @param status Input/output error code. + * @return the double value of this object. + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + double getDouble(UErrorCode& status) const { + if (U_SUCCESS(status)) { + if (isDecimal() && getType() == UFMT_DOUBLE) { + return (std::get_if<icu::Formattable>(&contents))->getDouble(); + } + if (std::holds_alternative<double>(contents)) { + return *(std::get_if<double>(&contents)); + } + status = U_ILLEGAL_ARGUMENT_ERROR; + } + return 0; + } + + /** + * Gets the long value of this object. If this object is not of type + * UFMT_LONG then the result is undefined and the error code is set. + * + * @param status Input/output error code. + * @return the long value of this object. + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + int32_t getLong(UErrorCode& status) const { + if (U_SUCCESS(status)) { + if (isDecimal() && getType() == UFMT_LONG) { + return std::get_if<icu::Formattable>(&contents)->getLong(); + } + if (std::holds_alternative<int64_t>(contents)) { + return static_cast<int32_t>(*(std::get_if<int64_t>(&contents))); + } + status = U_ILLEGAL_ARGUMENT_ERROR; + } + return 0; + } + + /** + * Gets the int64 value of this object. If this object is not of type + * kInt64 then the result is undefined and the error code is set. + * If conversion to int64 is desired, call getInt64() + * + * @param status Input/output error code. + * @return the int64 value of this object. + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + int64_t getInt64Value(UErrorCode& status) const { + if (U_SUCCESS(status)) { + if (isDecimal() && getType() == UFMT_INT64) { + return std::get_if<icu::Formattable>(&contents)->getInt64(); + } + if (std::holds_alternative<int64_t>(contents)) { + return *(std::get_if<int64_t>(&contents)); + } + status = U_ILLEGAL_ARGUMENT_ERROR; + } + return 0; + } + + /** + * Gets the int64 value of this object. If this object is of a numeric + * type and the magnitude is too large to fit in an int64, then + * the maximum or minimum int64 value, as appropriate, is returned + * and the status is set to U_INVALID_FORMAT_ERROR. If the + * magnitude fits in an int64, then a casting conversion is + * performed, with truncation of any fractional part. If this object is + * not a numeric type, then 0 is returned and + * the status is set to U_INVALID_FORMAT_ERROR. + * @param status the error code + * @return the int64 value of this object. + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + int64_t getInt64(UErrorCode& status) const; + /** + * Gets the string value of this object. If this object is not of type + * kString then the result is undefined and the error code is set. + * + * @param status Input/output error code. + * @return A reference to the string value of this object. + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const UnicodeString& getString(UErrorCode& status) const { + if (U_SUCCESS(status)) { + if (std::holds_alternative<UnicodeString>(contents)) { + return *std::get_if<UnicodeString>(&contents); + } + status = U_ILLEGAL_ARGUMENT_ERROR; + } + return bogusString; + } + + /** + * Gets the Date value of this object. If this object is not of type + * kDate then the result is undefined and the error code is set. + * + * @param status Input/output error code. + * @return the Date value of this object. + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + UDate getDate(UErrorCode& status) const { + if (U_SUCCESS(status)) { + if (isDate()) { + return *std::get_if<double>(&contents); + } + status = U_ILLEGAL_ARGUMENT_ERROR; + } + return 0; + } + + /** + * Returns true if the data type of this Formattable object + * is kDouble + * @return true if this is a pure numeric object + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + UBool isNumeric() const { return (getType() == UFMT_DOUBLE || getType() == UFMT_LONG || getType() == UFMT_INT64); } + + /** + * Gets the array value and count of this object. If this object + * is not of type kArray then the result is undefined and the error code is set. + * + * @param count fill-in with the count of this object. + * @param status Input/output error code. + * @return the array value of this object. + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const Formattable* getArray(int32_t& count, UErrorCode& status) const; + + /** + * Returns a pointer to the FormattableObject contained within this + * formattable, or if this object does not contain a FormattableObject, + * returns nullptr and sets the error code. + * + * @param status Input/output error code. + * @return a FormattableObject pointer, or nullptr + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const FormattableObject* getObject(UErrorCode& status) const { + if (U_SUCCESS(status)) { + // Can't return a reference since FormattableObject + // is an abstract class + if (getType() == UFMT_OBJECT) { + return *std::get_if<const FormattableObject*>(&contents); + // TODO: should assert that if type is object, object is non-null + } + status = U_ILLEGAL_ARGUMENT_ERROR; + } + return nullptr; + } + /** + * Non-member swap function. + * @param f1 will get f2's contents + * @param f2 will get f1's contents + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + friend inline void swap(Formattable& f1, Formattable& f2) noexcept { + using std::swap; + + swap(f1.contents, f2.contents); + swap(f1.holdsDate, f2.holdsDate); + } + /** + * Copy constructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Formattable(const Formattable&); + /** + * Assignment operator + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Formattable& operator=(Formattable) noexcept; + /** + * Default constructor. Leaves the Formattable in a + * valid but undefined state. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Formattable() : contents(0.0) {} + /** + * String constructor. + * + * @param s A string to wrap as a Formattable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Formattable(const UnicodeString& s) : contents(s) {} + /** + * Double constructor. + * + * @param d A double value to wrap as a Formattable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Formattable(double d) : contents(d) {} + /** + * Int64 constructor. + * + * @param i An int64 value to wrap as a Formattable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Formattable(int64_t i) : contents(i) {} + /** + * Date factory method. + * + * @param d A UDate value to wrap as a Formattable. + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + static Formattable forDate(UDate d) { + Formattable f; + f.contents = d; + f.holdsDate = true; + return f; + } + /** + * Creates a Formattable object of an appropriate numeric type from a + * a decimal number in string form. The Formattable will retain the + * full precision of the input in decimal format, even when it exceeds + * what can be represented by a double or int64_t. + * + * @param number the unformatted (not localized) string representation + * of the Decimal number. + * @param status the error code. Possible errors include U_INVALID_FORMAT_ERROR + * if the format of the string does not conform to that of a + * decimal number. + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + static Formattable forDecimal(std::string_view number, UErrorCode& status); + /** + * Array constructor. + * + * @param arr An array of Formattables, which is adopted. + * @param len The length of the array. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Formattable(const Formattable* arr, int32_t len) : contents(std::pair(arr, len)) {} + /** + * Object constructor. + * + * @param obj A FormattableObject (not adopted). + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Formattable(const FormattableObject* obj) : contents(obj) {} + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~Formattable(); + /** + * Converts the Formattable object to an ICU Formattable object. + * If this has type UFMT_OBJECT or kArray, then `status` is set to + * U_ILLEGAL_ARGUMENT_ERROR. + * + * @param status Input/output error code. + * @return An icu::Formattable value with the same value as this. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + icu::Formattable asICUFormattable(UErrorCode& status) const; + private: + + std::variant<double, + int64_t, + UnicodeString, + icu::Formattable, // represents a Decimal + const FormattableObject*, + std::pair<const Formattable*, int32_t>> contents; + bool holdsDate = false; // otherwise, we get type errors about UDate being a duplicate type + UnicodeString bogusString; // :(((( + + UBool isDecimal() const { + return std::holds_alternative<icu::Formattable>(contents); + } + UBool isDate() const { + return std::holds_alternative<double>(contents) && holdsDate; + } + }; // class Formattable + +/** + * Internal use only, but has to be included here as part of the implementation + * of the header-only `FunctionOptions::getOptions()` method + * + * A `ResolvedFunctionOption` represents the result of evaluating + * a single named function option. It pairs the given name with the `Formattable` + * value resulting from evaluating the option's value. + * + * `ResolvedFunctionOption` is immutable and is not copyable or movable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ +#ifndef U_IN_DOXYGEN +class U_I18N_API ResolvedFunctionOption : public UObject { + private: + + /* const */ UnicodeString name; + /* const */ Formattable value; + + public: + const UnicodeString& getName() const { return name; } + const Formattable& getValue() const { return value; } + ResolvedFunctionOption(const UnicodeString& n, const Formattable& f) : name(n), value(f) {} + ResolvedFunctionOption() {} + ResolvedFunctionOption(ResolvedFunctionOption&&); + ResolvedFunctionOption& operator=(ResolvedFunctionOption&& other) noexcept { + name = std::move(other.name); + value = std::move(other.value); + return *this; + } + virtual ~ResolvedFunctionOption(); +}; // class ResolvedFunctionOption +#endif + +/** + * Mapping from option names to `message2::Formattable` objects, obtained + * by calling `getOptions()` on a `FunctionOptions` object. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ +using FunctionOptionsMap = std::map<UnicodeString, message2::Formattable>; + +/** + * Structure encapsulating named options passed to a custom selector or formatter. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ +class U_I18N_API FunctionOptions : public UObject { + public: + /** + * Returns a map of all name-value pairs provided as options to this function. + * The syntactic order of options is not guaranteed to + * be preserved. + * + * This class is immutable and movable but not copyable. + * + * @return A map from strings to `message2::Formattable` objects representing + * the results of resolving each option value. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + FunctionOptionsMap getOptions() const { + int32_t len; + const ResolvedFunctionOption* resolvedOptions = getResolvedFunctionOptions(len); + FunctionOptionsMap result; + for (int32_t i = 0; i < len; i++) { + const ResolvedFunctionOption& opt = resolvedOptions[i]; + result[opt.getName()] = opt.getValue(); + } + return result; + } + /** + * Default constructor. + * Returns an empty mapping. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + FunctionOptions() { options = nullptr; } + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~FunctionOptions(); + /** + * Move assignment operator: + * The source FunctionOptions will be left in a valid but undefined state. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + FunctionOptions& operator=(FunctionOptions&&) noexcept; + /** + * Move constructor: + * The source FunctionOptions will be left in a valid but undefined state. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + FunctionOptions(FunctionOptions&&); + /** + * Copy constructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + FunctionOptions& operator=(const FunctionOptions&) = delete; + private: + friend class MessageFormatter; + friend class StandardFunctions; + + explicit FunctionOptions(UVector&&, UErrorCode&); + + const ResolvedFunctionOption* getResolvedFunctionOptions(int32_t& len) const; + UBool getFunctionOption(const UnicodeString&, Formattable&) const; + // Returns empty string if option doesn't exist + UnicodeString getStringFunctionOption(const UnicodeString&) const; + int32_t optionsCount() const { return functionOptionsLen; } + + // Named options passed to functions + // This is not a Hashtable in order to make it possible for code in a public header file + // to construct a std::map from it, on-the-fly. Otherwise, it would be impossible to put + // that code in the header because it would have to call internal Hashtable methods. + ResolvedFunctionOption* options; + int32_t functionOptionsLen = 0; +}; // class FunctionOptions + + + // TODO doc comments + // Encapsulates either a formatted string or formatted number; + // more output types could be added in the future. + + /** + * A `FormattedValue` represents the result of formatting a `message2::Formattable`. + * It contains either a string or a formatted number. (More types could be added + * in the future.) + * + * `FormattedValue` is immutable and movable. It is not copyable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API FormattedValue : public UObject { + public: + /** + * Formatted string constructor. + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + explicit FormattedValue(const UnicodeString&); + /** + * Formatted number constructor. + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + explicit FormattedValue(number::FormattedNumber&&); + /** + * Default constructor. Leaves the FormattedValue in + * a valid but undefined state. + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + FormattedValue() : type(kString) {} + /** + * Returns true iff this is a formatted string. + * + * @return True if and only if this value is a formatted string. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + bool isString() const { return type == kString; } + /** + * Returns true iff this is a formatted number. + * + * @return True if and only if this value is a formatted number. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + bool isNumber() const { return type == kNumber; } + /** + * Gets the string contents of this value. If !isString(), then + * the result is undefined. + * @return A reference to a formatted string. + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const UnicodeString& getString() const { return stringOutput; } + /** + * Gets the number contents of this value. If !isNumber(), then + * the result is undefined. + * @return A reference to a formatted number. + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const number::FormattedNumber& getNumber() const { return numberOutput; } + /** + * Move assignment operator: + * The source FormattedValue will be left in a valid but undefined state. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + FormattedValue& operator=(FormattedValue&&) noexcept; + /** + * Move constructor: + * The source FormattedValue will be left in a valid but undefined state. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + FormattedValue(FormattedValue&& other) { *this = std::move(other); } + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~FormattedValue(); + private: + enum Type { + kString, + kNumber + }; + Type type; + UnicodeString stringOutput; + number::FormattedNumber numberOutput; + }; // class FormattedValue + + /** + * A `FormattablePlaceholder` encapsulates an input value (a `message2::Formattable`) + * together with an optional output value (a `message2::FormattedValue`). + * More information, such as source line/column numbers, could be added to the class + * in the future. + * + * `FormattablePlaceholder` is immutable (not deeply immutable) and movable. + * It is not copyable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API FormattedPlaceholder : public UObject { + public: + /** + * Fallback constructor. Constructs a value that represents a formatting error, + * without recording an input `Formattable` as the source. + * + * @param s An error string. (See the MessageFormat specification for details + * on fallback strings.) + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + explicit FormattedPlaceholder(const UnicodeString& s) : fallback(s), type(kFallback) {} + /** + * Constructor for fully formatted placeholders. + * + * @param input A `FormattedPlaceholder` containing the fallback string and source + * `Formattable` used to construct the formatted value. + * @param output A `FormattedValue` representing the formatted output of `input`. + * Passed by move. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + FormattedPlaceholder(const FormattedPlaceholder& input, FormattedValue&& output) + : fallback(input.fallback), source(input.source), + formatted(std::move(output)), previousOptions(FunctionOptions()), type(kEvaluated) {} + /** + * Constructor for fully formatted placeholders with options. + * + * @param input A `FormattedPlaceholder` containing the fallback string and source + * `Formattable` used to construct the formatted value. + * @param opts Function options that were used to construct `output`. May be the empty map. + * @param output A `FormattedValue` representing the formatted output of `input`. + * Passed by move. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + FormattedPlaceholder(const FormattedPlaceholder& input, FunctionOptions&& opts, FormattedValue&& output) + : fallback(input.fallback), source(input.source), + formatted(std::move(output)), previousOptions(std::move(opts)), type(kEvaluated) {} + /** + * Constructor for unformatted placeholders. + * + * @param input A `Formattable` object. + * @param fb Fallback string to use if an error occurs while formatting the input. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + FormattedPlaceholder(const Formattable& input, const UnicodeString& fb) + : fallback(fb), source(input), type(kUnevaluated) {} + /** + * Default constructor. Leaves the FormattedPlaceholder in a + * valid but undefined state. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + FormattedPlaceholder() : type(kNull) {} + /** + * Returns the source `Formattable` value for this placeholder. + * The result is undefined if this is a null operand. + * + * @return A message2::Formattable value. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const message2::Formattable& asFormattable() const; + /** + * Returns true iff this is a fallback placeholder. + * + * @return True if and only if this placeholder was constructed from a fallback string, + * with no `Formattable` source or formatting output. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + bool isFallback() const { return type == kFallback; } + /** + * Returns true iff this is a null placeholder. + * + * @return True if and only if this placeholder represents the absent argument to a formatter + * that was invoked without an argument. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + bool isNullOperand() const { return type == kNull; } + /** + * Returns true iff this has formatting output. + * + * @return True if and only if this was constructed from both an input `Formattable` and + * output `FormattedValue`. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + bool isEvaluated() const { return (type == kEvaluated); } + /** + * Returns true iff this represents a valid argument to the formatter. + * + * @return True if and only if this is neither the null argument nor a fallback placeholder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + bool canFormat() const { return !(isFallback() || isNullOperand()); } + /** + * Gets the fallback value of this placeholder, to be used in its place if an error occurs while + * formatting it. + * @return A reference to this placeholder's fallback string. + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const UnicodeString& getFallback() const { return fallback; } + /** + * Returns the options of this placeholder. The result is the empty map if !isEvaluated(). + * @return A reference to an option map, capturing the options that were used + * in producing the output of this `FormattedPlaceholder` + * (or empty if there is no output) + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const FunctionOptions& options() const { return previousOptions; } + + /** + * Returns the formatted output of this placeholder. The result is undefined if !isEvaluated(). + * @return A fully formatted `FormattedPlaceholder`. + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const FormattedValue& output() const { return formatted; } + /** + * Move assignment operator: + * The source FormattedPlaceholder will be left in a valid but undefined state. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + FormattedPlaceholder& operator=(FormattedPlaceholder&&) noexcept; + /** + * Move constructor: + * The source FormattedPlaceholder will be left in a valid but undefined state. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + FormattedPlaceholder(FormattedPlaceholder&& other) { *this = std::move(other); } + /** + * Formats this as a string, using defaults. If this is + * either the null operand or is a fallback value, the return value is the result of formatting the + * fallback value (which is the default fallback string if this is the null operand). + * If there is no formatted output and the input is object- or array-typed, + * then the argument is treated as a fallback value, since there is no default formatter + * for objects or arrays. + * + * @param locale The locale to use for formatting numbers or dates + * @param status Input/output error code + * @return The result of formatting this placeholder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + UnicodeString formatToString(const Locale& locale, + UErrorCode& status) const; + + private: + friend class MessageFormatter; + + enum Type { + kFallback, // Represents the result of formatting that encountered an error + kNull, // Represents the absence of both an output and an input (not necessarily an error) + kUnevaluated, // `source` should be valid, but there's no result yet + kEvaluated, // `formatted` exists + }; + UnicodeString fallback; + Formattable source; + FormattedValue formatted; + FunctionOptions previousOptions; // Ignored unless type is kEvaluated + Type type; + }; // class FormattedPlaceholder + + /** + * Not yet implemented: The result of a message formatting operation. Based on + * ICU4J's FormattedMessage.java. + * + * The class will contain information allowing the result to be viewed as a string, + * iterator, etc. (TBD) + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API FormattedMessage : public icu::FormattedValue { + public: + /** + * Not yet implemented. + * + * @internal ICU 75 technology preview + * @deprecated This API is for ICU internal use only. + */ + FormattedMessage(UErrorCode& status) { + if (U_SUCCESS(status)) { + status = U_UNSUPPORTED_ERROR; + } + } + /** + * Not yet implemented. + * + * @internal ICU 75 technology preview + * @deprecated This API is for ICU internal use only. + */ + int32_t length(UErrorCode& status) const { + if (U_SUCCESS(status)) { + status = U_UNSUPPORTED_ERROR; + } + return -1; + } + /** + * Not yet implemented. + * + * @internal ICU 75 technology preview + * @deprecated This API is for ICU internal use only. + */ + char16_t charAt(int32_t index, UErrorCode& status) const { + (void) index; + if (U_SUCCESS(status)) { + status = U_UNSUPPORTED_ERROR; + } + return 0; + } + /** + * Not yet implemented. + * + * @internal ICU 75 technology preview + * @deprecated This API is for ICU internal use only. + */ + StringPiece subSequence(int32_t start, int32_t end, UErrorCode& status) const { + (void) start; + (void) end; + if (U_SUCCESS(status)) { + status = U_UNSUPPORTED_ERROR; + } + return ""; + } + /** + * Not yet implemented. + * + * @internal ICU 75 technology preview + * @deprecated This API is for ICU internal use only. + */ + UnicodeString toString(UErrorCode& status) const override { + if (U_SUCCESS(status)) { + status = U_UNSUPPORTED_ERROR; + } + return {}; + } + /** + * Not yet implemented. + * + * @internal ICU 75 technology preview + * @deprecated This API is for ICU internal use only. + */ + UnicodeString toTempString(UErrorCode& status) const override { + if (U_SUCCESS(status)) { + status = U_UNSUPPORTED_ERROR; + } + return {}; + } + /** + * Not yet implemented. + * + * @internal ICU 75 technology preview + * @deprecated This API is for ICU internal use only. + */ + Appendable& appendTo(Appendable& appendable, UErrorCode& status) const override { + if (U_SUCCESS(status)) { + status = U_UNSUPPORTED_ERROR; + } + return appendable; + } + /** + * Not yet implemented. + * + * @internal ICU 75 technology preview + * @deprecated This API is for ICU internal use only. + */ + UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const override { + (void) cfpos; + if (U_SUCCESS(status)) { + status = U_UNSUPPORTED_ERROR; + } + return false; + } + /** + * Not yet implemented. + * + * @internal ICU 75 technology preview + * @deprecated This API is for ICU internal use only. + */ + CharacterIterator* toCharacterIterator(UErrorCode& status) { + if (U_SUCCESS(status)) { + status = U_UNSUPPORTED_ERROR; + } + return nullptr; + } + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for ICU internal use only. + */ + virtual ~FormattedMessage(); + }; // class FormattedMessage + +} // namespace message2 + +U_NAMESPACE_END + +#endif // U_HIDE_DEPRECATED_API + +#endif /* #if !UCONFIG_NO_MF2 */ + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif /* U_SHOW_CPLUSPLUS_API */ + +#endif // MESSAGEFORMAT2_FORMATTABLE_H + +// eof diff --git a/contrib/libs/icu/include/unicode/messageformat2_function_registry.h b/contrib/libs/icu/include/unicode/messageformat2_function_registry.h new file mode 100644 index 0000000000..b8429e3b83 --- /dev/null +++ b/contrib/libs/icu/include/unicode/messageformat2_function_registry.h @@ -0,0 +1,429 @@ +// © 2024 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#ifndef MESSAGEFORMAT2_FUNCTION_REGISTRY_H +#define MESSAGEFORMAT2_FUNCTION_REGISTRY_H + +#if U_SHOW_CPLUSPLUS_API + +#if !UCONFIG_NO_FORMATTING + +#if !UCONFIG_NO_MF2 + +#include "unicode/messageformat2_data_model_names.h" +#include "unicode/messageformat2_formattable.h" + +#ifndef U_HIDE_DEPRECATED_API + +#include <map> + +U_NAMESPACE_BEGIN + +class Hashtable; +class UVector; + +namespace message2 { + + using namespace data_model; + + /** + * Interface that factory classes for creating formatters must implement. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API FormatterFactory : public UObject { + // TODO: the coding guidelines say that interface classes + // shouldn't inherit from UObject, but if I change it so these + // classes don't, and the individual formatter factory classes + // inherit from public FormatterFactory, public UObject, then + // memory leaks ensue + public: + /** + * Constructs a new formatter object. This method is not const; + * formatter factories with local state may be defined. + * + * @param locale Locale to be used by the formatter. + * @param status Input/output error code. + * @return The new Formatter, which is non-null if U_SUCCESS(status). + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual Formatter* createFormatter(const Locale& locale, UErrorCode& status) = 0; + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~FormatterFactory(); + /** + * Copy constructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + FormatterFactory& operator=(const FormatterFactory&) = delete; + }; // class FormatterFactory + + /** + * Interface that factory classes for creating selectors must implement. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API SelectorFactory : public UObject { + public: + /** + * Constructs a new selector object. + * + * @param locale Locale to be used by the selector. + * @param status Input/output error code. + * @return The new selector, which is non-null if U_SUCCESS(status). + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual Selector* createSelector(const Locale& locale, UErrorCode& status) const = 0; + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~SelectorFactory(); + /** + * Copy constructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + SelectorFactory& operator=(const SelectorFactory&) = delete; + }; // class SelectorFactory + + /** + * Defines mappings from names of formatters and selectors to functions implementing them. + * The required set of formatter and selector functions is defined in the spec. Users can + * also define custom formatter and selector functions. + * + * `MFFunctionRegistry` is immutable and movable. It is not copyable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API MFFunctionRegistry : public UObject { + private: + + using FormatterMap = Hashtable; // Map from stringified function names to FormatterFactory* + using SelectorMap = Hashtable; // Map from stringified function names to SelectorFactory* + + public: + /** + * Looks up a formatter factory by the name of the formatter. The result is non-const, + * since formatter factories may have local state. Returns the result by pointer + * rather than by reference since it can fail. + * + * @param formatterName Name of the desired formatter. + * @return A pointer to the `FormatterFactory` registered under `formatterName`, or null + * if no formatter was registered under that name. The pointer is not owned + * by the caller. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + FormatterFactory* getFormatter(const FunctionName& formatterName) const; + /** + * Looks up a selector factory by the name of the selector. (This returns the result by pointer + * rather than by reference since `FormatterFactory` is an abstract class.) + * + * @param selectorName Name of the desired selector. + * @return A pointer to the `SelectorFactory` registered under `selectorName`, or null + * if no formatter was registered under that name. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + const SelectorFactory* getSelector(const FunctionName& selectorName) const; + /** + * Looks up a formatter factory by a type tag. This method gets the name of the default formatter registered + * for that type. If no formatter was explicitly registered for this type, it returns false. + * + * @param formatterType Type tag for the desired `FormattableObject` type to be formatted. + * @param name Output parameter; initialized to the name of the default formatter for `formatterType` + * if one has been registered. Its value is undefined otherwise. + * @return True if and only if the function registry contains a default formatter for `formatterType`. + * If the return value is false, then the value of `name` is undefined. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + UBool getDefaultFormatterNameByType(const UnicodeString& formatterType, FunctionName& name) const; + /** + * The mutable Builder class allows each formatter and selector factory + * to be initialized separately; calling its `build()` method yields an + * immutable MFFunctionRegistry object. + * + * Builder is not copyable or movable. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API Builder : public UObject { + private: + // Must use raw pointers to avoid instantiating `LocalPointer` on an internal type + FormatterMap* formatters; + SelectorMap* selectors; + Hashtable* formattersByType; + + // Do not define copy constructor/assignment operator + Builder& operator=(const Builder&) = delete; + Builder(const Builder&) = delete; + + public: + /* + Notes about `adoptFormatter()`'s type signature: + + Alternative considered: take a non-owned FormatterFactory* + This is unsafe. + + Alternative considered: take a FormatterFactory& + This requires getFormatter() to cast the reference to a pointer, + as it must return an unowned FormatterFactory* since it can fail. + That is also unsafe, since the caller could delete the pointer. + + The "TemperatureFormatter" test from the previous ICU4J version doesn't work now, + as it only works if the `formatterFactory` argument is non-owned. + If registering a non-owned FormatterFactory is desirable, this could + be re-thought. + */ + /** + * Registers a formatter factory to a given formatter name. + * + * @param formatterName Name of the formatter being registered. + * @param formatterFactory A pointer to a FormatterFactory object to use + * for creating `formatterName` formatters. This argument is adopted. + * @param errorCode Input/output error code + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& adoptFormatter(const data_model::FunctionName& formatterName, FormatterFactory* formatterFactory, UErrorCode& errorCode); + /** + * Registers a formatter factory to a given type tag. + * (See `FormattableObject` for details on type tags.) + * + * @param type Tag for objects to be formatted with this formatter. + * @param functionName A reference to the name of the function to use for + * creating formatters for `formatterType` objects. + * @param errorCode Input/output error code + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& setDefaultFormatterNameByType(const UnicodeString& type, const data_model::FunctionName& functionName, UErrorCode& errorCode); + + /** + * Registers a selector factory to a given selector name. Adopts `selectorFactory`. + * + * @param selectorName Name of the selector being registered. + * @param selectorFactory A SelectorFactory object to use for creating `selectorName` + * selectors. + * @param errorCode Input/output error code + * @return A reference to the builder. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& adoptSelector(const data_model::FunctionName& selectorName, SelectorFactory* selectorFactory, UErrorCode& errorCode); + /** + * Creates an immutable `MFFunctionRegistry` object with the selectors and formatters + * that were previously registered. The builder cannot be used after this call. + * The `build()` method is destructive to avoid the need for a deep copy of the + * `FormatterFactory` and `SelectorFactory` objects (this would be necessary because + * `FormatterFactory` can have mutable state), which in turn would require implementors + * of those interfaces to implement a `clone()` method. + * + * @return The new MFFunctionRegistry + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + MFFunctionRegistry build(); + /** + * Default constructor. + * Returns a Builder with no functions registered. + * + * @param errorCode Input/output error code + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + Builder(UErrorCode& errorCode); + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~Builder(); + }; // class MFFunctionRegistry::Builder + + /** + * Move assignment operator: + * The source MFFunctionRegistry will be left in a valid but undefined state. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + MFFunctionRegistry& operator=(MFFunctionRegistry&&) noexcept; + /** + * Move constructor: + * The source MFFunctionRegistry will be left in a valid but undefined state. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + MFFunctionRegistry(MFFunctionRegistry&& other) { *this = std::move(other); } + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~MFFunctionRegistry(); + + private: + friend class MessageContext; + friend class MessageFormatter; + + // Do not define copy constructor or copy assignment operator + MFFunctionRegistry& operator=(const MFFunctionRegistry&) = delete; + MFFunctionRegistry(const MFFunctionRegistry&) = delete; + + MFFunctionRegistry(FormatterMap* f, SelectorMap* s, Hashtable* byType); + + MFFunctionRegistry() {} + + // Debugging; should only be called on a function registry with + // all the standard functions registered + void checkFormatter(const char*) const; + void checkSelector(const char*) const; + void checkStandard() const; + + bool hasFormatter(const data_model::FunctionName& f) const; + bool hasSelector(const data_model::FunctionName& s) const; + void cleanup() noexcept; + + // Must use raw pointers to avoid instantiating `LocalPointer` on an internal type + FormatterMap* formatters = nullptr; + SelectorMap* selectors = nullptr; + // Mapping from strings (type tags) to FunctionNames + Hashtable* formattersByType = nullptr; + }; // class MFFunctionRegistry + + /** + * Interface that formatter classes must implement. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API Formatter : public UObject { + public: + /** + * Formats the input passed in `context` by setting an output using one of the + * `FormattingContext` methods or indicating an error. + * + * @param toFormat Placeholder, including a source formattable value and possibly + * the output of a previous formatter applied to it; see + * `message2::FormattedPlaceholder` for details. Passed by move. + * @param options The named function options. Passed by move + * @param status Input/output error code. Should not be set directly by the + * custom formatter, which should use `FormattingContext::setFormattingWarning()` + * to signal errors. The custom formatter may pass `status` to other ICU functions + * that can signal errors using this mechanism. + * + * @return The formatted value. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual FormattedPlaceholder format(FormattedPlaceholder&& toFormat, + FunctionOptions&& options, + UErrorCode& status) const = 0; + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~Formatter(); + }; // class Formatter + + /** + * Interface that selector classes must implement. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + class U_I18N_API Selector : public UObject { + public: + /** + * Compares the input to an array of keys, and returns an array of matching + * keys sorted by preference. + * + * @param toFormat The unnamed function argument; passed by move. + * @param options A reference to the named function options. + * @param keys An array of strings that are compared to the input + * (`context.getFormattableInput()`) in an implementation-specific way. + * @param keysLen The length of `keys`. + * @param prefs An array of strings with length `keysLen`. The contents of + * the array is undefined. `selectKey()` should set the contents + * of `prefs` to a subset of `keys`, with the best match placed at the lowest index. + * @param prefsLen A reference that `selectKey()` should set to the length of `prefs`, + * which must be less than or equal to `keysLen`. + * @param status Input/output error code. Should not be set directly by the + * custom selector, which should use `FormattingContext::setSelectorError()` + * to signal errors. The custom selector may pass `status` to other ICU functions + * that can signal errors using this mechanism. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual void selectKey(FormattedPlaceholder&& toFormat, + FunctionOptions&& options, + const UnicodeString* keys, + int32_t keysLen, + UnicodeString* prefs, + int32_t& prefsLen, + UErrorCode& status) const = 0; + // Note: This takes array arguments because the internal MessageFormat code has to + // call this method, and can't include any code that constructs std::vectors. + /** + * Destructor. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ + virtual ~Selector(); + }; // class Selector + +} // namespace message2 + +U_NAMESPACE_END + +#endif // U_HIDE_DEPRECATED_API + +#endif /* #if !UCONFIG_NO_MF2 */ + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif /* U_SHOW_CPLUSPLUS_API */ + +#endif // MESSAGEFORMAT2_FUNCTION_REGISTRY_H + +// eof diff --git a/contrib/libs/icu/include/unicode/msgfmt.h b/contrib/libs/icu/include/unicode/msgfmt.h index a8a61f90e3..cb47ba4878 100644 --- a/contrib/libs/icu/include/unicode/msgfmt.h +++ b/contrib/libs/icu/include/unicode/msgfmt.h @@ -444,7 +444,7 @@ public: * @return the locale of the object. * @stable ICU 2.0 */ - virtual const Locale& getLocale(void) const; + virtual const Locale& getLocale() const; /** * Applies the given pattern string to this message format. @@ -850,7 +850,7 @@ public: * other classes have different class IDs. * @stable ICU 2.0 */ - virtual UClassID getDynamicClassID(void) const override; + virtual UClassID getDynamicClassID() const override; /** * Return the class ID for this class. This is useful only for @@ -863,7 +863,7 @@ public: * @return The class ID for all objects of this class. * @stable ICU 2.0 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); #ifndef U_HIDE_INTERNAL_API /** diff --git a/contrib/libs/icu/include/unicode/normalizer2.h b/contrib/libs/icu/include/unicode/normalizer2.h index 972894ec42..6856ff8720 100644 --- a/contrib/libs/icu/include/unicode/normalizer2.h +++ b/contrib/libs/icu/include/unicode/normalizer2.h @@ -147,7 +147,10 @@ public: getNFKDInstance(UErrorCode &errorCode); /** - * Returns a Normalizer2 instance for Unicode NFKC_Casefold normalization. + * Returns a Normalizer2 instance for Unicode toNFKC_Casefold() normalization + * which is equivalent to applying the NFKC_Casefold mappings and then NFC. + * See https://www.unicode.org/reports/tr44/#NFKC_Casefold + * * Same as getInstance(nullptr, "nfkc_cf", UNORM2_COMPOSE, errorCode). * Returns an unmodifiable singleton instance. Do not delete it. * @param errorCode Standard ICU error code. Its input value must @@ -160,6 +163,25 @@ public: static const Normalizer2 * getNFKCCasefoldInstance(UErrorCode &errorCode); +#ifndef U_HIDE_DRAFT_API + /** + * Returns a Normalizer2 instance for a variant of Unicode toNFKC_Casefold() normalization + * which is equivalent to applying the NFKC_Simple_Casefold mappings and then NFC. + * See https://www.unicode.org/reports/tr44/#NFKC_Simple_Casefold + * + * Same as getInstance(nullptr, "nfkc_scf", UNORM2_COMPOSE, errorCode). + * Returns an unmodifiable singleton instance. Do not delete it. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return the requested Normalizer2, if successful + * @draft ICU 74 + */ + static const Normalizer2 * + getNFKCSimpleCasefoldInstance(UErrorCode &errorCode); +#endif // U_HIDE_DRAFT_API + /** * Returns a Normalizer2 instance which uses the specified data file * (packageName/name similar to ucnv_openPackage() and ures_open()/ResourceBundle) @@ -172,7 +194,7 @@ public: * Use name="nfkc_cf" and UNORM2_COMPOSE for Unicode standard NFKC_CF=NFKC_Casefold. * * @param packageName nullptr for ICU built-in data, otherwise application data package name - * @param name "nfc" or "nfkc" or "nfkc_cf" or name of custom data file + * @param name "nfc" or "nfkc" or "nfkc_cf" or "nfkc_scf" or name of custom data file * @param mode normalization mode (compose or decompose etc.) * @param errorCode Standard ICU error code. Its input value must * pass the U_SUCCESS() test, or else the function returns diff --git a/contrib/libs/icu/include/unicode/normlzr.h b/contrib/libs/icu/include/unicode/normlzr.h index 03a7aa080d..0309bce538 100644 --- a/contrib/libs/icu/include/unicode/normlzr.h +++ b/contrib/libs/icu/include/unicode/normlzr.h @@ -466,7 +466,7 @@ public: * @return the current normalized code point * @deprecated ICU 56 Use Normalizer2 instead. */ - UChar32 current(void); + UChar32 current(); /** * Return the first character in the normalized text. @@ -476,7 +476,7 @@ public: * @return the first normalized code point * @deprecated ICU 56 Use Normalizer2 instead. */ - UChar32 first(void); + UChar32 first(); /** * Return the last character in the normalized text. @@ -486,7 +486,7 @@ public: * @return the last normalized code point * @deprecated ICU 56 Use Normalizer2 instead. */ - UChar32 last(void); + UChar32 last(); /** * Return the next character in the normalized text. @@ -502,7 +502,7 @@ public: * @return the next normalized code point * @deprecated ICU 56 Use Normalizer2 instead. */ - UChar32 next(void); + UChar32 next(); /** * Return the previous character in the normalized text and decrement. @@ -518,7 +518,7 @@ public: * @return the previous normalized code point * @deprecated ICU 56 Use Normalizer2 instead. */ - UChar32 previous(void); + UChar32 previous(); /** * Set the iteration position in the input text that is being normalized, @@ -536,7 +536,7 @@ public: * This is equivalent to setIndexOnly(startIndex)). * @deprecated ICU 56 Use Normalizer2 instead. */ - void reset(void); + void reset(); /** * Retrieve the current iteration position in the input text that is @@ -552,7 +552,7 @@ public: * @return the current index in the input text * @deprecated ICU 56 Use Normalizer2 instead. */ - int32_t getIndex(void) const; + int32_t getIndex() const; /** * Retrieve the index of the start of the input text. This is the begin index @@ -562,7 +562,7 @@ public: * @return the smallest index in the input text where the Normalizer operates * @deprecated ICU 56 Use Normalizer2 instead. */ - int32_t startIndex(void) const; + int32_t startIndex() const; /** * Retrieve the index of the end of the input text. This is the end index @@ -574,7 +574,7 @@ public: * @return the first index in the input text where the Normalizer does not operate * @deprecated ICU 56 Use Normalizer2 instead. */ - int32_t endIndex(void) const; + int32_t endIndex() const; /** * Returns true when both iterators refer to the same character in the same @@ -610,7 +610,7 @@ public: * @return the hash code * @deprecated ICU 56 Use Normalizer2 instead. */ - int32_t hashCode(void) const; + int32_t hashCode() const; //------------------------------------------------------------------------- // Property access methods @@ -643,7 +643,7 @@ public: * @see #setMode * @deprecated ICU 56 Use Normalizer2 instead. */ - UNormalizationMode getUMode(void) const; + UNormalizationMode getUMode() const; /** * Set options that affect this <code>Normalizer</code>'s operation. @@ -749,7 +749,7 @@ private: UBool previousNormalize(); void init(); - void clearBuffer(void); + void clearBuffer(); //------------------------------------------------------------------------- // Private data diff --git a/contrib/libs/icu/include/unicode/nounit.h b/contrib/libs/icu/include/unicode/nounit.h index 96aca35d01..6646074ced 100644 --- a/contrib/libs/icu/include/unicode/nounit.h +++ b/contrib/libs/icu/include/unicode/nounit.h @@ -43,7 +43,7 @@ namespace NoUnit { * @stable ICU 68 */ static inline MeasureUnit U_EXPORT2 base() { - return MeasureUnit(); + return {}; } /** diff --git a/contrib/libs/icu/include/unicode/numberformatter.h b/contrib/libs/icu/include/unicode/numberformatter.h index caf98e3dfa..b02d987ce2 100644 --- a/contrib/libs/icu/include/unicode/numberformatter.h +++ b/contrib/libs/icu/include/unicode/numberformatter.h @@ -80,6 +80,9 @@ * This API is based on the <em>fluent</em> design pattern popularized by libraries such as Google's Guava. For * extensive details on the design of this API, read <a href="https://goo.gl/szi5VB">the design doc</a>. * + * <p> + * Note: To format monetary/currency values, specify the currency in the `.unit()` function. + * * @author Shane Carr */ @@ -90,15 +93,13 @@ class IFixedDecimal; class FieldPositionIteratorHandler; class FormattedStringBuilder; -namespace numparse { -namespace impl { +namespace numparse::impl { // Forward declarations: class NumberParserImpl; class MultiplierParseHandler; -} -} +} // namespace numparse::impl namespace units { @@ -2257,14 +2258,13 @@ class U_I18N_API NumberFormatterSettings { */ Derived usage(StringPiece usage) &&; -#ifndef U_HIDE_DRAFT_API /** * Specifies the DisplayOptions. For example, UDisplayOptionsGrammaticalCase specifies * the desired case for a unit formatter's output (e.g. accusative, dative, genitive). * * @param displayOptions * @return The fluent chain. - * @draft ICU 72 + * @stable ICU 72 */ Derived displayOptions(const DisplayOptions &displayOptions) const &; @@ -2273,10 +2273,9 @@ class U_I18N_API NumberFormatterSettings { * * @param displayOptions * @return The fluent chain. - * @draft ICU 72 + * @stable ICU 72 */ Derived displayOptions(const DisplayOptions &displayOptions) &&; -#endif // U_HIDE_DRAFT_API #ifndef U_HIDE_INTERNAL_API /** @@ -2496,11 +2495,18 @@ class U_I18N_API UnlocalizedNumberFormatter explicit UnlocalizedNumberFormatter( NumberFormatterSettings<UnlocalizedNumberFormatter>&& src) noexcept; + explicit UnlocalizedNumberFormatter(const impl::MacroProps ¯os); + + explicit UnlocalizedNumberFormatter(impl::MacroProps &¯os); + // To give the fluent setters access to this class's constructor: friend class NumberFormatterSettings<UnlocalizedNumberFormatter>; // To give NumberFormatter::with() access to this class's constructor: friend class NumberFormatter; + + // To give LNF::withoutLocale() access to this class's constructor: + friend class LocalizedNumberFormatter; }; /** @@ -2603,6 +2609,25 @@ class U_I18N_API LocalizedNumberFormatter */ Format* toFormat(UErrorCode& status) const; +#ifndef U_HIDE_DRAFT_API + /** + * Disassociate the locale from this formatter. + * + * @return The fluent chain. + * @draft ICU 75 + */ + UnlocalizedNumberFormatter withoutLocale() const &; + + /** + * Overload of withoutLocale() for use on an rvalue reference. + * + * @return The fluent chain. + * @see #withoutLocale + * @draft ICU 75 + */ + UnlocalizedNumberFormatter withoutLocale() &&; +#endif // U_HIDE_DRAFT_API + /** * Default constructor: puts the formatter into a valid but undefined state. * diff --git a/contrib/libs/icu/include/unicode/numberrangeformatter.h b/contrib/libs/icu/include/unicode/numberrangeformatter.h index 8ca20f31d7..b8bbc1ba07 100644 --- a/contrib/libs/icu/include/unicode/numberrangeformatter.h +++ b/contrib/libs/icu/include/unicode/numberrangeformatter.h @@ -462,11 +462,18 @@ class U_I18N_API UnlocalizedNumberRangeFormatter explicit UnlocalizedNumberRangeFormatter( NumberRangeFormatterSettings<UnlocalizedNumberRangeFormatter>&& src) noexcept; + explicit UnlocalizedNumberRangeFormatter(const impl::RangeMacroProps ¯os); + + explicit UnlocalizedNumberRangeFormatter(impl::RangeMacroProps &¯os); + // To give the fluent setters access to this class's constructor: friend class NumberRangeFormatterSettings<UnlocalizedNumberRangeFormatter>; // To give NumberRangeFormatter::with() access to this class's constructor: friend class NumberRangeFormatter; + + // To give LNRF::withoutLocale() access to this class's constructor: + friend class LocalizedNumberRangeFormatter; }; /** @@ -496,6 +503,25 @@ class U_I18N_API LocalizedNumberRangeFormatter FormattedNumberRange formatFormattableRange( const Formattable& first, const Formattable& second, UErrorCode& status) const; +#ifndef U_HIDE_DRAFT_API + /** + * Disassociate the locale from this formatter. + * + * @return The fluent chain. + * @draft ICU 75 + */ + UnlocalizedNumberRangeFormatter withoutLocale() const &; + + /** + * Overload of withoutLocale() for use on an rvalue reference. + * + * @return The fluent chain. + * @see #withoutLocale + * @draft ICU 75 + */ + UnlocalizedNumberRangeFormatter withoutLocale() &&; +#endif // U_HIDE_DRAFT_API + /** * Default constructor: puts the formatter into a valid but undefined state. * diff --git a/contrib/libs/icu/include/unicode/numfmt.h b/contrib/libs/icu/include/unicode/numfmt.h index e1aa309276..aabbad4f18 100644 --- a/contrib/libs/icu/include/unicode/numfmt.h +++ b/contrib/libs/icu/include/unicode/numfmt.h @@ -199,23 +199,21 @@ public: * @stable ICU 4.8 */ kRoundUnnecessary, -#ifndef U_HIDE_DRAFT_API /** * Rounds ties toward the odd number. - * @draft ICU 73 + * @stable ICU 73 */ kRoundHalfOdd, /** * Rounds ties toward +∞. - * @draft ICU 73 + * @stable ICU 73 */ kRoundHalfCeiling, /** * Rounds ties toward -∞. - * @draft ICU 73 + * @stable ICU 73 */ kRoundHalfFloor, -#endif /* U_HIDE_DRAFT_API */ }; /** @@ -707,7 +705,7 @@ public: * only. * @stable ICU 2.0 */ - UBool isParseIntegerOnly(void) const; + UBool isParseIntegerOnly() const; /** * Sets whether or not numbers should be parsed as integers only. @@ -735,7 +733,7 @@ public: * @see #setLenient * @stable ICU 4.8 */ - virtual UBool isLenient(void) const; + virtual UBool isLenient() const; /** * Create a default style NumberFormat for the current default locale. @@ -898,7 +896,7 @@ public: * @return a StringEnumeration over the locales available at the time of the call * @stable ICU 2.6 */ - static StringEnumeration* U_EXPORT2 getAvailableLocales(void); + static StringEnumeration* U_EXPORT2 getAvailableLocales(); #endif /* UCONFIG_NO_SERVICE */ /** @@ -910,7 +908,7 @@ public: * @see setGroupingUsed * @stable ICU 2.0 */ - UBool isGroupingUsed(void) const; + UBool isGroupingUsed() const; /** * Set whether or not grouping will be used in this format. @@ -928,7 +926,7 @@ public: * @see setMaximumIntegerDigits * @stable ICU 2.0 */ - int32_t getMaximumIntegerDigits(void) const; + int32_t getMaximumIntegerDigits() const; /** * Sets the maximum number of digits allowed in the integer portion of a @@ -952,7 +950,7 @@ public: * @see setMinimumIntegerDigits * @stable ICU 2.0 */ - int32_t getMinimumIntegerDigits(void) const; + int32_t getMinimumIntegerDigits() const; /** * Sets the minimum number of digits allowed in the integer portion of a @@ -974,7 +972,7 @@ public: * @see setMaximumFractionDigits * @stable ICU 2.0 */ - int32_t getMaximumFractionDigits(void) const; + int32_t getMaximumFractionDigits() const; /** * Sets the maximum number of digits allowed in the fraction portion of a @@ -996,7 +994,7 @@ public: * @see setMinimumFractionDigits * @stable ICU 2.0 */ - int32_t getMinimumFractionDigits(void) const; + int32_t getMinimumFractionDigits() const; /** * Sets the minimum number of digits allowed in the fraction portion of a @@ -1062,7 +1060,7 @@ public: * @return A rounding mode * @stable ICU 60 */ - virtual ERoundingMode getRoundingMode(void) const; + virtual ERoundingMode getRoundingMode() const; /** * Set the rounding mode. If a subclass does not support rounding, this will do nothing. @@ -1081,7 +1079,7 @@ public: * @return The class ID for all objects of this class. * @stable ICU 2.0 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. @@ -1094,7 +1092,7 @@ public: * other classes have different class IDs. * @stable ICU 2.0 */ - virtual UClassID getDynamicClassID(void) const override = 0; + virtual UClassID getDynamicClassID() const override = 0; protected: @@ -1204,7 +1202,7 @@ public: * be listed by getAvailableLocales. * @stable ICU 2.6 */ - virtual UBool visible(void) const = 0; + virtual UBool visible() const = 0; /** * Return the locale names directly supported by this factory. The number of names @@ -1255,7 +1253,7 @@ public: /** * @stable ICU 2.6 */ - virtual UBool visible(void) const override; + virtual UBool visible() const override; /** * @stable ICU 2.6 diff --git a/contrib/libs/icu/include/unicode/numsys.h b/contrib/libs/icu/include/unicode/numsys.h index 51a6e147b1..58072ff665 100644 --- a/contrib/libs/icu/include/unicode/numsys.h +++ b/contrib/libs/icu/include/unicode/numsys.h @@ -185,7 +185,7 @@ public: * @stable ICU 4.2 * */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * ICU "poor man's RTTI", returns a UClassID for the actual class. diff --git a/contrib/libs/icu/include/unicode/parsepos.h b/contrib/libs/icu/include/unicode/parsepos.h index d33a812ad0..99cdd7edab 100644 --- a/contrib/libs/icu/include/unicode/parsepos.h +++ b/contrib/libs/icu/include/unicode/parsepos.h @@ -129,7 +129,7 @@ public: * @return the current index. * @stable ICU 2.0 */ - inline int32_t getIndex(void) const; + inline int32_t getIndex() const; /** * Set the current parse position. @@ -152,7 +152,7 @@ public: * error index has not been set. * @stable ICU 2.0 */ - inline int32_t getErrorIndex(void) const; + inline int32_t getErrorIndex() const; /** * ICU "poor man's RTTI", returns a UClassID for this class. diff --git a/contrib/libs/icu/include/unicode/platform.h b/contrib/libs/icu/include/unicode/platform.h index ed1cd25f1b..6d0e0ed97b 100644 --- a/contrib/libs/icu/include/unicode/platform.h +++ b/contrib/libs/icu/include/unicode/platform.h @@ -207,6 +207,17 @@ #endif /** + * \def U_REAL_MSVC + * Defined if the compiler is the real MSVC compiler (and not something like + * Clang setting _MSC_VER in order to compile Windows code that requires it). + * Otherwise undefined. + * @internal + */ +#if (defined(_MSC_VER) && !(defined(__clang__) && __clang__)) || defined(U_IN_DOXYGEN) +# define U_REAL_MSVC +#endif + +/** * \def CYGWINMSVC * Defined if this is Windows with Cygwin, but using MSVC rather than gcc. * Otherwise undefined. @@ -302,51 +313,6 @@ # define U_PLATFORM_IS_DARWIN_BASED 0 #endif -/** - * \def U_HAVE_STDINT_H - * Defines whether stdint.h is available. It is a C99 standard header. - * We used to include inttypes.h which includes stdint.h but we usually do not need - * the additional definitions from inttypes.h. - * @internal - */ -#ifdef U_HAVE_STDINT_H - /* Use the predefined value. */ -#elif U_PLATFORM_USES_ONLY_WIN32_API -# if defined(__BORLANDC__) || U_PLATFORM == U_PF_MINGW || (defined(_MSC_VER) && _MSC_VER>=1600) - /* Windows Visual Studio 9 and below do not have stdint.h & inttypes.h, but VS 2010 adds them. */ -# define U_HAVE_STDINT_H 1 -# else -# define U_HAVE_STDINT_H 0 -# endif -#elif U_PLATFORM == U_PF_SOLARIS - /* Solaris has inttypes.h but not stdint.h. */ -# define U_HAVE_STDINT_H 0 -#elif U_PLATFORM == U_PF_AIX && !defined(_AIX51) && defined(_POWER) - /* PPC AIX <= 4.3 has inttypes.h but not stdint.h. */ -# define U_HAVE_STDINT_H 0 -#else -# define U_HAVE_STDINT_H 1 -#endif - -/** - * \def U_HAVE_INTTYPES_H - * Defines whether inttypes.h is available. It is a C99 standard header. - * We include inttypes.h where it is available but stdint.h is not. - * @internal - */ -#ifdef U_HAVE_INTTYPES_H - /* Use the predefined value. */ -#elif U_PLATFORM == U_PF_SOLARIS - /* Solaris has inttypes.h but not stdint.h. */ -# define U_HAVE_INTTYPES_H 1 -#elif U_PLATFORM == U_PF_AIX && !defined(_AIX51) && defined(_POWER) - /* PPC AIX <= 4.3 has inttypes.h but not stdint.h. */ -# define U_HAVE_INTTYPES_H 1 -#else - /* Most platforms have both inttypes.h and stdint.h, or neither. */ -# define U_HAVE_INTTYPES_H U_HAVE_STDINT_H -#endif - /*===========================================================================*/ /** @{ Compiler and environment features */ /*===========================================================================*/ @@ -507,6 +473,8 @@ /* Otherwise use the predefined value. */ #elif !defined(__cplusplus) # define U_CPLUSPLUS_VERSION 0 +#elif __cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) +# define U_CPLUSPLUS_VERSION 17 #elif __cplusplus >= 201402L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L) # define U_CPLUSPLUS_VERSION 14 #elif __cplusplus >= 201103L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201103L) @@ -754,9 +722,9 @@ /* * Notes: * C++11 and C11 require support for UTF-16 literals - * TODO: Fix for plain C. Doesn't work on Mac. + * Doesn't work on Mac C11 (see workaround in ptypes.h). */ -# if U_CPLUSPLUS_VERSION >= 11 || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) +# if defined(__cplusplus) || !U_PLATFORM_IS_DARWIN_BASED # define U_HAVE_CHAR16_T 1 # else # define U_HAVE_CHAR16_T 0 diff --git a/contrib/libs/icu/include/unicode/plurfmt.h b/contrib/libs/icu/include/unicode/plurfmt.h index 8e6cbb4454..b18489d7fa 100644 --- a/contrib/libs/icu/include/unicode/plurfmt.h +++ b/contrib/libs/icu/include/unicode/plurfmt.h @@ -190,11 +190,6 @@ public: * @param status output param set to success/failure code on exit, which * must not indicate a failure before the function call. * @stable ICU 4.0 - * <p> - * <h4>Sample code</h4> - * \snippet samples/plurfmtsample/plurfmtsample.cpp PluralFormatExample1 - * \snippet samples/plurfmtsample/plurfmtsample.cpp PluralFormatExample - * <p> */ PluralFormat(const Locale& locale, const PluralRules& rules, UErrorCode& status); @@ -513,7 +508,7 @@ public: * @stable ICU 4.0 * */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * ICU "poor man's RTTI", returns a UClassID for the actual class. diff --git a/contrib/libs/icu/include/unicode/plurrule.h b/contrib/libs/icu/include/unicode/plurrule.h index b7d95175f5..7e2fe37f73 100644 --- a/contrib/libs/icu/include/unicode/plurrule.h +++ b/contrib/libs/icu/include/unicode/plurrule.h @@ -553,7 +553,7 @@ public: * @stable ICU 4.0 * */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * ICU "poor man's RTTI", returns a UClassID for the actual class. diff --git a/contrib/libs/icu/include/unicode/ptypes.h b/contrib/libs/icu/include/unicode/ptypes.h index 70324ffee3..270a729ccb 100644 --- a/contrib/libs/icu/include/unicode/ptypes.h +++ b/contrib/libs/icu/include/unicode/ptypes.h @@ -42,89 +42,25 @@ /* NULL, size_t, wchar_t */ #include <stddef.h> -/* - * If all compilers provided all of the C99 headers and types, - * we would just unconditionally #include <stdint.h> here - * and not need any of the stuff after including platform.h. - */ - -/* Find out if we have stdint.h etc. */ +/* More platform-specific definitions. */ #include "unicode/platform.h" /*===========================================================================*/ /* Generic data types */ /*===========================================================================*/ -/* If your platform does not have the <stdint.h> header, you may - need to edit the typedefs in the #else section below. - Use #if...#else...#endif with predefined compiler macros if possible. */ -#if U_HAVE_STDINT_H - -/* - * We mostly need <stdint.h> (which defines the standard integer types) but not <inttypes.h>. - * <inttypes.h> includes <stdint.h> and adds the printf/scanf helpers PRId32, SCNx16 etc. - * which we almost never use, plus stuff like imaxabs() which we never use. - */ #include <stdint.h> -#if U_PLATFORM == U_PF_OS390 -/* The features header is needed to get (u)int64_t sometimes. */ -#include <features.h> -/* z/OS has <stdint.h>, but some versions are missing uint8_t (APAR PK62248). */ -#if !defined(__uint8_t) -#define __uint8_t 1 -typedef unsigned char uint8_t; -#endif -#endif /* U_PLATFORM == U_PF_OS390 */ - -#elif U_HAVE_INTTYPES_H - -# include <inttypes.h> - -#else /* neither U_HAVE_STDINT_H nor U_HAVE_INTTYPES_H */ - -/// \cond -#if ! U_HAVE_INT8_T -typedef signed char int8_t; -#endif - -#if ! U_HAVE_UINT8_T -typedef unsigned char uint8_t; -#endif - -#if ! U_HAVE_INT16_T -typedef signed short int16_t; -#endif - -#if ! U_HAVE_UINT16_T -typedef unsigned short uint16_t; -#endif - -#if ! U_HAVE_INT32_T -typedef signed int int32_t; -#endif - -#if ! U_HAVE_UINT32_T -typedef unsigned int uint32_t; +// C++11 and C11 both specify that the data type char16_t should exist, C++11 +// as a keyword and C11 as a typedef in the uchar.h header file, but not all +// implementations (looking at you, Apple, spring 2024) actually do this, so +// ICU4C must detect and deal with that. +#if !defined(__cplusplus) && !defined(U_IN_DOXYGEN) +# if U_HAVE_CHAR16_T +# include <uchar.h> +# else + typedef uint16_t char16_t; +# endif #endif -#if ! U_HAVE_INT64_T -#ifdef _MSC_VER - typedef signed __int64 int64_t; -#else - typedef signed long long int64_t; -#endif -#endif - -#if ! U_HAVE_UINT64_T -#ifdef _MSC_VER - typedef unsigned __int64 uint64_t; -#else - typedef unsigned long long uint64_t; -#endif -#endif -/// \endcond - -#endif /* U_HAVE_STDINT_H / U_HAVE_INTTYPES_H */ - #endif /* _PTYPES_H */ diff --git a/contrib/libs/icu/include/unicode/rbbi.h b/contrib/libs/icu/include/unicode/rbbi.h index 418b52e41f..659e3e46b3 100644 --- a/contrib/libs/icu/include/unicode/rbbi.h +++ b/contrib/libs/icu/include/unicode/rbbi.h @@ -43,6 +43,69 @@ class RBBIDataWrapper; class UnhandledEngine; class UStack; + +#ifndef U_HIDE_INTERNAL_API +/** + * The ExternalBreakEngine class define an abstract interface for the host environment + * to provide a low level facility to break text for unicode text in script that the text boundary + * cannot be handled by upper level rule based logic, for example, for Chinese and Japanese + * word breaking, Thai, Khmer, Burmese, Lao and other Southeast Asian scripts. + * The host environment implement one or more subclass of ExternalBreakEngine and + * register them in the initialization time by calling + * RuleBasedBreakIterator::registerExternalBreakEngine(). ICU adopt and own the engine and will + * delete the registered external engine in proper time during the clean up + * event. + * @internal ICU 74 technology preview + */ +class ExternalBreakEngine : public UObject { + public: + /** + * destructor + * @internal ICU 74 technology preview + */ + virtual ~ExternalBreakEngine() {} + + /** + * <p>Indicate whether this engine handles a particular character when + * the RuleBasedBreakIterator is used for a particular locale. This method is used + * by the RuleBasedBreakIterator to find a break engine.</p> + * @param c A character which begins a run that the engine might handle. + * @param locale The locale. + * @return true if this engine handles the particular character for that locale. + * @internal ICU 74 technology preview + */ + virtual bool isFor(UChar32 c, const char* locale) const = 0; + + /** + * <p>Indicate whether this engine handles a particular character.This method is + * used by the RuleBasedBreakIterator after it already find a break engine to see which + * characters after the first one can be handled by this break engine.</p> + * @param c A character that the engine might handle. + * @return true if this engine handles the particular character. + * @internal ICU 74 technology preview + */ + virtual bool handles(UChar32 c) const = 0; + + /** + * <p>Divide up a range of text handled by this break engine.</p> + * + * @param text A UText representing the text + * @param start The start of the range of known characters + * @param end The end of the range of known characters + * @param foundBreaks Output of C array of int32_t break positions, or + * nullptr + * @param foundBreaksCapacity The capacity of foundBreaks + * @param status Information on any errors encountered. + * @return The number of breaks found + * @internal ICU 74 technology preview + */ + virtual int32_t fillBreaks(UText* text, int32_t start, int32_t end, + int32_t* foundBreaks, int32_t foundBreaksCapacity, + UErrorCode& status) const = 0; +}; +#endif /* U_HIDE_INTERNAL_API */ + + /** * * A subclass of BreakIterator whose behavior is specified using a list of rules. @@ -325,14 +388,14 @@ public: * @return A hash code * @stable ICU 2.0 */ - virtual int32_t hashCode(void) const; + virtual int32_t hashCode() const; /** * Returns the description used to create this iterator * @return the description used to create this iterator * @stable ICU 2.0 */ - virtual const UnicodeString& getRules(void) const; + virtual const UnicodeString& getRules() const; //======================================================================= // BreakIterator overrides @@ -362,8 +425,7 @@ public: * @return An iterator over the text being analyzed. * @stable ICU 2.0 */ - virtual CharacterIterator& getText(void) const override; - + virtual CharacterIterator& getText() const override; /** * Get a UText for the text being analyzed. @@ -423,14 +485,14 @@ public: * @return The offset of the beginning of the text, zero. * @stable ICU 2.0 */ - virtual int32_t first(void) override; + virtual int32_t first() override; /** * Sets the current iteration position to the end of the text. * @return The text's past-the-end offset. * @stable ICU 2.0 */ - virtual int32_t last(void) override; + virtual int32_t last() override; /** * Advances the iterator either forward or backward the specified number of steps. @@ -449,14 +511,14 @@ public: * @return The position of the first boundary after this one. * @stable ICU 2.0 */ - virtual int32_t next(void) override; + virtual int32_t next() override; /** * Moves the iterator backwards, to the last boundary preceding this one. * @return The position of the last boundary position preceding this one. * @stable ICU 2.0 */ - virtual int32_t previous(void) override; + virtual int32_t previous() override; /** * Sets the iterator to refer to the first boundary position following @@ -494,8 +556,7 @@ public: * @return The current iteration position. * @stable ICU 2.0 */ - virtual int32_t current(void) const override; - + virtual int32_t current() const override; /** * Return the status tag from the break rule that determined the boundary at @@ -566,7 +627,7 @@ public: * other classes have different class IDs. * @stable ICU 2.0 */ - virtual UClassID getDynamicClassID(void) const override; + virtual UClassID getDynamicClassID() const override; /** * Returns the class ID for this class. This is useful only for @@ -579,7 +640,7 @@ public: * @return The class ID for all objects of this class. * @stable ICU 2.0 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); #ifndef U_FORCE_HIDE_DEPRECATED_API /** @@ -716,9 +777,10 @@ private: * This function returns the appropriate LanguageBreakEngine for a * given character c. * @param c A character in the dictionary set + * @param locale The locale. * @internal (private) */ - const LanguageBreakEngine *getLanguageBreakEngine(UChar32 c); + const LanguageBreakEngine *getLanguageBreakEngine(UChar32 c, const char* locale); public: #ifndef U_HIDE_INTERNAL_API @@ -734,8 +796,24 @@ private: */ void dumpTables(); #endif /* U_HIDE_INTERNAL_API */ + +#ifndef U_HIDE_INTERNAL_API + /** + * Register a new external break engine. The external break engine will be adopted. + * Because ICU may choose to cache break engine internally, this must + * be called at application startup, prior to any calls to + * object methods of RuleBasedBreakIterator to avoid undefined behavior. + * @param toAdopt the ExternalBreakEngine instance to be adopted + * @param status the in/out status code, no special meanings are assigned + * @internal ICU 74 technology preview + */ + static void U_EXPORT2 registerExternalBreakEngine( + ExternalBreakEngine* toAdopt, UErrorCode& status); +#endif /* U_HIDE_INTERNAL_API */ + }; + U_NAMESPACE_END #endif /* #if !UCONFIG_NO_BREAK_ITERATION */ diff --git a/contrib/libs/icu/include/unicode/rbnf.h b/contrib/libs/icu/include/unicode/rbnf.h index 0336ac1f81..f42d91d776 100644 --- a/contrib/libs/icu/include/unicode/rbnf.h +++ b/contrib/libs/icu/include/unicode/rbnf.h @@ -64,18 +64,20 @@ enum URBNFRuleSetTag { * @stable ICU 2.2 */ URBNF_ORDINAL, +#ifndef U_HIDE_DEPRECATED_API /** * Requests predefined ruleset for formatting a value as a duration in hours, minutes, and seconds. - * @stable ICU 2.2 + * @deprecated ICU 74 Use MeasureFormat instead. */ URBNF_DURATION, +#endif // U_HIDE_DERECATED_API /** * Requests predefined ruleset for various non-place-value numbering systems. * WARNING: The same resource contains rule sets for a variety of different numbering systems. * You need to call setDefaultRuleSet() on the formatter to choose the actual numbering system. * @stable ICU 2.2 */ - URBNF_NUMBERING_SYSTEM, + URBNF_NUMBERING_SYSTEM = 3, #ifndef U_HIDE_DEPRECATED_API /** * One more than the highest normal URBNFRuleSetTag value. @@ -434,7 +436,16 @@ enum URBNFRuleSetTag { * <tr> * <td><<</td> * <td>in normal rule</td> - * <td>Divide the number by the rule's divisor and format the quotient</td> + * <td>Divide the number by the rule's divisor, perform floor() on the quotient, + * and format the resulting value.<br> + * If there is a DecimalFormat pattern between the < characters and the + * rule does NOT also contain a >> substitution, we DON'T perform + * floor() on the quotient-- the quotient is passed through to the DecimalFormat + * intact. That is, for the value 1,900:<br> + * - "1/1000: << thousand;" will produce "one thousand"<br> + * - "1/1000: <0< thousand;" will produce "2 thousand" (NOT "1 thousand")<br> + * - "1/1000: <0< seconds >0> milliseconds;" will produce "1 second 900 milliseconds" + * </td> * </tr> * <tr> * <td></td> @@ -762,7 +773,7 @@ public: * @return the number of locales for which we have localized rule set display names. * @stable ICU 3.2 */ - virtual int32_t getNumberOfRuleSetDisplayNameLocales(void) const; + virtual int32_t getNumberOfRuleSetDisplayNameLocales() const; /** * Return the index'th display name locale. @@ -976,7 +987,7 @@ public: * @see #setLenient * @stable ICU 2.0 */ - virtual inline UBool isLenient(void) const override; + virtual inline UBool isLenient() const override; #endif @@ -1015,7 +1026,7 @@ public: * @return A rounding mode * @stable ICU 60 */ - virtual ERoundingMode getRoundingMode(void) const override; + virtual ERoundingMode getRoundingMode() const override; /** * Set the rounding mode. @@ -1030,14 +1041,14 @@ public: * * @stable ICU 2.8 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * ICU "poor man's RTTI", returns a UClassID for the actual class. * * @stable ICU 2.8 */ - virtual UClassID getDynamicClassID(void) const override; + virtual UClassID getDynamicClassID() const override; /** * Sets the decimal format symbols, which is generally not changed @@ -1120,7 +1131,7 @@ private: #if !UCONFIG_NO_COLLATION inline UBool -RuleBasedNumberFormat::isLenient(void) const { +RuleBasedNumberFormat::isLenient() const { return lenient; } diff --git a/contrib/libs/icu/include/unicode/rbtz.h b/contrib/libs/icu/include/unicode/rbtz.h index 1cc3483ebf..3393b3d97a 100644 --- a/contrib/libs/icu/include/unicode/rbtz.h +++ b/contrib/libs/icu/include/unicode/rbtz.h @@ -217,7 +217,7 @@ public: * @return The TimeZone's raw GMT offset. * @stable ICU 3.8 */ - virtual int32_t getRawOffset(void) const override; + virtual int32_t getRawOffset() const override; /** * Queries if this time zone uses daylight savings time. @@ -225,7 +225,7 @@ public: * false, otherwise. * @stable ICU 3.8 */ - virtual UBool useDaylightTime(void) const override; + virtual UBool useDaylightTime() const override; #ifndef U_FORCE_HIDE_DEPRECATED_API /** @@ -313,8 +313,8 @@ public: int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) const override; private: - void deleteRules(void); - void deleteTransitions(void); + void deleteRules(); + void deleteTransitions(); UVector* copyRules(UVector* source); TimeZoneRule* findRuleInFinal(UDate date, UBool local, int32_t NonExistingTimeOpt, int32_t DuplicatedTimeOpt) const; @@ -346,7 +346,7 @@ public: * @return The class ID for all objects of this class. * @stable ICU 3.8 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This @@ -359,7 +359,7 @@ public: * other classes have different class IDs. * @stable ICU 3.8 */ - virtual UClassID getDynamicClassID(void) const override; + virtual UClassID getDynamicClassID() const override; }; U_NAMESPACE_END diff --git a/contrib/libs/icu/include/unicode/reldatefmt.h b/contrib/libs/icu/include/unicode/reldatefmt.h index 4123468c65..5dc4905b12 100644 --- a/contrib/libs/icu/include/unicode/reldatefmt.h +++ b/contrib/libs/icu/include/unicode/reldatefmt.h @@ -248,8 +248,6 @@ typedef enum UDateDirection { #endif // U_HIDE_DEPRECATED_API } UDateDirection; -#if !UCONFIG_NO_BREAK_ITERATION - U_NAMESPACE_BEGIN class BreakIterator; @@ -560,7 +558,7 @@ public: * * This method returns a String. To get more information about the * formatting result, use formatNumericToValue(). - * + * * @param offset The signed offset for the specified unit. This * will be formatted according to this object's * NumberFormat object. @@ -586,7 +584,7 @@ public: * * This method returns a FormattedRelativeDateTime, which exposes more * information than the String returned by formatNumeric(). - * + * * @param offset The signed offset for the specified unit. This * will be formatted according to this object's * NumberFormat object. @@ -696,11 +694,19 @@ private: const SharedPluralRules *fPluralRules; UDateRelativeDateTimeFormatterStyle fStyle; UDisplayContext fContext; +#if !UCONFIG_NO_BREAK_ITERATION const SharedBreakIterator *fOptBreakIterator; +#else + std::nullptr_t fOptBreakIterator = nullptr; +#endif // !UCONFIG_NO_BREAK_ITERATION Locale fLocale; void init( NumberFormat *nfToAdopt, +#if !UCONFIG_NO_BREAK_ITERATION BreakIterator *brkIter, +#else + std::nullptr_t, +#endif // !UCONFIG_NO_BREAK_ITERATION UErrorCode &status); UnicodeString& adjustForContext(UnicodeString &) const; UBool checkNoAdjustForContext(UErrorCode& status) const; @@ -743,7 +749,6 @@ private: U_NAMESPACE_END -#endif /* !UCONFIG_NO_BREAK_ITERATION */ #endif /* !UCONFIG_NO_FORMATTING */ #endif /* U_SHOW_CPLUSPLUS_API */ diff --git a/contrib/libs/icu/include/unicode/resbund.h b/contrib/libs/icu/include/unicode/resbund.h index 30fc2ac0ab..3965371729 100644 --- a/contrib/libs/icu/include/unicode/resbund.h +++ b/contrib/libs/icu/include/unicode/resbund.h @@ -209,8 +209,7 @@ public: * @return number of resources in a given resource. * @stable ICU 2.0 */ - int32_t - getSize(void) const; + int32_t getSize() const; /** * returns a string from a string resource type @@ -289,16 +288,14 @@ public: * @return true if there are more elements, false if there is no more elements * @stable ICU 2.0 */ - UBool - hasNext(void) const; + UBool hasNext() const; /** * Resets the internal context of a resource so that iteration starts from the first element. * * @stable ICU 2.0 */ - void - resetIterator(void); + void resetIterator(); /** * Returns the key associated with this resource. Not all the resources have a key - only @@ -307,8 +304,7 @@ public: * @return a key associated to this resource, or nullptr if it doesn't have a key * @stable ICU 2.0 */ - const char* - getKey(void) const; + const char* getKey() const; /** * Gets the locale ID of the resource bundle as a string. @@ -317,9 +313,7 @@ public: * @return the locale ID of the resource bundle as a string * @stable ICU 2.0 */ - const char* - getName(void) const; - + const char* getName() const; /** * Returns the type of a resource. Available types are defined in enum UResType @@ -327,8 +321,7 @@ public: * @return type of the given resource. * @stable ICU 2.0 */ - UResType - getType(void) const; + UResType getType() const; /** * Returns the next resource in a given resource or nullptr if there are no more resources @@ -424,8 +417,7 @@ public: * @see getVersion * @deprecated ICU 2.8 Use getVersion instead. */ - const char* - getVersionNumber(void) const; + const char* getVersionNumber() const; #endif /* U_HIDE_DEPRECATED_API */ /** @@ -445,8 +437,7 @@ public: * @return a Locale object * @deprecated ICU 2.8 Use getLocale(ULocDataLocaleType type, UErrorCode &status) overload instead. */ - const Locale& - getLocale(void) const; + const Locale& getLocale() const; #endif /* U_HIDE_DEPRECATED_API */ /** diff --git a/contrib/libs/icu/include/unicode/schriter.h b/contrib/libs/icu/include/unicode/schriter.h index a2ab17982d..96f03604ad 100644 --- a/contrib/libs/icu/include/unicode/schriter.h +++ b/contrib/libs/icu/include/unicode/schriter.h @@ -156,14 +156,14 @@ public: * @return a class ID for this object. * @stable ICU 2.0 */ - virtual UClassID getDynamicClassID(void) const override; + virtual UClassID getDynamicClassID() const override; /** * Return a class ID for this class (not really public) * @return a class ID for this class * @stable ICU 2.0 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); protected: /** diff --git a/contrib/libs/icu/include/unicode/search.h b/contrib/libs/icu/include/unicode/search.h index a8004efc43..d4fd9ce93b 100644 --- a/contrib/libs/icu/include/unicode/search.h +++ b/contrib/libs/icu/include/unicode/search.h @@ -124,7 +124,7 @@ public: * @return current index in the text being searched. * @stable ICU 2.0 */ - virtual int32_t getOffset(void) const = 0; + virtual int32_t getOffset() const = 0; /** * Sets the text searching attributes located in the enum @@ -163,7 +163,7 @@ public: * @see #last * @stable ICU 2.0 */ - int32_t getMatchedStart(void) const; + int32_t getMatchedStart() const; /** * Returns the length of text in the string which matches the search @@ -179,8 +179,8 @@ public: * @see #last * @stable ICU 2.0 */ - int32_t getMatchedLength(void) const; - + int32_t getMatchedLength() const; + /** * Returns the text that was matched by the most recent call to * <tt>first</tt>, <tt>next</tt>, <tt>previous</tt>, or <tt>last</tt>. @@ -224,7 +224,7 @@ public: * @see #setBreakIterator * @stable ICU 2.0 */ - const BreakIterator * getBreakIterator(void) const; + const BreakIterator* getBreakIterator() const; /** * Set the string text to be searched. Text iteration will hence begin at @@ -260,7 +260,7 @@ public: * @return text string to be searched. * @stable ICU 2.0 */ - const UnicodeString & getText(void) const; + const UnicodeString& getText() const; // operator overloading ---------------------------------------------- @@ -291,7 +291,7 @@ public: * @return cloned object * @stable ICU 2.0 */ - virtual SearchIterator* safeClone(void) const = 0; + virtual SearchIterator* safeClone() const = 0; /** * Returns the first index at which the string text matches the search diff --git a/contrib/libs/icu/include/unicode/selfmt.h b/contrib/libs/icu/include/unicode/selfmt.h index 1802380312..ead5145484 100644 --- a/contrib/libs/icu/include/unicode/selfmt.h +++ b/contrib/libs/icu/include/unicode/selfmt.h @@ -337,7 +337,7 @@ public: * ICU "poor man's RTTI", returns a UClassID for this class. * @stable ICU 4.4 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * ICU "poor man's RTTI", returns a UClassID for the actual class. diff --git a/contrib/libs/icu/include/unicode/simpleformatter.h b/contrib/libs/icu/include/unicode/simpleformatter.h index 7f58106fad..33bdd6d48f 100644 --- a/contrib/libs/icu/include/unicode/simpleformatter.h +++ b/contrib/libs/icu/include/unicode/simpleformatter.h @@ -25,11 +25,9 @@ U_NAMESPACE_BEGIN // Forward declaration: -namespace number { -namespace impl { +namespace number::impl { class SimpleModifier; } -} /** * Formats simple patterns like "{1} was born in {0}". diff --git a/contrib/libs/icu/include/unicode/simplenumberformatter.h b/contrib/libs/icu/include/unicode/simplenumberformatter.h index 32b79a94da..5aa33c6946 100644 --- a/contrib/libs/icu/include/unicode/simplenumberformatter.h +++ b/contrib/libs/icu/include/unicode/simplenumberformatter.h @@ -30,6 +30,8 @@ U_NAMESPACE_BEGIN +/* forward declaration */ +class SimpleDateFormat; namespace number { // icu::number @@ -41,22 +43,19 @@ class AdoptingSignumModifierStore; } // icu::number::impl -#ifndef U_HIDE_DRAFT_API - - /** * An input type for SimpleNumberFormatter. * * This class is mutable and not intended for public subclassing. This class is movable but not copyable. * - * @draft ICU 73 + * @stable ICU 73 */ class U_I18N_API SimpleNumber : public UMemory { public: /** * Creates a SimpleNumber for an integer. * - * @draft ICU 73 + * @stable ICU 73 */ static SimpleNumber forInt64(int64_t value, UErrorCode& status); @@ -65,43 +64,50 @@ class U_I18N_API SimpleNumber : public UMemory { * * This function immediately mutates the inner value. * - * @draft ICU 73 + * @stable ICU 73 */ void multiplyByPowerOfTen(int32_t power, UErrorCode& status); /** - * Rounds the value currently stored in the SimpleNumber to the given power of 10. + * Rounds the value currently stored in the SimpleNumber to the given power of 10, + * which can be before or after the decimal separator. * - * This function immediately mutates the inner value. + * This function does not change minimum integer digits. * - * @draft ICU 73 + * @stable ICU 73 */ void roundTo(int32_t power, UNumberFormatRoundingMode roundingMode, UErrorCode& status); +#ifndef U_HIDE_DRAFT_API /** - * Truncates the most significant digits to the given maximum number of integer digits. + * Sets the number of integer digits to the given amount, truncating if necessary. * - * This function immediately mutates the inner value. + * @draft ICU 75 + */ + void setMaximumIntegerDigits(uint32_t maximumIntegerDigits, UErrorCode& status); +#endif // U_HIDE_DRAFT_API + +#ifndef U_HIDE_DEPRECATED_API + /** + * Alias for setMaximumIntegerDigits. + * Will be removed after ICU 75. * - * @draft ICU 73 + * @deprecated ICU 75 */ void truncateStart(uint32_t maximumIntegerDigits, UErrorCode& status); +#endif // U_HIDE_DEPRECATED_API /** * Pads the beginning of the number with zeros up to the given minimum number of integer digits. * - * This setting is applied upon formatting the number. - * - * @draft ICU 73 + * @stable ICU 73 */ void setMinimumIntegerDigits(uint32_t minimumIntegerDigits, UErrorCode& status); /** * Pads the end of the number with zeros up to the given minimum number of fraction digits. * - * This setting is applied upon formatting the number. - * - * @draft ICU 73 + * @stable ICU 73 */ void setMinimumFractionDigits(uint32_t minimumFractionDigits, UErrorCode& status); @@ -112,7 +118,7 @@ class U_I18N_API SimpleNumber : public UMemory { * * NOTE: This does not support accounting sign notation. * - * @draft ICU 73 + * @stable ICU 73 */ void setSign(USimpleNumberSign sign, UErrorCode& status); @@ -121,14 +127,14 @@ class U_I18N_API SimpleNumber : public UMemory { * * NOTE: This number will fail to format; use forInt64() to create a SimpleNumber with a value. * - * @draft ICU 73 + * @stable ICU 73 */ SimpleNumber() = default; /** * Destruct this SimpleNumber, cleaning up any memory it might own. * - * @draft ICU 73 + * @stable ICU 73 */ ~SimpleNumber() { cleanup(); @@ -137,7 +143,7 @@ class U_I18N_API SimpleNumber : public UMemory { /** * SimpleNumber move constructor. * - * @draft ICU 73 + * @stable ICU 73 */ SimpleNumber(SimpleNumber&& other) noexcept { fData = other.fData; @@ -148,7 +154,7 @@ class U_I18N_API SimpleNumber : public UMemory { /** * SimpleNumber move assignment. * - * @draft ICU 73 + * @stable ICU 73 */ SimpleNumber& operator=(SimpleNumber&& other) noexcept { cleanup(); @@ -169,6 +175,9 @@ class U_I18N_API SimpleNumber : public UMemory { USimpleNumberSign fSign = UNUM_SIMPLE_NUMBER_NO_SIGN; friend class SimpleNumberFormatter; + + // Uses the private constructor to avoid a heap allocation + friend class icu::SimpleDateFormat; }; @@ -180,14 +189,14 @@ class U_I18N_API SimpleNumber : public UMemory { * * This class is immutable and not intended for public subclassing. This class is movable but not copyable. * - * @draft ICU 73 + * @stable ICU 73 */ class U_I18N_API SimpleNumberFormatter : public UMemory { public: /** * Creates a new SimpleNumberFormatter with all locale defaults. * - * @draft ICU 73 + * @stable ICU 73 */ static SimpleNumberFormatter forLocale( const icu::Locale &locale, @@ -196,7 +205,7 @@ class U_I18N_API SimpleNumberFormatter : public UMemory { /** * Creates a new SimpleNumberFormatter, overriding the grouping strategy. * - * @draft ICU 73 + * @stable ICU 73 */ static SimpleNumberFormatter forLocaleAndGroupingStrategy( const icu::Locale &locale, @@ -209,7 +218,7 @@ class U_I18N_API SimpleNumberFormatter : public UMemory { * IMPORTANT: For efficiency, this function borrows the symbols. The symbols MUST remain valid * for the lifetime of the SimpleNumberFormatter. * - * @draft ICU 73 + * @stable ICU 73 */ static SimpleNumberFormatter forLocaleAndSymbolsAndGroupingStrategy( const icu::Locale &locale, @@ -223,7 +232,7 @@ class U_I18N_API SimpleNumberFormatter : public UMemory { * The SimpleNumber argument is "consumed". A new SimpleNumber object should be created for * every formatting operation. * - * @draft ICU 73 + * @stable ICU 73 */ FormattedNumber format(SimpleNumber value, UErrorCode &status) const; @@ -232,7 +241,7 @@ class U_I18N_API SimpleNumberFormatter : public UMemory { * * For more control over the formatting, use SimpleNumber. * - * @draft ICU 73 + * @stable ICU 73 */ FormattedNumber formatInt64(int64_t value, UErrorCode &status) const { return format(SimpleNumber::forInt64(value, status), status); @@ -249,7 +258,7 @@ class U_I18N_API SimpleNumberFormatter : public UMemory { /** * Destruct this SimpleNumberFormatter, cleaning up any memory it might own. * - * @draft ICU 73 + * @stable ICU 73 */ ~SimpleNumberFormatter() { cleanup(); @@ -258,14 +267,14 @@ class U_I18N_API SimpleNumberFormatter : public UMemory { /** * Creates a shell, initialized but non-functional SimpleNumberFormatter. * - * @draft ICU 73 + * @stable ICU 73 */ SimpleNumberFormatter() = default; /** * SimpleNumberFormatter: Move constructor. * - * @draft ICU 73 + * @stable ICU 73 */ SimpleNumberFormatter(SimpleNumberFormatter&& other) noexcept { fGroupingStrategy = other.fGroupingStrategy; @@ -280,7 +289,7 @@ class U_I18N_API SimpleNumberFormatter : public UMemory { /** * SimpleNumberFormatter: Move assignment. * - * @draft ICU 73 + * @stable ICU 73 */ SimpleNumberFormatter& operator=(SimpleNumberFormatter&& other) noexcept { cleanup(); @@ -316,8 +325,6 @@ class U_I18N_API SimpleNumberFormatter : public UMemory { }; -#endif // U_HIDE_DRAFT_API - } // namespace number U_NAMESPACE_END diff --git a/contrib/libs/icu/include/unicode/simpletz.h b/contrib/libs/icu/include/unicode/simpletz.h index 9005c9ccba..bf45c91854 100644 --- a/contrib/libs/icu/include/unicode/simpletz.h +++ b/contrib/libs/icu/include/unicode/simpletz.h @@ -636,7 +636,7 @@ public: * @return The TimeZone's raw GMT offset. * @stable ICU 2.0 */ - virtual int32_t getRawOffset(void) const override; + virtual int32_t getRawOffset() const override; /** * Sets the TimeZone's raw GMT offset (i.e., the number of milliseconds to add @@ -666,7 +666,7 @@ public: * but not 0. * @stable ICU 2.0 */ - virtual int32_t getDSTSavings(void) const override; + virtual int32_t getDSTSavings() const override; /** * Queries if this TimeZone uses Daylight Savings Time. @@ -674,7 +674,7 @@ public: * @return True if this TimeZone uses Daylight Savings Time; false otherwise. * @stable ICU 2.0 */ - virtual UBool useDaylightTime(void) const override; + virtual UBool useDaylightTime() const override; #ifndef U_FORCE_HIDE_DEPRECATED_API /** @@ -773,7 +773,7 @@ public: * same class ID. Objects of other classes have different class IDs. * @stable ICU 2.0 */ - virtual UClassID getDynamicClassID(void) const override; + virtual UClassID getDynamicClassID() const override; /** * Return the class ID for this class. This is useful only for comparing to a return @@ -786,7 +786,7 @@ public: * @return The class ID for all objects of this class. * @stable ICU 2.0 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); private: /** @@ -882,8 +882,8 @@ private: /* Private for BasicTimeZone implementation */ void checkTransitionRules(UErrorCode& status) const; void initTransitionRules(UErrorCode& status); - void clearTransitionRules(void); - void deleteTransitionRules(void); + void clearTransitionRules(); + void deleteTransitionRules(); UBool transitionRulesInitialized; InitialTimeZoneRule* initialRule; TimeZoneTransition* firstTransition; diff --git a/contrib/libs/icu/include/unicode/smpdtfmt.h b/contrib/libs/icu/include/unicode/smpdtfmt.h index 4343bfbca5..a37485a93d 100644 --- a/contrib/libs/icu/include/unicode/smpdtfmt.h +++ b/contrib/libs/icu/include/unicode/smpdtfmt.h @@ -69,7 +69,8 @@ class SimpleNumberFormatter; * getDateInstance(), getDateInstance(), or getDateTimeInstance() rather than * explicitly constructing an instance of SimpleDateFormat. This way, the client * is guaranteed to get an appropriate formatting pattern for whatever locale the - * program is running in. However, if the client needs something more unusual than + * program is running in. If the client needs more control, they should consider using + * DateFormat::createInstanceForSkeleton(). However, if the client needs something more unusual than * the default patterns in the locales, he can construct a SimpleDateFormat directly * and give it an appropriate pattern (or use one of the factory methods on DateFormat * and modify the pattern after the fact with toPattern() and applyPattern(). @@ -77,46 +78,32 @@ class SimpleNumberFormatter; * <p><strong>Date and Time Patterns:</strong></p> * * <p>Date and time formats are specified by <em>date and time pattern</em> strings. + * The full syntax for date and time patterns can be found at + * <a href="https://unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns">https://unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns</a>. + * * Within date and time pattern strings, all unquoted ASCII letters [A-Za-z] are reserved - * as pattern letters representing calendar fields. <code>SimpleDateFormat</code> supports - * the date and time formatting algorithm and pattern letters defined by - * <a href="http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table">UTS#35 - * Unicode Locale Data Markup Language (LDML)</a> and further documented for ICU in the - * <a href="https://unicode-org.github.io/icu/userguide/format_parse/datetime/#date-field-symbol-table">ICU - * User Guide</a>. The following pattern letters are currently available (note that the actual - * values depend on CLDR and may change from the examples shown here):</p> + * as pattern letters representing calendar fields. Some of the most commonly used pattern letters are:</p> * * <table border="1"> * <tr> - * <th>Field</th> * <th style="text-align: center">Sym.</th> * <th style="text-align: center">No.</th> * <th>Example</th> * <th>Description</th> * </tr> * <tr> - * <th rowspan="3">era</th> - * <td style="text-align: center" rowspan="3">G</td> + * <td style="text-align: center">G</td> * <td style="text-align: center">1..3</td> * <td>AD</td> - * <td rowspan="3">Era - Replaced with the Era string for the current date. One to three letters for the + * <td>Era - Replaced with the Era string for the current date. One to three letters for the * abbreviated form, four letters for the long (wide) form, five for the narrow form.</td> * </tr> * <tr> - * <td style="text-align: center">4</td> - * <td>Anno Domini</td> - * </tr> - * <tr> - * <td style="text-align: center">5</td> - * <td>A</td> - * </tr> - * <tr> - * <th rowspan="6">year</th> * <td style="text-align: center">y</td> * <td style="text-align: center">1..n</td> * <td>1996</td> * <td>Year. Normally the length specifies the padding, but for two letters it also specifies the maximum - * length. Example:<div align="center"> + * length. Example:<div style="text-align: center"> * <center> * <table border="1" cellpadding="2" cellspacing="0"> * <tr> @@ -172,49 +159,11 @@ class SimpleNumberFormatter; * </td> * </tr> * <tr> - * <td style="text-align: center">Y</td> - * <td style="text-align: center">1..n</td> - * <td>1997</td> - * <td>Year (in "Week of Year" based calendars). Normally the length specifies the padding, - * but for two letters it also specifies the maximum length. This year designation is used in ISO - * year-week calendar as defined by ISO 8601, but can be used in non-Gregorian based calendar systems - * where week date processing is desired. May not always be the same value as calendar year.</td> - * </tr> - * <tr> - * <td style="text-align: center">u</td> - * <td style="text-align: center">1..n</td> - * <td>4601</td> - * <td>Extended year. This is a single number designating the year of this calendar system, encompassing - * all supra-year fields. For example, for the Julian calendar system, year numbers are positive, with an - * era of BCE or CE. An extended year value for the Julian calendar system assigns positive values to CE - * years and negative values to BCE years, with 1 BCE being year 0.</td> - * </tr> - * <tr> - * <td style="text-align: center" rowspan="3">U</td> - * <td style="text-align: center">1..3</td> - * <td>甲子</td> - * <td rowspan="3">Cyclic year name. Calendars such as the Chinese lunar calendar (and related calendars) - * and the Hindu calendars use 60-year cycles of year names. Use one through three letters for the abbreviated - * name, four for the full (wide) name, or five for the narrow name (currently the data only provides abbreviated names, - * which will be used for all requested name widths). If the calendar does not provide cyclic year name data, - * or if the year value to be formatted is out of the range of years for which cyclic name data is provided, - * then numeric formatting is used (behaves like 'y').</td> - * </tr> - * <tr> - * <td style="text-align: center">4</td> - * <td>(currently also 甲子)</td> - * </tr> - * <tr> - * <td style="text-align: center">5</td> - * <td>(currently also 甲子)</td> - * </tr> - * <tr> - * <th rowspan="6">quarter</th> * <td rowspan="3" style="text-align: center">Q</td> * <td style="text-align: center">1..2</td> * <td>02</td> - * <td rowspan="3">Quarter - Use one or two for the numerical quarter, three for the abbreviation, or four for the - * full (wide) name (five for the narrow name is not yet supported).</td> + * <td rowspan="3">Quarter - Use one or two for the numerical quarter, three for the abbreviation, or four + * for the full (wide) name (five for the narrow name is not yet supported).</td> * </tr> * <tr> * <td style="text-align: center">3</td> @@ -225,48 +174,12 @@ class SimpleNumberFormatter; * <td>2nd quarter</td> * </tr> * <tr> - * <td rowspan="3" style="text-align: center">q</td> - * <td style="text-align: center">1..2</td> - * <td>02</td> - * <td rowspan="3"><b>Stand-Alone</b> Quarter - Use one or two for the numerical quarter, three for the abbreviation, - * or four for the full name (five for the narrow name is not yet supported).</td> - * </tr> - * <tr> - * <td style="text-align: center">3</td> - * <td>Q2</td> - * </tr> - * <tr> - * <td style="text-align: center">4</td> - * <td>2nd quarter</td> - * </tr> - * <tr> - * <th rowspan="8">month</th> * <td rowspan="4" style="text-align: center">M</td> * <td style="text-align: center">1..2</td> * <td>09</td> * <td rowspan="4">Month - Use one or two for the numerical month, three for the abbreviation, four for * the full (wide) name, or five for the narrow name. With two ("MM"), the month number is zero-padded - * if necessary (e.g. "08")</td> - * </tr> - * <tr> - * <td style="text-align: center">3</td> - * <td>Sep</td> - * </tr> - * <tr> - * <td style="text-align: center">4</td> - * <td>September</td> - * </tr> - * <tr> - * <td style="text-align: center">5</td> - * <td>S</td> - * </tr> - * <tr> - * <td rowspan="4" style="text-align: center">L</td> - * <td style="text-align: center">1..2</td> - * <td>09</td> - * <td rowspan="4"><b>Stand-Alone</b> Month - Use one or two for the numerical month, three for the abbreviation, - * four for the full (wide) name, or 5 for the narrow name. With two ("LL"), the month number is zero-padded if - * necessary (e.g. "08")</td> + * if necessary (e.g. "08").</td> * </tr> * <tr> * <td style="text-align: center">3</td> @@ -281,21 +194,6 @@ class SimpleNumberFormatter; * <td>S</td> * </tr> * <tr> - * <th rowspan="2">week</th> - * <td style="text-align: center">w</td> - * <td style="text-align: center">1..2</td> - * <td>27</td> - * <td>Week of Year. Use "w" to show the minimum number of digits, or "ww" to always show two digits - * (zero-padding if necessary, e.g. "08").</td> - * </tr> - * <tr> - * <td style="text-align: center">W</td> - * <td style="text-align: center">1</td> - * <td>3</td> - * <td>Week of Month</td> - * </tr> - * <tr> - * <th rowspan="4">day</th> * <td style="text-align: center">d</td> * <td style="text-align: center">1..2</td> * <td>1</td> @@ -303,29 +201,6 @@ class SimpleNumberFormatter; * two digits (zero-padding if necessary, e.g. "08").</td> * </tr> * <tr> - * <td style="text-align: center">D</td> - * <td style="text-align: center">1..3</td> - * <td>345</td> - * <td>Day of year</td> - * </tr> - * <tr> - * <td style="text-align: center">F</td> - * <td style="text-align: center">1</td> - * <td>2</td> - * <td>Day of Week in Month. The example is for the 2nd Wed in July</td> - * </tr> - * <tr> - * <td style="text-align: center">g</td> - * <td style="text-align: center">1..n</td> - * <td>2451334</td> - * <td>Modified Julian day. This is different from the conventional Julian day number in two regards. - * First, it demarcates days at local zone midnight, rather than noon GMT. Second, it is a local number; - * that is, it depends on the local time zone. It can be thought of as a single number that encompasses - * all the date-related fields.</td> - * </tr> - * <tr> - * <th rowspan="14">week<br> - * day</th> * <td rowspan="4" style="text-align: center">E</td> * <td style="text-align: center">1..3</td> * <td>Tue</td> @@ -345,61 +220,12 @@ class SimpleNumberFormatter; * <td>Tu</td> * </tr> * <tr> - * <td rowspan="5" style="text-align: center">e</td> - * <td style="text-align: center">1..2</td> - * <td>2</td> - * <td rowspan="5">Local day of week. Same as E except adds a numeric value that will depend on the local - * starting day of the week, using one or two letters. For this example, Monday is the first day of the week.</td> - * </tr> - * <tr> - * <td style="text-align: center">3</td> - * <td>Tue</td> - * </tr> - * <tr> - * <td style="text-align: center">4</td> - * <td>Tuesday</td> - * </tr> - * <tr> - * <td style="text-align: center">5</td> - * <td>T</td> - * </tr> - * <tr> - * <td style="text-align: center">6</td> - * <td>Tu</td> - * </tr> - * <tr> - * <td rowspan="5" style="text-align: center">c</td> - * <td style="text-align: center">1</td> - * <td>2</td> - * <td rowspan="5"><b>Stand-Alone</b> local day of week - Use one letter for the local numeric value (same - * as 'e'), three for the short day, four for the full (wide) name, five for the narrow name, or six for - * the short name.</td> - * </tr> - * <tr> - * <td style="text-align: center">3</td> - * <td>Tue</td> - * </tr> - * <tr> - * <td style="text-align: center">4</td> - * <td>Tuesday</td> - * </tr> - * <tr> - * <td style="text-align: center">5</td> - * <td>T</td> - * </tr> - * <tr> - * <td style="text-align: center">6</td> - * <td>Tu</td> - * </tr> - * <tr> - * <th>period</th> * <td style="text-align: center">a</td> * <td style="text-align: center">1</td> * <td>AM</td> * <td>AM or PM</td> * </tr> * <tr> - * <th rowspan="4">hour</th> * <td style="text-align: center">h</td> * <td style="text-align: center">1..2</td> * <td>11</td> @@ -416,27 +242,13 @@ class SimpleNumberFormatter; * 12-hour-cycle format (h or K). Use HH for zero padding.</td> * </tr> * <tr> - * <td style="text-align: center">K</td> - * <td style="text-align: center">1..2</td> - * <td>0</td> - * <td>Hour [0-11]. When used in a skeleton, only matches K or h, see above. Use KK for zero padding.</td> - * </tr> - * <tr> - * <td style="text-align: center">k</td> - * <td style="text-align: center">1..2</td> - * <td>24</td> - * <td>Hour [1-24]. When used in a skeleton, only matches k or H, see above. Use kk for zero padding.</td> - * </tr> - * <tr> - * <th>minute</th> * <td style="text-align: center">m</td> * <td style="text-align: center">1..2</td> * <td>59</td> * <td>Minute. Use "m" to show the minimum number of digits, or "mm" to always show two digits - * (zero-padding if necessary, e.g. "08").</td> + * (zero-padding if necessary, e.g. "08")..</td> * </tr> * <tr> - * <th rowspan="3">second</th> * <td style="text-align: center">s</td> * <td style="text-align: center">1..2</td> * <td>12</td> @@ -444,28 +256,10 @@ class SimpleNumberFormatter; * (zero-padding if necessary, e.g. "08").</td> * </tr> * <tr> - * <td style="text-align: center">S</td> - * <td style="text-align: center">1..n</td> - * <td>3450</td> - * <td>Fractional Second - truncates (like other time fields) to the count of letters when formatting. - * Appends zeros if more than 3 letters specified. Truncates at three significant digits when parsing. - * (example shows display using pattern SSSS for seconds value 12.34567)</td> - * </tr> - * <tr> - * <td style="text-align: center">A</td> - * <td style="text-align: center">1..n</td> - * <td>69540000</td> - * <td>Milliseconds in day. This field behaves <i>exactly</i> like a composite of all time-related fields, - * not including the zone fields. As such, it also reflects discontinuities of those fields on DST transition - * days. On a day of DST onset, it will jump forward. On a day of DST cessation, it will jump backward. This - * reflects the fact that is must be combined with the offset field to obtain a unique local time value.</td> - * </tr> - * <tr> - * <th rowspan="23">zone</th> * <td rowspan="2" style="text-align: center">z</td> * <td style="text-align: center">1..3</td> * <td>PDT</td> - * <td>The <i>short specific non-location format</i>. + * <td>Time zone. The <i>short specific non-location format</i>. * Where that is unavailable, falls back to the <i>short localized GMT format</i> ("O").</td> * </tr> * <tr> @@ -475,43 +269,10 @@ class SimpleNumberFormatter; * Where that is unavailable, falls back to the <i>long localized GMT format</i> ("OOOO").</td> * </tr> * <tr> - * <td rowspan="3" style="text-align: center">Z</td> - * <td style="text-align: center">1..3</td> - * <td>-0800</td> - * <td>The <i>ISO8601 basic format</i> with hours, minutes and optional seconds fields. - * The format is equivalent to RFC 822 zone format (when optional seconds field is absent). - * This is equivalent to the "xxxx" specifier.</td> - * </tr> - * <tr> - * <td style="text-align: center">4</td> - * <td>GMT-8:00</td> - * <td>The <i>long localized GMT format</i>. - * This is equivalent to the "OOOO" specifier.</td> - * </tr> - * <tr> - * <td style="text-align: center">5</td> - * <td>-08:00<br> - * -07:52:58</td> - * <td>The <i>ISO8601 extended format</i> with hours, minutes and optional seconds fields. - * The ISO8601 UTC indicator "Z" is used when local time offset is 0. - * This is equivalent to the "XXXXX" specifier.</td> - * </tr> - * <tr> - * <td rowspan="2" style="text-align: center">O</td> - * <td style="text-align: center">1</td> - * <td>GMT-8</td> - * <td>The <i>short localized GMT format</i>.</td> - * </tr> - * <tr> - * <td style="text-align: center">4</td> - * <td>GMT-08:00</td> - * <td>The <i>long localized GMT format</i>.</td> - * </tr> - * <tr> * <td rowspan="2" style="text-align: center">v</td> * <td style="text-align: center">1</td> * <td>PT</td> - * <td>The <i>short generic non-location format</i>. + * <td>Time zone. The <i>short generic non-location format</i>. * Where that is unavailable, falls back to the <i>generic location format</i> ("VVVV"), * then the <i>short localized GMT format</i> as the final fallback.</td> * </tr> @@ -521,109 +282,6 @@ class SimpleNumberFormatter; * <td>The <i>long generic non-location format</i>. * Where that is unavailable, falls back to <i>generic location format</i> ("VVVV"). * </tr> - * <tr> - * <td rowspan="4" style="text-align: center">V</td> - * <td style="text-align: center">1</td> - * <td>uslax</td> - * <td>The short time zone ID. - * Where that is unavailable, the special short time zone ID <i>unk</i> (Unknown Zone) is used.<br> - * <i><b>Note</b>: This specifier was originally used for a variant of the short specific non-location format, - * but it was deprecated in the later version of the LDML specification. In CLDR 23/ICU 51, the definition of - * the specifier was changed to designate a short time zone ID.</i></td> - * </tr> - * <tr> - * <td style="text-align: center">2</td> - * <td>America/Los_Angeles</td> - * <td>The long time zone ID.</td> - * </tr> - * <tr> - * <td style="text-align: center">3</td> - * <td>Los Angeles</td> - * <td>The exemplar city (location) for the time zone. - * Where that is unavailable, the localized exemplar city name for the special zone <i>Etc/Unknown</i> is used - * as the fallback (for example, "Unknown City"). </td> - * </tr> - * <tr> - * <td style="text-align: center">4</td> - * <td>Los Angeles Time</td> - * <td>The <i>generic location format</i>. - * Where that is unavailable, falls back to the <i>long localized GMT format</i> ("OOOO"; - * Note: Fallback is only necessary with a GMT-style Time Zone ID, like Etc/GMT-830.)<br> - * This is especially useful when presenting possible timezone choices for user selection, - * since the naming is more uniform than the "v" format.</td> - * </tr> - * <tr> - * <td rowspan="5" style="text-align: center">X</td> - * <td style="text-align: center">1</td> - * <td>-08<br> - * +0530<br> - * Z</td> - * <td>The <i>ISO8601 basic format</i> with hours field and optional minutes field. - * The ISO8601 UTC indicator "Z" is used when local time offset is 0.</td> - * </tr> - * <tr> - * <td style="text-align: center">2</td> - * <td>-0800<br> - * Z</td> - * <td>The <i>ISO8601 basic format</i> with hours and minutes fields. - * The ISO8601 UTC indicator "Z" is used when local time offset is 0.</td> - * </tr> - * <tr> - * <td style="text-align: center">3</td> - * <td>-08:00<br> - * Z</td> - * <td>The <i>ISO8601 extended format</i> with hours and minutes fields. - * The ISO8601 UTC indicator "Z" is used when local time offset is 0.</td> - * </tr> - * <tr> - * <td style="text-align: center">4</td> - * <td>-0800<br> - * -075258<br> - * Z</td> - * <td>The <i>ISO8601 basic format</i> with hours, minutes and optional seconds fields. - * (Note: The seconds field is not supported by the ISO8601 specification.) - * The ISO8601 UTC indicator "Z" is used when local time offset is 0.</td> - * </tr> - * <tr> - * <td style="text-align: center">5</td> - * <td>-08:00<br> - * -07:52:58<br> - * Z</td> - * <td>The <i>ISO8601 extended format</i> with hours, minutes and optional seconds fields. - * (Note: The seconds field is not supported by the ISO8601 specification.) - * The ISO8601 UTC indicator "Z" is used when local time offset is 0.</td> - * </tr> - * <tr> - * <td rowspan="5" style="text-align: center">x</td> - * <td style="text-align: center">1</td> - * <td>-08<br> - * +0530</td> - * <td>The <i>ISO8601 basic format</i> with hours field and optional minutes field.</td> - * </tr> - * <tr> - * <td style="text-align: center">2</td> - * <td>-0800</td> - * <td>The <i>ISO8601 basic format</i> with hours and minutes fields.</td> - * </tr> - * <tr> - * <td style="text-align: center">3</td> - * <td>-08:00</td> - * <td>The <i>ISO8601 extended format</i> with hours and minutes fields.</td> - * </tr> - * <tr> - * <td style="text-align: center">4</td> - * <td>-0800<br> - * -075258</td> - * <td>The <i>ISO8601 basic format</i> with hours, minutes and optional seconds fields. - * (Note: The seconds field is not supported by the ISO8601 specification.)</td> - * </tr> - * <tr> - * <td style="text-align: center">5</td> - * <td>-08:00<br> - * -07:52:58</td> - * <td>The <i>ISO8601 extended format</i> with hours, minutes and optional seconds fields. - * (Note: The seconds field is not supported by the ISO8601 specification.)</td> - * </tr> * </table> * * <P> @@ -1057,7 +715,7 @@ public: * with this date-time formatter. * @stable ICU 2.0 */ - virtual const DateFormatSymbols* getDateFormatSymbols(void) const; + virtual const DateFormatSymbols* getDateFormatSymbols() const; /** * Set the date/time formatting symbols. The caller no longer owns the @@ -1085,7 +743,7 @@ public: * @return The class ID for all objects of this class. * @stable ICU 2.0 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This @@ -1098,7 +756,7 @@ public: * other classes have different class IDs. * @stable ICU 2.0 */ - virtual UClassID getDynamicClassID(void) const override; + virtual UClassID getDynamicClassID() const override; /** * Set the calendar to be used by this date format. Initially, the default @@ -1133,7 +791,7 @@ public: * @return the time zone format associated with this date/time formatter. * @internal ICU 49 technology preview */ - virtual const TimeZoneFormat* getTimeZoneFormat(void) const; + virtual const TimeZoneFormat* getTimeZoneFormat() const; /** * Set a particular UDisplayContext value in the formatter, such as @@ -1216,16 +874,16 @@ public: * @return locale in this simple date formatter * @internal ICU 4.0 */ - const Locale& getSmpFmtLocale(void) const; + const Locale& getSmpFmtLocale() const; #endif /* U_HIDE_INTERNAL_API */ private: friend class DateFormat; friend class DateIntervalFormat; - void initializeDefaultCentury(void); + void initializeDefaultCentury(); - void initializeBooleanAttributes(void); + void initializeBooleanAttributes(); SimpleDateFormat() = delete; // default constructor not implemented diff --git a/contrib/libs/icu/include/unicode/sortkey.h b/contrib/libs/icu/include/unicode/sortkey.h index 401b5abad0..a9b6fee83b 100644 --- a/contrib/libs/icu/include/unicode/sortkey.h +++ b/contrib/libs/icu/include/unicode/sortkey.h @@ -162,7 +162,7 @@ public: * @return Returns true if the key is in an invalid, false otherwise. * @stable ICU 2.0 */ - UBool isBogus(void) const; + UBool isBogus() const; /** * Returns a pointer to the collation key values. The storage is owned @@ -231,7 +231,7 @@ public: * @see UnicodeString#hashCode * @stable ICU 2.0 */ - int32_t hashCode(void) const; + int32_t hashCode() const; /** * ICU "poor man's RTTI", returns a UClassID for the actual class. @@ -272,12 +272,12 @@ private: * Set the CollationKey to a "bogus" or invalid state * @return this CollationKey */ - CollationKey& setToBogus(void); + CollationKey& setToBogus(); /** * Resets this CollationKey to an empty state * @return this CollationKey */ - CollationKey& reset(void); + CollationKey& reset(); /** * Allow private access to RuleBasedCollator diff --git a/contrib/libs/icu/include/unicode/stringpiece.h b/contrib/libs/icu/include/unicode/stringpiece.h index df7f36089d..6f2a50eafc 100644 --- a/contrib/libs/icu/include/unicode/stringpiece.h +++ b/contrib/libs/icu/include/unicode/stringpiece.h @@ -130,13 +130,13 @@ class U_COMMON_API StringPiece : public UMemory { * @stable ICU 65 */ template <typename T, - typename = typename std::enable_if< - (std::is_same<decltype(T().data()), const char*>::value + typename = std::enable_if_t< + (std::is_same_v<decltype(T().data()), const char*> #if defined(__cpp_char8_t) - || std::is_same<decltype(T().data()), const char8_t*>::value + || std::is_same_v<decltype(T().data()), const char8_t*> #endif ) && - std::is_same<decltype(T().size()), size_t>::value>::type> + std::is_same_v<decltype(T().size()), size_t>>> StringPiece(T str) : ptr_(reinterpret_cast<const char*>(str.data())), length_(static_cast<int32_t>(str.size())) {} diff --git a/contrib/libs/icu/include/unicode/stsearch.h b/contrib/libs/icu/include/unicode/stsearch.h index b916aebf24..bbad9d22a3 100644 --- a/contrib/libs/icu/include/unicode/stsearch.h +++ b/contrib/libs/icu/include/unicode/stsearch.h @@ -264,7 +264,7 @@ public: * If a collator is created in the constructor, it will be destroyed here. * @stable ICU 2.0 */ - virtual ~StringSearch(void); + virtual ~StringSearch(); /** * Clone this object. @@ -324,7 +324,7 @@ public: * @return current index in the text being searched. * @stable ICU 2.0 */ - virtual int32_t getOffset(void) const override; + virtual int32_t getOffset() const override; /** * Set the target text to be searched. diff --git a/contrib/libs/icu/include/unicode/tblcoll.h b/contrib/libs/icu/include/unicode/tblcoll.h index 43cf35d1a8..0c018beb81 100644 --- a/contrib/libs/icu/include/unicode/tblcoll.h +++ b/contrib/libs/icu/include/unicode/tblcoll.h @@ -449,7 +449,7 @@ public: * IDs. * @stable ICU 2.0 */ - virtual UClassID getDynamicClassID(void) const override; + virtual UClassID getDynamicClassID() const override; /** * Returns the class ID for this class. This is useful only for comparing to @@ -462,7 +462,7 @@ public: * @return The class ID for all objects of this class. * @stable ICU 2.0 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); #ifndef U_HIDE_DEPRECATED_API /** diff --git a/contrib/libs/icu/include/unicode/timezone.h b/contrib/libs/icu/include/unicode/timezone.h index a2c0552c18..1c3be8e32c 100644 --- a/contrib/libs/icu/include/unicode/timezone.h +++ b/contrib/libs/icu/include/unicode/timezone.h @@ -163,7 +163,7 @@ public: * @see getUnknown * @stable ICU 2.0 */ - static const TimeZone* U_EXPORT2 getGMT(void); + static const TimeZone* U_EXPORT2 getGMT(); /** * Creates a <code>TimeZone</code> for the given ID. @@ -364,7 +364,7 @@ public: * @see getUnknown * @stable ICU 2.0 */ - static TimeZone* U_EXPORT2 createDefault(void); + static TimeZone* U_EXPORT2 createDefault(); #ifndef U_HIDE_INTERNAL_API /** @@ -444,6 +444,37 @@ public: static UnicodeString& U_EXPORT2 getCanonicalID(const UnicodeString& id, UnicodeString& canonicalID, UBool& isSystemID, UErrorCode& status); + +#ifndef U_HIDE_DRAFT_API + /** + * Returns the preferred time zone ID in the IANA time zone database for the given time zone ID. + * There are two types of preferred IDs. The first type is the one defined in zone.tab file, + * such as "America/Los_Angeles". The second types is the one defined for zones not associated + * with a specific region, but not defined with "Link" syntax such as "Etc/GMT+10". + * + * <p>Note: For most of valid time zone IDs, this method returns an ID same as getCanonicalID(). + * getCanonicalID() is based on canonical time zone IDs defined in Unicode CLDR. + * These canonical time zone IDs in CLDR were based on very old version of the time zone database. + * In the IANA time zone database, some IDs were updated since then. This API returns a newer + * time zone ID. For example, CLDR defines "Asia/Calcutta" as the canonical time zone ID. This + * method returns "Asia/Kolkata" instead. + * <p> "Etc/Unknown" is a special time zone ID defined by CLDR. There are no corresponding zones + * in the IANA time zone database. Therefore, this API returns U_ILLEGAL_ARGUMENT_ERROR when the + * input ID is "Etc/Unknown". + * + * @param id The input time zone ID. + * @param ianaID Receives the preferred time zone ID in the IANA time zone database. When + * the given time zone ID is not a known time zone ID, this method sets an + * invalid (bogus) string. + * @param status Receives the status. When the given time zone ID is not a known time zone + * ID, U_ILLEGAL_ARGUMENT_ERROR is set. + * @return A reference to the result. + * @draft ICU 74 + */ + static UnicodeString& U_EXPORT2 getIanaID(const UnicodeString&id, UnicodeString& ianaID, + UErrorCode& status); +#endif // U_HIDE_DRAFT_API + /** * Converts a system time zone ID to an equivalent Windows time zone ID. For example, * Windows time zone ID "Pacific Standard Time" is returned for input "America/Los_Angeles". @@ -613,7 +644,7 @@ public: * @return The TimeZone's raw GMT offset. * @stable ICU 2.0 */ - virtual int32_t getRawOffset(void) const = 0; + virtual int32_t getRawOffset() const = 0; /** * Fills in "ID" with the TimeZone's ID. @@ -782,7 +813,7 @@ public: * * @stable ICU 2.0 */ - virtual UBool useDaylightTime(void) const = 0; + virtual UBool useDaylightTime() const = 0; #ifndef U_FORCE_HIDE_DEPRECATED_API /** @@ -826,7 +857,7 @@ public: * @return The class ID for all objects of this class. * @stable ICU 2.0 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * Returns a unique class ID POLYMORPHICALLY. This method is to @@ -839,8 +870,8 @@ public: * same class ID. Objects of other classes have different class IDs. * @stable ICU 2.0 */ - virtual UClassID getDynamicClassID(void) const override = 0; - + virtual UClassID getDynamicClassID() const override = 0; + /** * Returns the amount of time to be added to local standard time * to get local wall clock time. diff --git a/contrib/libs/icu/include/unicode/tmutamt.h b/contrib/libs/icu/include/unicode/tmutamt.h index 88e892fb0c..c73673b629 100644 --- a/contrib/libs/icu/include/unicode/tmutamt.h +++ b/contrib/libs/icu/include/unicode/tmutamt.h @@ -126,8 +126,7 @@ public: * @return The class ID for all objects of this class. * @stable ICU 4.2 */ - static UClassID U_EXPORT2 getStaticClassID(void); - + static UClassID U_EXPORT2 getStaticClassID(); /** * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This @@ -140,8 +139,7 @@ public: * other classes have different class IDs. * @stable ICU 4.2 */ - virtual UClassID getDynamicClassID(void) const override; - + virtual UClassID getDynamicClassID() const override; /** * Get the time unit. diff --git a/contrib/libs/icu/include/unicode/tmutfmt.h b/contrib/libs/icu/include/unicode/tmutfmt.h index 02e0563a01..4f4684a4d8 100644 --- a/contrib/libs/icu/include/unicode/tmutfmt.h +++ b/contrib/libs/icu/include/unicode/tmutfmt.h @@ -171,7 +171,7 @@ public: * @return The class ID for all objects of this class. * @deprecated ICU 53 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This @@ -184,7 +184,7 @@ public: * other classes have different class IDs. * @deprecated ICU 53 */ - virtual UClassID getDynamicClassID(void) const override; + virtual UClassID getDynamicClassID() const override; private: Hashtable* fTimeUnitToCountToPatterns[TimeUnit::UTIMEUNIT_FIELD_COUNT]; diff --git a/contrib/libs/icu/include/unicode/translit.h b/contrib/libs/icu/include/unicode/translit.h index 9ae32967fc..cde8450c88 100644 --- a/contrib/libs/icu/include/unicode/translit.h +++ b/contrib/libs/icu/include/unicode/translit.h @@ -938,7 +938,7 @@ public: * transliterator needs to examine * @stable ICU 2.0 */ - int32_t getMaximumContextLength(void) const; + int32_t getMaximumContextLength() const; protected: @@ -962,7 +962,7 @@ public: * @see #getAvailableIDs * @stable ICU 2.0 */ - virtual const UnicodeString& getID(void) const; + virtual const UnicodeString& getID() const; /** * Returns a name for this transliterator that is appropriate for @@ -1008,7 +1008,7 @@ public: * if this transliterator uses no filter. * @stable ICU 2.0 */ - const UnicodeFilter* getFilter(void) const; + const UnicodeFilter* getFilter() const; /** * Returns the filter used by this transliterator, or <tt>nullptr</tt> if this @@ -1019,7 +1019,7 @@ public: * transliterator uses no filter. * @stable ICU 2.4 */ - UnicodeFilter* orphanFilter(void); + UnicodeFilter* orphanFilter(); /** * Changes the filter used by this transliterator. If the filter @@ -1374,7 +1374,7 @@ public: * @return the number of registered source specifiers. * @stable ICU 2.0 */ - static int32_t U_EXPORT2 countAvailableSources(void); + static int32_t U_EXPORT2 countAvailableSources(); /** * Return a registered source specifier. @@ -1448,7 +1448,7 @@ protected: * Non-mutexed internal method * @internal */ - static int32_t _countAvailableSources(void); + static int32_t _countAvailableSources(); /** * Non-mutexed internal method @@ -1510,7 +1510,7 @@ public: * @return The class ID for class Transliterator. * @stable ICU 2.0 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * Returns a unique class ID <b>polymorphically</b>. This method @@ -1527,7 +1527,7 @@ public: * different class IDs. * @stable ICU 2.0 */ - virtual UClassID getDynamicClassID(void) const override = 0; + virtual UClassID getDynamicClassID() const override = 0; private: static UBool initializeRegistry(UErrorCode &status); @@ -1541,7 +1541,7 @@ public: * @return the number of IDs currently registered with the system. * @obsolete ICU 3.4 use getAvailableIDs() instead */ - static int32_t U_EXPORT2 countAvailableIDs(void); + static int32_t U_EXPORT2 countAvailableIDs(); /** * Return the index-th available ID. index must be between 0 @@ -1559,7 +1559,7 @@ public: #endif /* U_HIDE_OBSOLETE_API */ }; -inline int32_t Transliterator::getMaximumContextLength(void) const { +inline int32_t Transliterator::getMaximumContextLength() const { return maximumContextLength; } diff --git a/contrib/libs/icu/include/unicode/tzfmt.h b/contrib/libs/icu/include/unicode/tzfmt.h index 4bd80e0e34..5f93dd7455 100644 --- a/contrib/libs/icu/include/unicode/tzfmt.h +++ b/contrib/libs/icu/include/unicode/tzfmt.h @@ -431,7 +431,7 @@ public: * @see ParseOption * @stable ICU 50 */ - uint32_t getDefaultParseOptions(void) const; + uint32_t getDefaultParseOptions() const; /** * Sets the default parse options. @@ -656,7 +656,7 @@ public: * ICU "poor man's RTTI", returns a UClassID for this class. * @stable ICU 50 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * ICU "poor man's RTTI", returns a UClassID for the actual class. diff --git a/contrib/libs/icu/include/unicode/tzrule.h b/contrib/libs/icu/include/unicode/tzrule.h index 9ec1e96179..835e6b262f 100644 --- a/contrib/libs/icu/include/unicode/tzrule.h +++ b/contrib/libs/icu/include/unicode/tzrule.h @@ -80,7 +80,7 @@ public: * @return The standard time offset from UTC in milliseconds. * @stable ICU 3.8 */ - int32_t getRawOffset(void) const; + int32_t getRawOffset() const; /** * Gets the amount of daylight saving delta time from the standard time. @@ -88,7 +88,7 @@ public: * in milliseconds. * @stable ICU 3.8 */ - int32_t getDSTSavings(void) const; + int32_t getDSTSavings() const; /** * Returns if this rule represents the same rule and offsets as another. @@ -340,7 +340,7 @@ public: * @return The class ID for all objects of this class. * @stable ICU 3.8 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This @@ -353,7 +353,7 @@ public: * other classes have different class IDs. * @stable ICU 3.8 */ - virtual UClassID getDynamicClassID(void) const override; + virtual UClassID getDynamicClassID() const override; }; /** @@ -461,7 +461,7 @@ public: * rule used by this time zone rule. * @stable ICU 3.8 */ - const DateTimeRule* getRule(void) const; + const DateTimeRule* getRule() const; /** * Gets the first year when this rule takes effect. @@ -469,7 +469,7 @@ public: * with 0 == 1 BCE, -1 == 2 BCE, etc. * @stable ICU 3.8 */ - int32_t getStartYear(void) const; + int32_t getStartYear() const; /** * Gets the end year when this rule takes effect. @@ -477,7 +477,7 @@ public: * with 0 == 1 BCE, -1 == 2 BCE, etc. * @stable ICU 3.8 */ - int32_t getEndYear(void) const; + int32_t getEndYear() const; /** * Gets the time when this rule takes effect in the given year. @@ -581,7 +581,7 @@ public: * @return The class ID for all objects of this class. * @stable ICU 3.8 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This @@ -594,7 +594,7 @@ public: * other classes have different class IDs. * @stable ICU 3.8 */ - virtual UClassID getDynamicClassID(void) const override; + virtual UClassID getDynamicClassID() const override; }; /** @@ -679,7 +679,7 @@ public: * @return The time type used of the start times used by this rule. * @stable ICU 3.8 */ - DateTimeRule::TimeRuleType getTimeType(void) const; + DateTimeRule::TimeRuleType getTimeType() const; /** * Gets a start time at the index stored in this rule. @@ -697,7 +697,7 @@ public: * @return The number of start times. * @stable ICU 3.8 */ - int32_t countStartTimes(void) const; + int32_t countStartTimes() const; /** * Returns if this rule represents the same rule and offsets as another. @@ -792,7 +792,7 @@ public: * @return The class ID for all objects of this class. * @stable ICU 3.8 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This @@ -805,7 +805,7 @@ public: * other classes have different class IDs. * @stable ICU 3.8 */ - virtual UClassID getDynamicClassID(void) const override; + virtual UClassID getDynamicClassID() const override; }; diff --git a/contrib/libs/icu/include/unicode/tztrans.h b/contrib/libs/icu/include/unicode/tztrans.h index 5adbeb35e4..57751c6fc2 100644 --- a/contrib/libs/icu/include/unicode/tztrans.h +++ b/contrib/libs/icu/include/unicode/tztrans.h @@ -102,7 +102,7 @@ public: * @return The time of the transition in milliseconds since the 1970 Jan 1 epoch time. * @stable ICU 3.8 */ - UDate getTime(void) const; + UDate getTime() const; /** * Sets the time of transition in milliseconds. @@ -116,7 +116,7 @@ public: * @return The time zone rule used after the transition. * @stable ICU 3.8 */ - const TimeZoneRule* getFrom(void) const; + const TimeZoneRule* getFrom() const; /** * Sets the rule used before the transition. The caller remains @@ -155,7 +155,7 @@ public: * @return The time zone rule used after the transition. * @stable ICU 3.8 */ - const TimeZoneRule* getTo(void) const; + const TimeZoneRule* getTo() const; private: UDate fTime; @@ -174,7 +174,7 @@ public: * @return The class ID for all objects of this class. * @stable ICU 3.8 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This @@ -187,7 +187,7 @@ public: * other classes have different class IDs. * @stable ICU 3.8 */ - virtual UClassID getDynamicClassID(void) const override; + virtual UClassID getDynamicClassID() const override; }; U_NAMESPACE_END diff --git a/contrib/libs/icu/include/unicode/ucal.h b/contrib/libs/icu/include/unicode/ucal.h index f428dfcc61..0eb4b21d32 100644 --- a/contrib/libs/icu/include/unicode/ucal.h +++ b/contrib/libs/icu/include/unicode/ucal.h @@ -442,7 +442,6 @@ enum UCalendarDateFields { */ UCAL_IS_LEAP_MONTH, -#ifndef U_HIDE_DRAFT_API /** * Field number indicating the month. This is a calendar-specific value. * Differ from UCAL_MONTH, this value is continuous and unique within a @@ -464,10 +463,9 @@ enum UCalendarDateFields { * and there is an extra "Leap Month 5" which associated with UCAL_ORDINAL_MONTH * value 5 before "Month 6" of year 4664. * - * @draft ICU 73 + * @stable ICU 73 */ UCAL_ORDINAL_MONTH, -#endif // U_HIDE_DRAFT_API /* Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API, * it is needed for layout of Calendar, DateFormat, and other objects */ @@ -476,12 +474,7 @@ enum UCalendarDateFields { * One more than the highest normal UCalendarDateFields value. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ -#ifdef U_HIDE_DRAFT_API - // Must include all fields that will be in structs - UCAL_FIELD_COUNT = UCAL_IS_LEAP_MONTH + 2, -#else // U_HIDE_DRAFT_API (for UCAL_ORDINAL_MONTH) UCAL_FIELD_COUNT = UCAL_ORDINAL_MONTH + 1, -#endif // U_HIDE_DRAFT_API (for UCAL_ORDINAL_MONTH) #endif // U_FORCE_HIDE_DEPRECATED_API @@ -1393,6 +1386,38 @@ ucal_getTZDataVersion(UErrorCode* status); U_CAPI int32_t U_EXPORT2 ucal_getCanonicalTimeZoneID(const UChar* id, int32_t len, UChar* result, int32_t resultCapacity, UBool *isSystemID, UErrorCode* status); + +#ifndef U_HIDE_DRAFT_API +/** + * Returns the preferred time zone ID in the IANA time zone database for the given time zone ID. + * There are two types of preferred IDs. The first type is the one defined in zone.tab file, + * such as "America/Los_Angeles". The second types is the one defined for zones not associated + * with a specific region, but not defined with "Link" syntax such as "Etc/GMT+10". + * + * <p>Note: For most of valid time zone IDs, this method returns an ID same as ucal_getCanonicalTimeZoneID(). + * ucal_getCanonicalTimeZoneID() is based on canonical time zone IDs defined in Unicode CLDR. + * These canonical time zone IDs in CLDR were based on very old version of the time zone database. + * In the IANA time zone database, some IDs were updated since then. This API returns a newer + * time zone ID. For example, CLDR defines "Asia/Calcutta" as the canonical time zone ID. This + * method returns "Asia/Kolkata" instead. + * <p> "Etc/Unknown" is a special time zone ID defined by CLDR. There are no corresponding zones + * in the IANA time zone database. Therefore, this API returns U_ILLEGAL_ARGUMENT_ERROR when the + * input ID is "Etc/Unknown". + * + * @param id The input time zone ID. + * @param len The length of the input time zone ID. + * @param result The buffer receives the preferred time zone ID in the IANA time zone database. + * @param resultCapacity The capacity of the result buffer. + * @param status Receives the status. When the given time zone ID is not a known system time zone + * ID, U_ILLEGAL_ARGUMENT_ERROR is set. + * @return The result string length, not including the terminating null. + * @draft ICU 74 + */ +U_CAPI int32_t U_EXPORT2 +ucal_getIanaTimeZoneID(const UChar* id, int32_t len, + UChar* result, int32_t resultCapacity, UErrorCode* status); +#endif // U_HIDE_DRAFT_API + /** * Get the resource keyword value string designating the calendar type for the UCalendar. * @param cal The UCalendar to query. diff --git a/contrib/libs/icu/include/unicode/uchar.h b/contrib/libs/icu/include/unicode/uchar.h index 4f82a9fb58..4572230d9f 100644 --- a/contrib/libs/icu/include/unicode/uchar.h +++ b/contrib/libs/icu/include/unicode/uchar.h @@ -25,6 +25,7 @@ #ifndef UCHAR_H #define UCHAR_H +#include <stdbool.h> #include "unicode/utypes.h" #include "unicode/stringoptions.h" #include "unicode/ucpmap.h" @@ -60,7 +61,7 @@ U_CDECL_BEGIN * @see u_getUnicodeVersion * @stable ICU 2.0 */ -#define U_UNICODE_VERSION "15.0" +#define U_UNICODE_VERSION "15.1" /** * \file @@ -532,12 +533,33 @@ typedef enum UProperty { * @stable ICU 70 */ UCHAR_RGI_EMOJI=71, +#ifndef U_HIDE_DRAFT_API + /** + * Binary property IDS_Unary_Operator. + * For programmatic determination of Ideographic Description Sequences. + * + * @draft ICU 74 + */ + UCHAR_IDS_UNARY_OPERATOR=72, + /** + * Binary property ID_Compat_Math_Start. + * Used in mathematical identifier profile in UAX #31. + * @draft ICU 74 + */ + UCHAR_ID_COMPAT_MATH_START=73, + /** + * Binary property ID_Compat_Math_Continue. + * Used in mathematical identifier profile in UAX #31. + * @draft ICU 74 + */ + UCHAR_ID_COMPAT_MATH_CONTINUE=74, +#endif // U_HIDE_DRAFT_API #ifndef U_HIDE_DEPRECATED_API /** * One more than the last constant for binary Unicode properties. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ - UCHAR_BINARY_LIMIT=72, + UCHAR_BINARY_LIMIT=75, #endif // U_HIDE_DEPRECATED_API /** Enumerated property Bidi_Class. @@ -647,12 +669,21 @@ typedef enum UProperty { * @stable ICU 63 */ UCHAR_VERTICAL_ORIENTATION=0x1018, +#ifndef U_HIDE_DRAFT_API + /** + * Enumerated property Identifier_Status. + * Used for UTS #39 General Security Profile for Identifiers + * (https://www.unicode.org/reports/tr39/#General_Security_Profile). + * @draft ICU 75 + */ + UCHAR_IDENTIFIER_STATUS=0x1019, +#endif // U_HIDE_DRAFT_API #ifndef U_HIDE_DEPRECATED_API /** * One more than the last constant for enumerated/integer Unicode properties. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ - UCHAR_INT_LIMIT=0x1019, + UCHAR_INT_LIMIT=0x101A, #endif // U_HIDE_DEPRECATED_API /** Bitmask property General_Category_Mask. @@ -753,12 +784,28 @@ typedef enum UProperty { UCHAR_SCRIPT_EXTENSIONS=0x7000, /** First constant for Unicode properties with unusual value types. @stable ICU 4.6 */ UCHAR_OTHER_PROPERTY_START=UCHAR_SCRIPT_EXTENSIONS, +#ifndef U_HIDE_DRAFT_API + /** + * Miscellaneous property Identifier_Type. + * Used for UTS #39 General Security Profile for Identifiers + * (https://www.unicode.org/reports/tr39/#General_Security_Profile). + * + * Corresponds to u_hasIDType() and u_getIDTypes(). + * + * Each code point maps to a <i>set</i> of UIdentifierType values. + * + * @see u_hasIDType + * @see u_getIDTypes + * @draft ICU 75 + */ + UCHAR_IDENTIFIER_TYPE=0x7001, +#endif // U_HIDE_DRAFT_API #ifndef U_HIDE_DEPRECATED_API /** * One more than the last constant for Unicode properties with unusual value types. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ - UCHAR_OTHER_PROPERTY_LIMIT=0x7001, + UCHAR_OTHER_PROPERTY_LIMIT=0x7002, #endif // U_HIDE_DEPRECATED_API /** Represents a nonexistent or invalid property or property value. @stable ICU 2.4 */ @@ -1900,6 +1947,11 @@ enum UBlockCode { /** @stable ICU 72 */ UBLOCK_NAG_MUNDARI = 327, /*[1E4D0]*/ + // New block in Unicode 15.1 + + /** @stable ICU 74 */ + UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_I = 328, /*[2EBF0]*/ + #ifndef U_HIDE_DEPRECATED_API /** * One more than the highest normal UBlockCode value. @@ -1907,7 +1959,7 @@ enum UBlockCode { * * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ - UBLOCK_COUNT = 328, + UBLOCK_COUNT = 329, #endif // U_HIDE_DEPRECATED_API /** @stable ICU 2.0 */ @@ -2439,6 +2491,16 @@ typedef enum ULineBreak { U_LB_E_MODIFIER = 41, /*[EM]*/ /** @stable ICU 58 */ U_LB_ZWJ = 42, /*[ZWJ]*/ + /** @stable ICU 74 */ + U_LB_AKSARA = 43, /*[AK]*/ + /** @stable ICU 74 */ + U_LB_AKSARA_PREBASE = 44, /*[AP]*/ + /** @stable ICU 74 */ + U_LB_AKSARA_START = 45, /*[AS]*/ + /** @stable ICU 74 */ + U_LB_VIRAMA_FINAL = 46, /*[VF]*/ + /** @stable ICU 74 */ + U_LB_VIRAMA = 47, /*[VI]*/ #ifndef U_HIDE_DEPRECATED_API /** * One more than the highest normal ULineBreak value. @@ -2446,7 +2508,7 @@ typedef enum ULineBreak { * * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ - U_LB_COUNT = 43 + U_LB_COUNT = 48 #endif // U_HIDE_DEPRECATED_API } ULineBreak; @@ -2665,6 +2727,68 @@ typedef enum UVerticalOrientation { U_VO_UPRIGHT, } UVerticalOrientation; +#ifndef U_HIDE_DRAFT_API +/** + * Identifier Status constants. + * See https://www.unicode.org/reports/tr39/#Identifier_Status_and_Type. + * + * @see UCHAR_IDENTIFIER_STATUS + * @draft ICU 75 + */ +typedef enum UIdentifierStatus { + /* + * Note: UIdentifierStatus constants are parsed by preparseucd.py. + * It matches lines like + * U_ID_STATUS_<Unicode Identifier_Status value name> + */ + + /** @draft ICU 75 */ + U_ID_STATUS_RESTRICTED, + /** @draft ICU 75 */ + U_ID_STATUS_ALLOWED, +} UIdentifierStatus; + +/** + * Identifier Type constants. + * See https://www.unicode.org/reports/tr39/#Identifier_Status_and_Type. + * + * @see UCHAR_IDENTIFIER_TYPE + * @draft ICU 75 + */ +typedef enum UIdentifierType { + /* + * Note: UIdentifierType constants are parsed by preparseucd.py. + * It matches lines like + * U_ID_TYPE_<Unicode Identifier_Type value name> + */ + + /** @draft ICU 75 */ + U_ID_TYPE_NOT_CHARACTER, + /** @draft ICU 75 */ + U_ID_TYPE_DEPRECATED, + /** @draft ICU 75 */ + U_ID_TYPE_DEFAULT_IGNORABLE, + /** @draft ICU 75 */ + U_ID_TYPE_NOT_NFKC, + /** @draft ICU 75 */ + U_ID_TYPE_NOT_XID, + /** @draft ICU 75 */ + U_ID_TYPE_EXCLUSION, + /** @draft ICU 75 */ + U_ID_TYPE_OBSOLETE, + /** @draft ICU 75 */ + U_ID_TYPE_TECHNICAL, + /** @draft ICU 75 */ + U_ID_TYPE_UNCOMMON_USE, + /** @draft ICU 75 */ + U_ID_TYPE_LIMITED_USE, + /** @draft ICU 75 */ + U_ID_TYPE_INCLUSION, + /** @draft ICU 75 */ + U_ID_TYPE_RECOMMENDED, +} UIdentifierType; +#endif // U_HIDE_DRAFT_API + /** * Check a binary Unicode property for a code point. * @@ -3869,6 +3993,59 @@ u_isIDStart(UChar32 c); U_CAPI UBool U_EXPORT2 u_isIDPart(UChar32 c); +#ifndef U_HIDE_DRAFT_API +/** + * Does the set of Identifier_Type values code point c contain the given type? + * + * Used for UTS #39 General Security Profile for Identifiers + * (https://www.unicode.org/reports/tr39/#General_Security_Profile). + * + * Each code point maps to a <i>set</i> of UIdentifierType values. + * + * @param c code point + * @param type Identifier_Type to check + * @return true if type is in Identifier_Type(c) + * @draft ICU 75 + */ +U_CAPI bool U_EXPORT2 +u_hasIDType(UChar32 c, UIdentifierType type); + +/** + * Writes code point c's Identifier_Type as a list of UIdentifierType values + * to the output types array and returns the number of types. + * + * Used for UTS #39 General Security Profile for Identifiers + * (https://www.unicode.org/reports/tr39/#General_Security_Profile). + * + * Each code point maps to a <i>set</i> of UIdentifierType values. + * There is always at least one type. + * The order of output values is undefined. + * Each type is output at most once; + * there cannot be more output values than UIdentifierType constants. + * In addition, only some of the types can be combined with others, + * and usually only a small number of types occur together. + * Future versions might add additional types. + * See UTS #39 and its data files for details. + * + * If there are more than capacity types to be written, then + * U_BUFFER_OVERFLOW_ERROR is set and the number of types is returned. + * (Usual ICU buffer handling behavior.) + * + * @param c code point + * @param types output array + * @param capacity capacity of the array + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return number of values in c's Identifier_Type, + * written to types unless U_BUFFER_OVERFLOW_ERROR indicates insufficient capacity + * @draft ICU 75 + */ +U_CAPI int32_t U_EXPORT2 +u_getIDTypes(UChar32 c, UIdentifierType *types, int32_t capacity, UErrorCode *pErrorCode); +#endif // U_HIDE_DRAFT_API + /** * Determines if the specified character should be regarded * as an ignorable character in an identifier, diff --git a/contrib/libs/icu/include/unicode/uchriter.h b/contrib/libs/icu/include/unicode/uchriter.h index 9fae5e7de0..bd2f29877b 100644 --- a/contrib/libs/icu/include/unicode/uchriter.h +++ b/contrib/libs/icu/include/unicode/uchriter.h @@ -126,7 +126,7 @@ public: * @return the hash code. * @stable ICU 2.0 */ - virtual int32_t hashCode(void) const override; + virtual int32_t hashCode() const override; /** * Returns a new UCharCharacterIterator referring to the same @@ -144,7 +144,7 @@ public: * @return the first code unit in its iteration range. * @stable ICU 2.0 */ - virtual char16_t first(void) override; + virtual char16_t first() override; /** * Sets the iterator to refer to the first code unit in its @@ -154,7 +154,7 @@ public: * @return the first code unit in its iteration range * @stable ICU 2.0 */ - virtual char16_t firstPostInc(void) override; + virtual char16_t firstPostInc() override; /** * Sets the iterator to refer to the first code point in its @@ -165,7 +165,7 @@ public: * @return the first code point in its iteration range * @stable ICU 2.0 */ - virtual UChar32 first32(void) override; + virtual UChar32 first32() override; /** * Sets the iterator to refer to the first code point in its @@ -175,7 +175,7 @@ public: * @return the first code point in its iteration range. * @stable ICU 2.0 */ - virtual UChar32 first32PostInc(void) override; + virtual UChar32 first32PostInc() override; /** * Sets the iterator to refer to the last code unit in its @@ -184,7 +184,7 @@ public: * @return the last code unit in its iteration range. * @stable ICU 2.0 */ - virtual char16_t last(void) override; + virtual char16_t last() override; /** * Sets the iterator to refer to the last code point in its @@ -193,7 +193,7 @@ public: * @return the last code point in its iteration range. * @stable ICU 2.0 */ - virtual UChar32 last32(void) override; + virtual UChar32 last32() override; /** * Sets the iterator to refer to the "position"-th code unit @@ -223,14 +223,14 @@ public: * @return the code unit the iterator currently refers to. * @stable ICU 2.0 */ - virtual char16_t current(void) const override; + virtual char16_t current() const override; /** * Returns the code point the iterator currently refers to. * @return the code point the iterator currently refers to. * @stable ICU 2.0 */ - virtual UChar32 current32(void) const override; + virtual UChar32 current32() const override; /** * Advances to the next code unit in the iteration range (toward @@ -239,7 +239,7 @@ public: * @return the next code unit in the iteration range. * @stable ICU 2.0 */ - virtual char16_t next(void) override; + virtual char16_t next() override; /** * Gets the current code unit for returning and advances to the next code unit @@ -249,7 +249,7 @@ public: * @return the current code unit. * @stable ICU 2.0 */ - virtual char16_t nextPostInc(void) override; + virtual char16_t nextPostInc() override; /** * Advances to the next code point in the iteration range (toward @@ -261,7 +261,7 @@ public: * @return the next code point in the iteration range. * @stable ICU 2.0 */ - virtual UChar32 next32(void) override; + virtual UChar32 next32() override; /** * Gets the current code point for returning and advances to the next code point @@ -271,7 +271,7 @@ public: * @return the current point. * @stable ICU 2.0 */ - virtual UChar32 next32PostInc(void) override; + virtual UChar32 next32PostInc() override; /** * Returns false if there are no more code units or code points @@ -291,7 +291,7 @@ public: * @return the previous code unit in the iteration range. * @stable ICU 2.0 */ - virtual char16_t previous(void) override; + virtual char16_t previous() override; /** * Advances to the previous code point in the iteration range (toward @@ -300,7 +300,7 @@ public: * @return the previous code point in the iteration range. * @stable ICU 2.0 */ - virtual UChar32 previous32(void) override; + virtual UChar32 previous32() override; /** * Returns false if there are no more code units or code points @@ -363,14 +363,14 @@ public: * @return a class ID for this class * @stable ICU 2.0 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * Return a class ID for this object (not really public) * @return a class ID for this object. * @stable ICU 2.0 */ - virtual UClassID getDynamicClassID(void) const override; + virtual UClassID getDynamicClassID() const override; protected: /** diff --git a/contrib/libs/icu/include/unicode/ucnv.h b/contrib/libs/icu/include/unicode/ucnv.h index 20c173b662..4a7972c95b 100644 --- a/contrib/libs/icu/include/unicode/ucnv.h +++ b/contrib/libs/icu/include/unicode/ucnv.h @@ -344,8 +344,6 @@ ucnv_compareNames(const char *name1, const char *name2); * other than its an alias starting with the letters "cp". Please do not * associate any meaning to these aliases.</p> * - * \snippet samples/ucnv/convsamp.cpp ucnv_open - * * @param converterName Name of the coded character set table. * This may have options appended to the string. * IANA alias character set names, IBM CCSIDs starting with "ibm-", @@ -1986,7 +1984,6 @@ ucnv_usesFallback(const UConverter *cnv); * instead of the input signature bytes. * <p> * Usage: - * \snippet samples/ucnv/convsamp.cpp ucnv_detectUnicodeSignature * * @param source The source string in which the signature should be detected. * @param sourceLength Length of the input string, or -1 if terminated with a NUL byte. diff --git a/contrib/libs/icu/include/unicode/ucol.h b/contrib/libs/icu/include/unicode/ucol.h index 2496331221..e4ec2f7418 100644 --- a/contrib/libs/icu/include/unicode/ucol.h +++ b/contrib/libs/icu/include/unicode/ucol.h @@ -251,42 +251,52 @@ typedef enum { */ UCOL_FRENCH_COLLATION, /** Attribute for handling variable elements. - * Acceptable values are UCOL_NON_IGNORABLE (default) - * which treats all the codepoints with non-ignorable + * Acceptable values are UCOL_NON_IGNORABLE + * which treats all the codepoints with non-ignorable * primary weights in the same way, - * and UCOL_SHIFTED which causes codepoints with primary + * and UCOL_SHIFTED which causes codepoints with primary * weights that are equal or below the variable top value - * to be ignored on primary level and moved to the quaternary - * level. + * to be ignored on primary level and moved to the quaternary + * level. The default setting in a Collator object depends on the + * locale data loaded from the resources. For most locales, the + * default is UCOL_NON_IGNORABLE, but for others, such as "th", + * the default could be UCOL_SHIFTED. * @stable ICU 2.0 */ - UCOL_ALTERNATE_HANDLING, + UCOL_ALTERNATE_HANDLING, /** Controls the ordering of upper and lower case letters. - * Acceptable values are UCOL_OFF (default), which orders + * Acceptable values are UCOL_OFF, which orders * upper and lower case letters in accordance to their tertiary - * weights, UCOL_UPPER_FIRST which forces upper case letters to - * sort before lower case letters, and UCOL_LOWER_FIRST which does - * the opposite. + * weights, UCOL_UPPER_FIRST which forces upper case letters to + * sort before lower case letters, and UCOL_LOWER_FIRST which does + * the opposite. The default setting in a Collator object depends on the + * locale data loaded from the resources. For most locales, the + * default is UCOL_OFF, but for others, such as "da" or "mt", + * the default could be UCOL_UPPER. * @stable ICU 2.0 */ - UCOL_CASE_FIRST, + UCOL_CASE_FIRST, /** Controls whether an extra case level (positioned before the third - * level) is generated or not. Acceptable values are UCOL_OFF (default), + * level) is generated or not. Acceptable values are UCOL_OFF, * when case level is not generated, and UCOL_ON which causes the case * level to be generated. Contents of the case level are affected by - * the value of UCOL_CASE_FIRST attribute. A simple way to ignore + * the value of UCOL_CASE_FIRST attribute. A simple way to ignore * accent differences in a string is to set the strength to UCOL_PRIMARY - * and enable case level. + * and enable case level. The default setting in a Collator object depends + * on the locale data loaded from the resources. * @stable ICU 2.0 */ UCOL_CASE_LEVEL, /** Controls whether the normalization check and necessary normalizations - * are performed. When set to UCOL_OFF (default) no normalization check - * is performed. The correctness of the result is guaranteed only if the + * are performed. When set to UCOL_OFF no normalization check + * is performed. The correctness of the result is guaranteed only if the * input data is in so-called FCD form (see users manual for more info). * When set to UCOL_ON, an incremental check is performed to see whether * the input data is in the FCD form. If the data is not in the FCD form, - * incremental NFD normalization is performed. + * incremental NFD normalization is performed. The default setting in a + * Collator object depends on the locale data loaded from the resources. + * For many locales, the default is UCOL_OFF, but for others, such as "hi" + * "vi', or "bn", * the default could be UCOL_ON. * @stable ICU 2.0 */ UCOL_NORMALIZATION_MODE, diff --git a/contrib/libs/icu/include/unicode/uconfig.h b/contrib/libs/icu/include/unicode/uconfig.h index 3818ca02ef..c0488d502b 100644 --- a/contrib/libs/icu/include/unicode/uconfig.h +++ b/contrib/libs/icu/include/unicode/uconfig.h @@ -414,6 +414,17 @@ #endif /** + * \def UCONFIG_NO_MF2 + * This switch turns off the experimental MessageFormat 2.0 API. + * + * @internal ICU 75 technology preview + * @deprecated This API is for technology preview only. + */ +#ifndef UCONFIG_NO_MF2 +# define UCONFIG_NO_MF2 0 +#endif + +/** * \def UCONFIG_NO_TRANSLITERATION * This switch turns off transliteration. * diff --git a/contrib/libs/icu/include/unicode/udisplayoptions.h b/contrib/libs/icu/include/unicode/udisplayoptions.h index 1ecdf1d8e9..490bc01cf3 100644 --- a/contrib/libs/icu/include/unicode/udisplayoptions.h +++ b/contrib/libs/icu/include/unicode/udisplayoptions.h @@ -18,47 +18,45 @@ #include "unicode/uversion.h" -#ifndef U_HIDE_DRAFT_API - /** * Represents all the grammatical cases that are supported by CLDR. * - * @draft ICU 72 + * @stable ICU 72 */ typedef enum UDisplayOptionsGrammaticalCase { /** * A possible setting for GrammaticalCase. * The grammatical case context to be used is unknown (this is the default value). - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_UNDEFINED = 0, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_ABLATIVE = 1, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_ACCUSATIVE = 2, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_COMITATIVE = 3, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_DATIVE = 4, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_ERGATIVE = 5, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_GENITIVE = 6, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_INSTRUMENTAL = 7, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_LOCATIVE = 8, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_LOCATIVE_COPULATIVE = 9, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_NOMINATIVE = 10, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_OBLIQUE = 11, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_PREPOSITIONAL = 12, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_SOCIATIVE = 13, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_VOCATIVE = 14, } UDisplayOptionsGrammaticalCase; @@ -66,7 +64,7 @@ typedef enum UDisplayOptionsGrammaticalCase { * @param grammaticalCase The grammatical case. * @return the lowercase CLDR keyword string for the grammatical case. * - * @draft ICU 72 + * @stable ICU 72 */ U_CAPI const char * U_EXPORT2 udispopt_getGrammaticalCaseIdentifier(UDisplayOptionsGrammaticalCase grammaticalCase); @@ -75,7 +73,7 @@ udispopt_getGrammaticalCaseIdentifier(UDisplayOptionsGrammaticalCase grammatical * @param identifier in lower case such as "dative" or "nominative" * @return the plural category corresponding to the identifier, or `UDISPOPT_GRAMMATICAL_CASE_UNDEFINED` * - * @draft ICU 72 + * @stable ICU 72 */ U_CAPI UDisplayOptionsGrammaticalCase U_EXPORT2 udispopt_fromGrammaticalCaseIdentifier(const char *identifier); @@ -84,7 +82,7 @@ udispopt_fromGrammaticalCaseIdentifier(const char *identifier); * Standard CLDR plural form/category constants. * See https://www.unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules * - * @draft ICU 72 + * @stable ICU 72 */ typedef enum UDisplayOptionsPluralCategory { @@ -92,20 +90,20 @@ typedef enum UDisplayOptionsPluralCategory { * A possible setting for PluralCategory. * The plural category case context to be used is unknown (this is the default value). * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_PLURAL_CATEGORY_UNDEFINED = 0, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_PLURAL_CATEGORY_ZERO = 1, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_PLURAL_CATEGORY_ONE = 2, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_PLURAL_CATEGORY_TWO = 3, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_PLURAL_CATEGORY_FEW = 4, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_PLURAL_CATEGORY_MANY = 5, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_PLURAL_CATEGORY_OTHER = 6, } UDisplayOptionsPluralCategory; @@ -113,7 +111,7 @@ typedef enum UDisplayOptionsPluralCategory { * @param pluralCategory The plural category. * @return the lowercase CLDR identifier string for the plural category. * - * @draft ICU 72 + * @stable ICU 72 */ U_CAPI const char * U_EXPORT2 udispopt_getPluralCategoryIdentifier(UDisplayOptionsPluralCategory pluralCategory); @@ -123,7 +121,7 @@ udispopt_getPluralCategoryIdentifier(UDisplayOptionsPluralCategory pluralCategor * @return the plural category corresponding to the identifier (plural keyword), * or `UDISPOPT_PLURAL_CATEGORY_UNDEFINED` * - * @draft ICU 72 + * @stable ICU 72 */ U_CAPI UDisplayOptionsPluralCategory U_EXPORT2 udispopt_fromPluralCategoryIdentifier(const char *identifier); @@ -131,31 +129,31 @@ udispopt_fromPluralCategoryIdentifier(const char *identifier); /** * Represents all the grammatical noun classes that are supported by CLDR. * - * @draft ICU 72. + * @stable ICU 72. */ typedef enum UDisplayOptionsNounClass { /** * A possible setting for NounClass. * The noun class case context to be used is unknown (this is the default value). * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_NOUN_CLASS_UNDEFINED = 0, - /** ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_NOUN_CLASS_OTHER = 1, - /** ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_NOUN_CLASS_NEUTER = 2, - /** ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_NOUN_CLASS_FEMININE = 3, - /** ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_NOUN_CLASS_MASCULINE = 4, - /** ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_NOUN_CLASS_ANIMATE = 5, - /** ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_NOUN_CLASS_INANIMATE = 6, - /** ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_NOUN_CLASS_PERSONAL = 7, - /** ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_NOUN_CLASS_COMMON = 8, } UDisplayOptionsNounClass; @@ -163,7 +161,7 @@ typedef enum UDisplayOptionsNounClass { * @param nounClass The noun class. * @return the lowercase CLDR keyword string for the noun class. * - * @draft ICU 72 + * @stable ICU 72 */ U_CAPI const char * U_EXPORT2 udispopt_getNounClassIdentifier(UDisplayOptionsNounClass nounClass); @@ -172,7 +170,7 @@ udispopt_getNounClassIdentifier(UDisplayOptionsNounClass nounClass); * @param identifier in lower case such as "feminine" or "masculine" * @return the plural category corresponding to the identifier, or `UDISPOPT_NOUN_CLASS_UNDEFINED` * - * @draft ICU 72 + * @stable ICU 72 */ U_CAPI UDisplayOptionsNounClass U_EXPORT2 udispopt_fromNounClassIdentifier(const char *identifier); @@ -180,14 +178,14 @@ udispopt_fromNounClassIdentifier(const char *identifier); /** * Represents all the capitalization options. * - * @draft ICU 72 + * @stable ICU 72 */ typedef enum UDisplayOptionsCapitalization { /** * A possible setting for Capitalization. * The capitalization context to be used is unknown (this is the default value). * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_CAPITALIZATION_UNDEFINED = 0, @@ -195,7 +193,7 @@ typedef enum UDisplayOptionsCapitalization { * The capitalization context if a date, date symbol or display name is to be * formatted with capitalization appropriate for the beginning of a sentence. * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_CAPITALIZATION_BEGINNING_OF_SENTENCE = 1, @@ -203,7 +201,7 @@ typedef enum UDisplayOptionsCapitalization { * The capitalization context if a date, date symbol or display name is to be * formatted with capitalization appropriate for the middle of a sentence. * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_CAPITALIZATION_MIDDLE_OF_SENTENCE = 2, @@ -212,7 +210,7 @@ typedef enum UDisplayOptionsCapitalization { * formatted with capitalization appropriate for stand-alone usage such as an * isolated name on a calendar page. * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_CAPITALIZATION_STANDALONE = 3, @@ -220,7 +218,7 @@ typedef enum UDisplayOptionsCapitalization { * The capitalization context if a date, date symbol or display name is to be * formatted with capitalization appropriate for a user-interface list or menu item. * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_CAPITALIZATION_UI_LIST_OR_MENU = 4, } UDisplayOptionsCapitalization; @@ -228,14 +226,14 @@ typedef enum UDisplayOptionsCapitalization { /** * Represents all the dialect handlings. * - * @draft ICU 72 + * @stable ICU 72 */ typedef enum UDisplayOptionsNameStyle { /** * A possible setting for NameStyle. * The NameStyle context to be used is unknown (this is the default value). * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_NAME_STYLE_UNDEFINED = 0, @@ -243,7 +241,7 @@ typedef enum UDisplayOptionsNameStyle { * Use standard names when generating a locale name, * e.g. en_GB displays as 'English (United Kingdom)'. * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_NAME_STYLE_STANDARD_NAMES = 1, @@ -251,7 +249,7 @@ typedef enum UDisplayOptionsNameStyle { * Use dialect names, when generating a locale name, * e.g. en_GB displays as 'British English'. * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_NAME_STYLE_DIALECT_NAMES = 2, } UDisplayOptionsNameStyle; @@ -259,14 +257,14 @@ typedef enum UDisplayOptionsNameStyle { /** * Represents all the display lengths. * - * @draft ICU 72 + * @stable ICU 72 */ typedef enum UDisplayOptionsDisplayLength { /** * A possible setting for DisplayLength. * The DisplayLength context to be used is unknown (this is the default value). * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_DISPLAY_LENGTH_UNDEFINED = 0, @@ -274,7 +272,7 @@ typedef enum UDisplayOptionsDisplayLength { * Uses full names when generating a locale name, * e.g. "United States" for US. * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_DISPLAY_LENGTH_FULL = 1, @@ -282,7 +280,7 @@ typedef enum UDisplayOptionsDisplayLength { * Use short names when generating a locale name, * e.g. "U.S." for US. * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_DISPLAY_LENGTH_SHORT = 2, } UDisplayOptionsDisplayLength; @@ -290,7 +288,7 @@ typedef enum UDisplayOptionsDisplayLength { /** * Represents all the substitute handling. * - * @draft ICU 72 + * @stable ICU 72 */ typedef enum UDisplayOptionsSubstituteHandling { @@ -298,7 +296,7 @@ typedef enum UDisplayOptionsSubstituteHandling { * A possible setting for SubstituteHandling. * The SubstituteHandling context to be used is unknown (this is the default value). * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_SUBSTITUTE_HANDLING_UNDEFINED = 0, @@ -306,20 +304,18 @@ typedef enum UDisplayOptionsSubstituteHandling { * Returns a fallback value (e.g., the input code) when no data is available. * This is the default behaviour. * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_SUBSTITUTE_HANDLING_SUBSTITUTE = 1, /** * Returns a null value when no data is available. * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_SUBSTITUTE_HANDLING_NO_SUBSTITUTE = 2, } UDisplayOptionsSubstituteHandling; -#endif // U_HIDE_DRAFT_API - #endif /* #if !UCONFIG_NO_FORMATTING */ #endif // __UDISPLAYOPTIONS_H__ diff --git a/contrib/libs/icu/include/unicode/uloc.h b/contrib/libs/icu/include/unicode/uloc.h index 21179c1b62..9cd7f5e1b0 100644 --- a/contrib/libs/icu/include/unicode/uloc.h +++ b/contrib/libs/icu/include/unicode/uloc.h @@ -399,6 +399,9 @@ uloc_setDefault(const char* localeID, /** * Gets the language code for the specified locale. * + * This function may return with a failure error code for certain kinds of inputs + * but does not fully check for well-formed locale IDs / language tags. + * * @param localeID the locale to get the ISO language code with * @param language the language code for localeID * @param languageCapacity the size of the language buffer to store the @@ -417,6 +420,9 @@ uloc_getLanguage(const char* localeID, /** * Gets the script code for the specified locale. * + * This function may return with a failure error code for certain kinds of inputs + * but does not fully check for well-formed locale IDs / language tags. + * * @param localeID the locale to get the ISO language code with * @param script the language code for localeID * @param scriptCapacity the size of the language buffer to store the @@ -435,6 +441,9 @@ uloc_getScript(const char* localeID, /** * Gets the country code for the specified locale. * + * This function may return with a failure error code for certain kinds of inputs + * but does not fully check for well-formed locale IDs / language tags. + * * @param localeID the locale to get the country code with * @param country the country code for localeID * @param countryCapacity the size of the country buffer to store the @@ -453,6 +462,9 @@ uloc_getCountry(const char* localeID, /** * Gets the variant code for the specified locale. * + * This function may return with a failure error code for certain kinds of inputs + * but does not fully check for well-formed locale IDs / language tags. + * * @param localeID the locale to get the variant code with * @param variant the variant code for localeID * @param variantCapacity the size of the variant buffer to store the @@ -471,6 +483,10 @@ uloc_getVariant(const char* localeID, /** * Gets the full name for the specified locale. + * + * This function may return with a failure error code for certain kinds of inputs + * but does not fully check for well-formed locale IDs / language tags. + * * Note: This has the effect of 'canonicalizing' the ICU locale ID to * a certain extent. Upper and lower case are set as needed. * It does NOT map aliased names in any way. @@ -1158,19 +1174,20 @@ uloc_getLocaleForLCID(uint32_t hostID, char *locale, int32_t localeCapacity, * * If localeID is already in the maximal form, or there is no data available * for maximization, it will be copied to the output buffer. For example, - * "und-Zzzz" cannot be maximized, since there is no reasonable maximization. + * "sh" cannot be maximized, since there is no reasonable maximization. * * Examples: * + * "und_Zzzz" maximizes to "en_Latn_US" + * * "en" maximizes to "en_Latn_US" * - * "de" maximizes to "de_Latn_US" + * "de" maximizes to "de_Latn_DE" * * "sr" maximizes to "sr_Cyrl_RS" * - * "sh" maximizes to "sr_Latn_RS" (Note this will not reverse.) + * "zh_Hani" maximizes to "zh_Hani_CN" * - * "zh_Hani" maximizes to "zh_Hans_CN" (Note this will not reverse.) * * @param localeID The locale to maximize * @param maximizedLocaleID The maximized locale diff --git a/contrib/libs/icu/include/unicode/ulocale.h b/contrib/libs/icu/include/unicode/ulocale.h new file mode 100644 index 0000000000..33e92844bc --- /dev/null +++ b/contrib/libs/icu/include/unicode/ulocale.h @@ -0,0 +1,229 @@ +// © 2023 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#ifndef ULOCALE_H +#define ULOCALE_H + +#include "unicode/localpointer.h" +#include "unicode/uenum.h" +#include "unicode/utypes.h" + +/** + * \file + * \brief C API: Locale ID functionality similar to C++ class Locale + */ + +#ifndef U_HIDE_DRAFT_API +/** + * Opaque C service object type for the locale API + * @draft ICU 74 + */ +struct ULocale; + +/** + * C typedef for struct ULocale. + * @draft ICU 74 + */ +typedef struct ULocale ULocale; + +/** + * Constructs an ULocale from the locale ID. + * The created ULocale should be destroyed by calling + * ulocale_close(); + * @param localeID the locale, a const char * pointer (need not be terminated when + * the length is non-negative) + * @param length the length of the locale; if negative, then the locale need to be + * null terminated. + * @param err the error code + * @return the locale. + * + * @draft ICU 74 + */ +U_CAPI ULocale* U_EXPORT2 +ulocale_openForLocaleID(const char* localeID, int32_t length, UErrorCode* err); + +/** + * Constructs an ULocale from the provided IETF BCP 47 language tag. + * The created ULocale should be destroyed by calling + * ulocale_close(); + * @param tag the language tag, defined as IETF BCP 47 language tag, const + * char* pointer (need not be terminated when the length is non-negative) + * @param length the length of the tag; if negative, then the tag need to be + * null terminated. + * @param err the error code + * @return the locale. + * + * @draft ICU 74 + */ +U_CAPI ULocale* U_EXPORT2 +ulocale_openForLanguageTag(const char* tag, int32_t length, UErrorCode* err); + +/** + * Close the locale and destroy it's internal states. + * + * @param locale the locale + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocale_close(ULocale* locale); + +/** + * Returns the locale's ISO-639 language code. + * + * @param locale the locale + * @return the language code of the locale. + * @draft ICU 74 + */ +U_CAPI const char* U_EXPORT2 +ulocale_getLanguage(const ULocale* locale); + +/** + * Returns the locale's ISO-15924 abbreviation script code. + * + * @param locale the locale + * @return A pointer to the script. + * @draft ICU 74 + */ +U_CAPI const char* U_EXPORT2 +ulocale_getScript(const ULocale* locale); + +/** + * Returns the locale's ISO-3166 region code. + * + * @param locale the locale + * @return A pointer to the region. + * @draft ICU 74 + */ +U_CAPI const char* U_EXPORT2 +ulocale_getRegion(const ULocale* locale); + +/** + * Returns the locale's variant code. + * + * @param locale the locale + * @return A pointer to the variant. + * @draft ICU 74 + */ +U_CAPI const char* U_EXPORT2 +ulocale_getVariant(const ULocale* locale); + +/** + * Returns the programmatic name of the entire locale, with the language, + * country and variant separated by underbars. If a field is missing, up + * to two leading underbars will occur. Example: "en", "de_DE", "en_US_WIN", + * "de__POSIX", "fr__MAC", "__MAC", "_MT", "_FR_EURO" + * + * @param locale the locale + * @return A pointer to "name". + * @draft ICU 74 + */ +U_CAPI const char* U_EXPORT2 +ulocale_getLocaleID(const ULocale* locale); + +/** + * Returns the programmatic name of the entire locale as ulocale_getLocaleID() + * would return, but without keywords. + * + * @param locale the locale + * @return A pointer to "base name". + * @draft ICU 74 + */ +U_CAPI const char* U_EXPORT2 +ulocale_getBaseName(const ULocale* locale); + +/** + * Gets the bogus state. Locale object can be bogus if it doesn't exist + * + * @param locale the locale + * @return false if it is a real locale, true if it is a bogus locale + * @draft ICU 74 + */ +U_CAPI bool U_EXPORT2 +ulocale_isBogus(const ULocale* locale); + +/** + * Gets the list of keywords for the specified locale. + * + * @param locale the locale + * @param err the error code + * @return pointer to UEnumeration, or nullptr if there are no keywords. + * Client must call uenum_close() to dispose the returned value. + * @draft ICU 74 + */ +U_CAPI UEnumeration* U_EXPORT2 +ulocale_getKeywords(const ULocale* locale, UErrorCode *err); + +/** + * Gets the list of unicode keywords for the specified locale. + * + * @param locale the locale + * @param err the error code + * @return pointer to UEnumeration, or nullptr if there are no keywords. + * Client must call uenum_close() to dispose the returned value. + * @draft ICU 74 + */ +U_CAPI UEnumeration* U_EXPORT2 +ulocale_getUnicodeKeywords(const ULocale* locale, UErrorCode *err); + +/** + * Gets the value for a keyword. + * + * This uses legacy keyword=value pairs, like "collation=phonebook". + * + * @param locale the locale + * @param keyword the keyword, a const char * pointer (need not be + * terminated when the length is non-negative) + * @param keywordLength the length of the keyword; if negative, then the + * keyword need to be null terminated. + * @param valueBuffer The buffer to receive the value. + * @param valueBufferCapacity The capacity of receiving valueBuffer. + * @param err the error code + * @draft ICU 74 + */ +U_CAPI int32_t U_EXPORT2 +ulocale_getKeywordValue( + const ULocale* locale, const char* keyword, int32_t keywordLength, + char* valueBuffer, int32_t valueBufferCapacity, UErrorCode *err); + +/** + * Gets the Unicode value for a Unicode keyword. + * + * This uses Unicode key-value pairs, like "co-phonebk". + * + * @param locale the locale + * @param keyword the Unicode keyword, a const char * pointer (need not be + * terminated when the length is non-negative) + * @param keywordLength the length of the Unicode keyword; if negative, + * then the keyword need to be null terminated. + * @param valueBuffer The buffer to receive the Unicode value. + * @param valueBufferCapacity The capacity of receiving valueBuffer. + * @param err the error code + * @draft ICU 74 + */ +U_CAPI int32_t U_EXPORT2 +ulocale_getUnicodeKeywordValue( + const ULocale* locale, const char* keyword, int32_t keywordLength, + char* valueBuffer, int32_t valueBufferCapacity, UErrorCode *err); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalULocalePointer + * "Smart pointer" class, closes a ULocale via ulocale_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @draft ICU 74 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalULocalePointer, ULocale, ulocale_close); + +U_NAMESPACE_END + +#endif /* U_SHOW_CPLUSPLUS_API */ + +#endif /* U_HIDE_DRAFT_API */ + +#endif /*_ULOCALE */ diff --git a/contrib/libs/icu/include/unicode/ulocbuilder.h b/contrib/libs/icu/include/unicode/ulocbuilder.h new file mode 100644 index 0000000000..9b147292f4 --- /dev/null +++ b/contrib/libs/icu/include/unicode/ulocbuilder.h @@ -0,0 +1,441 @@ +// © 2023 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +#ifndef __ULOCBUILDER_H__ +#define __ULOCBUILDER_H__ + +#include "unicode/localpointer.h" +#include "unicode/ulocale.h" +#include "unicode/utypes.h" + +/** + * \file + * \brief C API: Builder API for Locale + */ + +#ifndef U_HIDE_DRAFT_API + +/** + * Opaque C service object type for the locale builder API + * @draft ICU 74 + */ +struct ULocaleBuilder; + +/** + * C typedef for struct ULocaleBuilder. + * @draft ICU 74 + */ +typedef struct ULocaleBuilder ULocaleBuilder; + +/** + * <code>ULocaleBuilder</code> is used to build valid <code>locale</code> id + * string or IETF BCP 47 language tag from values configured by the setters. + * The <code>ULocaleBuilder</code> checks if a value configured by a + * setter satisfies the syntax requirements defined by the <code>Locale</code> + * class. A string of Locale created by a <code>ULocaleBuilder</code> is + * well-formed and can be transformed to a well-formed IETF BCP 47 language tag + * without losing information. + * + * <p>The following example shows how to create a <code>locale</code> string + * with the <code>ULocaleBuilder</code>. + * <blockquote> + * <pre> + * UErrorCode err = U_ZERO_ERROR; + * char buffer[ULOC_FULLNAME_CAPACITY]; + * ULocaleBuilder* builder = ulocbld_open(); + * ulocbld_setLanguage(builder, "sr", -1); + * ulocbld_setScript(builder, "Latn", -1); + * ulocbld_setRegion(builder, "RS", -1); + * int32_t length = ulocbld_buildLocaleID( + * builder, buffer, ULOC_FULLNAME_CAPACITY, &error); + * ulocbld_close(builder); + * </pre> + * </blockquote> + * + * <p>ULocaleBuilders can be reused; <code>ulocbld_clear()</code> resets all + * fields to their default values. + * + * <p>ULocaleBuilder tracks errors in an internal UErrorCode. For all setters, + * except ulocbld_setLanguageTag and ulocbld_setLocale, ULocaleBuilder will return immediately + * if the internal UErrorCode is in error state. + * To reset internal state and error code, call clear method. + * The ulocbld_setLanguageTag and setLocale method will first clear the internal + * UErrorCode, then track the error of the validation of the input parameter + * into the internal UErrorCode. + * + * @draft ICU 74 + */ + +/** + * Constructs an empty ULocaleBuilder. The default value of all + * fields, extensions, and private use information is the + * empty string. The created builder should be destroyed by calling + * ulocbld_close(); + * + * @draft ICU 74 + */ +U_CAPI ULocaleBuilder* U_EXPORT2 +ulocbld_open(void); + +/** + * Close the builder and destroy it's internal states. + * @param builder the builder + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_close(ULocaleBuilder* builder); + +/** + * Resets the <code>ULocaleBuilder</code> to match the provided + * <code>locale</code>. Existing state is discarded. + * + * <p>All fields of the locale must be well-formed. + * <p>This method clears the internal UErrorCode. + * + * @param builder the builder + * @param locale the locale, a const char * pointer (need not be terminated when + * the length is non-negative) + * @param length the length of the locale; if negative, then the locale need to be + * null terminated, + * + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_setLocale(ULocaleBuilder* builder, const char* locale, int32_t length); + +/** + * Resets the <code>ULocaleBuilder</code> to match the provided + * <code>ULocale</code>. Existing state is discarded. + * + * <p>The locale must be not bogus. + * <p>This method clears the internal UErrorCode. + * + * @param builder the builder. + * @param locale the locale, a ULocale* pointer. The builder adopts the locale + * after the call and the client must not delete it. + * + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_adoptULocale(ULocaleBuilder* builder, ULocale* locale); + +/** + * Resets the ULocaleBuilder to match the provided IETF BCP 47 language tag. + * Discards the existing state. + * The empty string causes the builder to be reset, like {@link #ulocbld_clear}. + * Legacy language tags (marked as “Type: grandfathered” in BCP 47) + * are converted to their canonical form before being processed. + * Otherwise, the <code>language tag</code> must be well-formed, + * or else the ulocbld_buildLocaleID() and ulocbld_buildLanguageTag() methods + * will later report an U_ILLEGAL_ARGUMENT_ERROR. + * + * <p>This method clears the internal UErrorCode. + * + * @param builder the builder + * @param tag the language tag, defined as IETF BCP 47 language tag, a + * const char * pointer (need not be terminated when + * the length is non-negative) + * @param length the length of the tag; if negative, then the tag need to be + * null terminated, + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_setLanguageTag(ULocaleBuilder* builder, const char* tag, int32_t length); + +/** + * Sets the language. If <code>language</code> is the empty string, the + * language in this <code>ULocaleBuilder</code> is removed. Otherwise, the + * <code>language</code> must be well-formed, or else the ulocbld_buildLocaleID() + * and ulocbld_buildLanguageTag() methods will + * later report an U_ILLEGAL_ARGUMENT_ERROR. + * + * <p>The syntax of language value is defined as + * [unicode_language_subtag](http://www.unicode.org/reports/tr35/tr35.html#unicode_language_subtag). + * + * @param builder the builder + * @param language the language, a const char * pointer (need not be terminated when + * the length is non-negative) + * @param length the length of the language; if negative, then the language need to be + * null terminated, + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_setLanguage(ULocaleBuilder* builder, const char* language, int32_t length); + +/** + * Sets the script. If <code>script</code> is the empty string, the script in + * this <code>ULocaleBuilder</code> is removed. + * Otherwise, the <code>script</code> must be well-formed, or else the + * ulocbld_buildLocaleID() and ulocbld_buildLanguageTag() methods will later + * report an U_ILLEGAL_ARGUMENT_ERROR. + * + * <p>The script value is a four-letter script code as + * [unicode_script_subtag](http://www.unicode.org/reports/tr35/tr35.html#unicode_script_subtag) + * defined by ISO 15924 + * + * @param builder the builder + * @param script the script, a const char * pointer (need not be terminated when + * the length is non-negative) + * @param length the length of the script; if negative, then the script need to be + * null terminated, + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_setScript(ULocaleBuilder* builder, const char* script, int32_t length); + +/** + * Sets the region. If region is the empty string, the region in this + * <code>ULocaleBuilder</code> is removed. Otherwise, the <code>region</code> + * must be well-formed, or else the ulocbld_buildLocaleID() and + * ulocbld_buildLanguageTag() methods will later report an + * U_ILLEGAL_ARGUMENT_ERROR. + * + * <p>The region value is defined by + * [unicode_region_subtag](http://www.unicode.org/reports/tr35/tr35.html#unicode_region_subtag) + * as a two-letter ISO 3166 code or a three-digit UN M.49 area code. + * + * <p>The region value in the <code>Locale</code> created by the + * <code>ULocaleBuilder</code> is always normalized to upper case. + * + * @param builder the builder + * @param region the region, a const char * pointer (need not be terminated when + * the length is non-negative) + * @param length the length of the region; if negative, then the region need to be + * null terminated, + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_setRegion(ULocaleBuilder* builder, const char* region, int32_t length); + +/** + * Sets the variant. If variant is the empty string, the variant in this + * <code>ULocaleBuilder</code> is removed. Otherwise, the <code>variant</code> + * must be well-formed, or else the ulocbld_buildLocaleID() and + * ulocbld_buildLanguageTag() methods will later report an + * U_ILLEGAL_ARGUMENT_ERROR. + * + * <p><b>Note:</b> This method checks if <code>variant</code> + * satisfies the + * [unicode_variant_subtag](http://www.unicode.org/reports/tr35/tr35.html#unicode_variant_subtag) + * syntax requirements, and normalizes the value to lowercase letters. However, + * the <code>Locale</code> class does not impose any syntactic + * restriction on variant. To set an ill-formed variant, use a Locale constructor. + * If there are multiple unicode_variant_subtag, the caller must concatenate + * them with '-' as separator (ex: "foobar-fibar"). + * + * @param builder the builder + * @param variant the variant, a const char * pointer (need not be terminated when + * the length is non-negative) + * @param length the length of the variant; if negative, then the variant need to be + * null terminated, + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_setVariant(ULocaleBuilder* builder, const char* variant, int32_t length); + +/** + * Sets the extension for the given key. If the value is the empty string, + * the extension is removed. Otherwise, the <code>key</code> and + * <code>value</code> must be well-formed, or else the ulocbld_buildLocaleID() + * and ulocbld_buildLanguageTag() methods will + * later report an U_ILLEGAL_ARGUMENT_ERROR. + * + * <p><b>Note:</b> The key ('u') is used for the Unicode locale extension. + * Setting a value for this key replaces any existing Unicode locale key/type + * pairs with those defined in the extension. + * + * <p><b>Note:</b> The key ('x') is used for the private use code. To be + * well-formed, the value for this key needs only to have subtags of one to + * eight alphanumeric characters, not two to eight as in the general case. + * + * @param builder the builder + * @param key the extension key + * @param value the value, a const char * pointer (need not be terminated when + * the length is non-negative) + * @param length the length of the value; if negative, then the value need to be + * null terminated, + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_setExtension(ULocaleBuilder* builder, char key, const char* value, int32_t length); + +/** + * Sets the Unicode locale keyword type for the given key. If the type + * StringPiece is constructed with a nullptr, the keyword is removed. + * If the type is the empty string, the keyword is set without type subtags. + * Otherwise, the key and type must be well-formed, or else the + * ulocbld_buildLocaleID() and ulocbld_buildLanguageTag() methods will later + * report an U_ILLEGAL_ARGUMENT_ERROR. + * + * <p>Keys and types are converted to lower case. + * + * <p><b>Note</b>:Setting the 'u' extension via {@link #ulocbld_setExtension} + * replaces all Unicode locale keywords with those defined in the + * extension. + * + * @param builder the builder + * @param key the Unicode locale key, a const char * pointer (need not be + * terminated when the length is non-negative) + * @param keyLength the length of the key; if negative, then the key need to be + * null terminated, + * @param type the Unicode locale type, a const char * pointer (need not be + * terminated when the length is non-negative) + * @param typeLength the length of the type; if negative, then the type need to + * be null terminated, + * @return This builder. + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_setUnicodeLocaleKeyword(ULocaleBuilder* builder, + const char* key, int32_t keyLength, const char* type, int32_t typeLength); + +/** + * Adds a unicode locale attribute, if not already present, otherwise + * has no effect. The attribute must not be empty string and must be + * well-formed or U_ILLEGAL_ARGUMENT_ERROR will be set to status + * during the ulocbld_buildLocaleID() and ulocbld_buildLanguageTag() calls. + * + * @param builder the builder + * @param attribute the attribute, a const char * pointer (need not be + * terminated when the length is non-negative) + * @param length the length of the attribute; if negative, then the attribute + * need to be null terminated, + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_addUnicodeLocaleAttribute( + ULocaleBuilder* builder, const char* attribute, int32_t length); + +/** + * Removes a unicode locale attribute, if present, otherwise has no + * effect. The attribute must not be empty string and must be well-formed + * or U_ILLEGAL_ARGUMENT_ERROR will be set to status during the ulocbld_buildLocaleID() + * and ulocbld_buildLanguageTag() calls. + * + * <p>Attribute comparison for removal is case-insensitive. + * + * @param builder the builder + * @param attribute the attribute, a const char * pointer (need not be + * terminated when the length is non-negative) + * @param length the length of the attribute; if negative, then the attribute + * need to be null terminated, + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_removeUnicodeLocaleAttribute( + ULocaleBuilder* builder, const char* attribute, int32_t length); + +/** + * Resets the builder to its initial, empty state. + * <p>This method clears the internal UErrorCode. + * + * @param builder the builder + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_clear(ULocaleBuilder* builder); + +/** + * Resets the extensions to their initial, empty state. + * Language, script, region and variant are unchanged. + * + * @param builder the builder + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_clearExtensions(ULocaleBuilder* builder); + +/** + * Build the LocaleID string from the fields set on this builder. + * If any set methods or during the ulocbld_buildLocaleID() call require memory + * allocation but fail U_MEMORY_ALLOCATION_ERROR will be set to status. + * If any of the fields set by the setters are not well-formed, the status + * will be set to U_ILLEGAL_ARGUMENT_ERROR. The state of the builder will + * not change after the ulocbld_buildLocaleID() call and the caller is + * free to keep using the same builder to build more locales. + * + * @param builder the builder + * @param locale the locale id + * @param localeCapacity the size of the locale buffer to store the locale id + * @param err the error code + * @return the length of the locale id in buffer + * @draft ICU 74 + */ +U_CAPI int32_t U_EXPORT2 +ulocbld_buildLocaleID(ULocaleBuilder* builder, char* locale, + int32_t localeCapacity, UErrorCode* err); + +/** + * Build the ULocale object from the fields set on this builder. + * If any set methods or during the ulocbld_buildULocale() call require memory + * allocation but fail U_MEMORY_ALLOCATION_ERROR will be set to status. + * If any of the fields set by the setters are not well-formed, the status + * will be set to U_ILLEGAL_ARGUMENT_ERROR. The state of the builder will + * not change after the ulocbld_buildULocale() call and the caller is + * free to keep using the same builder to build more locales. + * + * @param builder the builder. + * @param err the error code. + * @return the locale, a ULocale* pointer. The created ULocale must be + * destroyed by calling {@link ulocale_close}. + * @draft ICU 74 + */ +U_CAPI ULocale* U_EXPORT2 +ulocbld_buildULocale(ULocaleBuilder* builder, UErrorCode* err); + +/** + * Build the IETF BCP 47 language tag string from the fields set on this builder. + * If any set methods or during the ulocbld_buildLanguageTag() call require memory + * allocation but fail U_MEMORY_ALLOCATION_ERROR will be set to status. + * If any of the fields set by the setters are not well-formed, the status + * will be set to U_ILLEGAL_ARGUMENT_ERROR. The state of the builder will + * not change after the ulocbld_buildLanguageTag() call and the caller is free + * to keep using the same builder to build more locales. + * + * @param builder the builder + * @param language the language tag + * @param languageCapacity the size of the language buffer to store the language + * tag + * @param err the error code + * @return the length of the language tag in buffer + * @draft ICU 74 + */ +U_CAPI int32_t U_EXPORT2 +ulocbld_buildLanguageTag(ULocaleBuilder* builder, char* language, + int32_t languageCapacity, UErrorCode* err); + +/** + * Sets the UErrorCode if an error occurred while recording sets. + * Preserves older error codes in the outErrorCode. + * + * @param builder the builder + * @param outErrorCode Set to an error code that occurred while setting subtags. + * Unchanged if there is no such error or if outErrorCode + * already contained an error. + * @return true if U_FAILURE(*outErrorCode) + * @draft ICU 74 + */ +U_CAPI UBool U_EXPORT2 +ulocbld_copyErrorTo(const ULocaleBuilder* builder, UErrorCode *outErrorCode); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalULocaleBuilderPointer + * "Smart pointer" class, closes a ULocaleBuilder via ulocbld_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @draft ICU 74 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalULocaleBuilderPointer, ULocaleBuilder, ulocbld_close); + +U_NAMESPACE_END + +#endif /* U_SHOW_CPLUSPLUS_API */ + +#endif /* U_HIDE_DRAFT_API */ + +#endif // __ULOCBUILDER_H__ diff --git a/contrib/libs/icu/include/unicode/umachine.h b/contrib/libs/icu/include/unicode/umachine.h index 545abef595..c501b253b0 100644 --- a/contrib/libs/icu/include/unicode/umachine.h +++ b/contrib/libs/icu/include/unicode/umachine.h @@ -370,22 +370,14 @@ typedef int8_t UBool; #if 1 // #if 1 is normal. UChar defaults to char16_t in C++. // For configuration testing of UChar=uint16_t temporarily change this to #if 0. - // The intltest Makefile #defines UCHAR_TYPE=char16_t, - // so we only #define it to uint16_t if it is undefined so far. -#elif !defined(UCHAR_TYPE) +#else # define UCHAR_TYPE uint16_t #endif -#if defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) || \ - defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION) - // Inside the ICU library code, never configurable. +#if defined(U_ALL_IMPLEMENTATION) || !defined(UCHAR_TYPE) typedef char16_t UChar; -#elif defined(UCHAR_TYPE) - typedef UCHAR_TYPE UChar; -#elif U_CPLUSPLUS_VERSION != 0 - typedef char16_t UChar; // C++ #else - typedef uint16_t UChar; // C + typedef UCHAR_TYPE UChar; #endif /** diff --git a/contrib/libs/icu/include/unicode/unifunct.h b/contrib/libs/icu/include/unicode/unifunct.h index 8751302494..4aeb0f5d7d 100644 --- a/contrib/libs/icu/include/unicode/unifunct.h +++ b/contrib/libs/icu/include/unicode/unifunct.h @@ -83,7 +83,7 @@ public: * @return The class ID for all objects of this class. * @stable ICU 2.0 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * Returns a unique class ID <b>polymorphically</b>. This method @@ -100,7 +100,7 @@ public: * different class IDs. * @stable ICU 2.4 */ - virtual UClassID getDynamicClassID(void) const override = 0; + virtual UClassID getDynamicClassID() const override = 0; /** * Set the data object associated with this functor. The data diff --git a/contrib/libs/icu/include/unicode/uniset.h b/contrib/libs/icu/include/unicode/uniset.h index 84774d9f36..127e4ce063 100644 --- a/contrib/libs/icu/include/unicode/uniset.h +++ b/contrib/libs/icu/include/unicode/uniset.h @@ -333,7 +333,7 @@ public: * @see setToBogus() * @stable ICU 4.0 */ - inline UBool isBogus(void) const; + inline UBool isBogus() const; /** * Make this UnicodeSet object invalid. @@ -522,7 +522,7 @@ public: * @see Object#hashCode() * @stable ICU 2.0 */ - virtual int32_t hashCode(void) const; + virtual int32_t hashCode() const; /** * Get a UnicodeSet pointer from a USet @@ -792,7 +792,7 @@ public: * @stable ICU 2.0 * @see getRangeCount */ - virtual int32_t size(void) const; + virtual int32_t size() const; /** * Returns <tt>true</tt> if this set contains no elements. @@ -800,7 +800,7 @@ public: * @return <tt>true</tt> if this set contains no elements. * @stable ICU 2.0 */ - virtual UBool isEmpty(void) const; + virtual UBool isEmpty() const; /** * @return true if this set contains multi-character strings or the empty string. @@ -1394,7 +1394,7 @@ public: * A frozen set will not be modified. * @stable ICU 2.0 */ - virtual UnicodeSet& clear(void); + virtual UnicodeSet& clear(); /** * Close this set over the given attribute. For the attribute @@ -1440,7 +1440,7 @@ public: * @see #getRangeEnd * @stable ICU 2.4 */ - virtual int32_t getRangeCount(void) const; + virtual int32_t getRangeCount() const; /** * Iteration method that returns the first character in the @@ -1529,7 +1529,7 @@ public: * @return The class ID for all objects of this class. * @stable ICU 2.0 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * Implement UnicodeFunctor API. @@ -1539,9 +1539,9 @@ public: * different class IDs. * @stable ICU 2.4 */ - virtual UClassID getDynamicClassID(void) const override; + virtual UClassID getDynamicClassID() const override; -private: + private: // Private API for the USet API @@ -1602,7 +1602,7 @@ private: bool ensureBufferCapacity(int32_t newLen); - void swapBuffers(void); + void swapBuffers(); UBool allocateStrings(UErrorCode &status); int32_t stringsSize() const; diff --git a/contrib/libs/icu/include/unicode/unistr.h b/contrib/libs/icu/include/unicode/unistr.h index 4074e8d07b..a41e6358fa 100644 --- a/contrib/libs/icu/include/unicode/unistr.h +++ b/contrib/libs/icu/include/unicode/unistr.h @@ -1611,9 +1611,9 @@ public: * @stable ICU 2.0 */ inline int32_t extract(int32_t start, - int32_t startLength, - char *target, - const char *codepage = 0) const; + int32_t startLength, + char* target, + const char* codepage = nullptr) const; /** * Copy the characters in the range @@ -1759,7 +1759,7 @@ public: * @see countChar32 * @stable ICU 2.0 */ - inline int32_t length(void) const; + inline int32_t length() const; /** * Count Unicode code points in the length char16_t code units of the string. @@ -1808,7 +1808,7 @@ public: * @return true if this string contains 0 characters, false otherwise. * @stable ICU 2.0 */ - inline UBool isEmpty(void) const; + inline UBool isEmpty() const; /** * Return the capacity of the internal buffer of the UnicodeString object. @@ -1819,7 +1819,7 @@ public: * @see getBuffer * @stable ICU 2.0 */ - inline int32_t getCapacity(void) const; + inline int32_t getCapacity() const; /* Other operations */ @@ -1828,7 +1828,7 @@ public: * @return The hash code of this UnicodeString. * @stable ICU 2.0 */ - inline int32_t hashCode(void) const; + inline int32_t hashCode() const; /** * Determine if this object contains a valid string. @@ -1842,8 +1842,7 @@ public: * @see setToBogus() * @stable ICU 2.0 */ - inline UBool isBogus(void) const; - + inline UBool isBogus() const; //======================================== // Write operations @@ -2624,8 +2623,7 @@ public: * @return a reference to this * @stable ICU 2.0 */ - UnicodeString& trim(void); - + UnicodeString& trim(); /* Miscellaneous operations */ @@ -2634,7 +2632,7 @@ public: * @return a reference to this * @stable ICU 2.0 */ - inline UnicodeString& reverse(void); + inline UnicodeString& reverse(); /** * Reverse the range [`start`, `start + length`) in @@ -2653,7 +2651,7 @@ public: * @return A reference to this. * @stable ICU 2.0 */ - UnicodeString& toUpper(void); + UnicodeString& toUpper(); /** * Convert the characters in this to UPPER CASE following the conventions of @@ -2670,7 +2668,7 @@ public: * @return A reference to this. * @stable ICU 2.0 */ - UnicodeString& toLower(void); + UnicodeString& toLower(); /** * Convert the characters in this to lower case following the conventions of @@ -3590,12 +3588,12 @@ private: int32_t length); // calculate hash code - int32_t doHashCode(void) const; + int32_t doHashCode() const; // get pointer to start of array // these do not check for kOpenGetBuffer, unlike the public getBuffer() function - inline char16_t* getArrayStart(void); - inline const char16_t* getArrayStart(void) const; + inline char16_t* getArrayStart(); + inline const char16_t* getArrayStart() const; inline UBool hasShortLength() const; inline int32_t getShortLength() const; @@ -3622,7 +3620,7 @@ private: UBool allocate(int32_t capacity); // release the array if owned - void releaseArray(void); + void releaseArray(); // turn a bogus string into an empty one void unBogus(); @@ -3684,10 +3682,10 @@ private: * Return false if memory could not be allocated. */ UBool cloneArrayIfNeeded(int32_t newCapacity = -1, - int32_t growCapacity = -1, - UBool doCopyArray = true, - int32_t **pBufferToDelete = 0, - UBool forceClone = false); + int32_t growCapacity = -1, + UBool doCopyArray = true, + int32_t** pBufferToDelete = nullptr, + UBool forceClone = false); /** * Common function for UnicodeString case mappings. @@ -3702,9 +3700,9 @@ private: UStringCaseMapper *stringCaseMapper); // ref counting - void addRef(void); - int32_t removeRef(void); - int32_t refCount(void) const; + void addRef(); + int32_t removeRef(); + int32_t refCount() const; // constants enum { @@ -4510,7 +4508,7 @@ UnicodeString::extract(int32_t start, { // This dstSize value will be checked explicitly - return extract(start, _length, dst, dst!=0 ? 0xffffffff : 0, codepage); + return extract(start, _length, dst, dst != nullptr ? 0xffffffff : 0, codepage); } #endif diff --git a/contrib/libs/icu/include/unicode/unorm2.h b/contrib/libs/icu/include/unicode/unorm2.h index 24417b7103..3844041f17 100644 --- a/contrib/libs/icu/include/unicode/unorm2.h +++ b/contrib/libs/icu/include/unicode/unorm2.h @@ -181,7 +181,10 @@ U_CAPI const UNormalizer2 * U_EXPORT2 unorm2_getNFKDInstance(UErrorCode *pErrorCode); /** - * Returns a UNormalizer2 instance for Unicode NFKC_Casefold normalization. + * Returns a UNormalizer2 instance for Unicode toNFKC_Casefold() normalization + * which is equivalent to applying the NFKC_Casefold mappings and then NFC. + * See https://www.unicode.org/reports/tr44/#NFKC_Casefold + * * Same as unorm2_getInstance(NULL, "nfkc_cf", UNORM2_COMPOSE, pErrorCode). * Returns an unmodifiable singleton instance. Do not delete it. * @param pErrorCode Standard ICU error code. Its input value must @@ -194,6 +197,25 @@ unorm2_getNFKDInstance(UErrorCode *pErrorCode); U_CAPI const UNormalizer2 * U_EXPORT2 unorm2_getNFKCCasefoldInstance(UErrorCode *pErrorCode); +#ifndef U_HIDE_DRAFT_API +/** + * Returns a UNormalizer2 instance for a variant of Unicode toNFKC_Casefold() normalization + * which is equivalent to applying the NFKC_Simple_Casefold mappings and then NFC. + * See https://www.unicode.org/reports/tr44/#NFKC_Simple_Casefold + * + * Same as unorm2_getInstance(NULL, "nfkc_scf", UNORM2_COMPOSE, pErrorCode). + * Returns an unmodifiable singleton instance. Do not delete it. + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return the requested Normalizer2, if successful + * @draft ICU 74 + */ +U_CAPI const UNormalizer2 * U_EXPORT2 +unorm2_getNFKCSimpleCasefoldInstance(UErrorCode *pErrorCode); +#endif // U_HIDE_DRAFT_API + /** * Returns a UNormalizer2 instance which uses the specified data file * (packageName/name similar to ucnv_openPackage() and ures_open()/ResourceBundle) @@ -206,7 +228,7 @@ unorm2_getNFKCCasefoldInstance(UErrorCode *pErrorCode); * Use name="nfkc_cf" and UNORM2_COMPOSE for Unicode standard NFKC_CF=NFKC_Casefold. * * @param packageName NULL for ICU built-in data, otherwise application data package name - * @param name "nfc" or "nfkc" or "nfkc_cf" or name of custom data file + * @param name "nfc" or "nfkc" or "nfkc_cf" or "nfkc_scf" or name of custom data file * @param mode normalization mode (compose or decompose etc.) * @param pErrorCode Standard ICU error code. Its input value must * pass the U_SUCCESS() test, or else the function returns diff --git a/contrib/libs/icu/include/unicode/unum.h b/contrib/libs/icu/include/unicode/unum.h index 172ed08964..2dd2badc1b 100644 --- a/contrib/libs/icu/include/unicode/unum.h +++ b/contrib/libs/icu/include/unicode/unum.h @@ -1107,7 +1107,6 @@ typedef enum UNumberFormatAttribute { } UNumberFormatAttribute; -#ifndef U_HIDE_DRAFT_API /** * Returns true if the formatter supports the specified attribute and false if not. * @param fmt The formatter to query. @@ -1120,12 +1119,11 @@ typedef enum UNumberFormatAttribute { * @see unum_setDoubleAttribute * @see unum_getTextAttribute * @see unum_setTextAttribute -* @draft ICU 72 +* @stable ICU 72 */ U_CAPI bool U_EXPORT2 unum_hasAttribute(const UNumberFormat* fmt, UNumberFormatAttribute attr); -#endif // U_HIDE_DRAFT_API /** * Get a numeric attribute associated with a UNumberFormat. diff --git a/contrib/libs/icu/include/unicode/ureldatefmt.h b/contrib/libs/icu/include/unicode/ureldatefmt.h index 3c44890043..0882360d14 100644 --- a/contrib/libs/icu/include/unicode/ureldatefmt.h +++ b/contrib/libs/icu/include/unicode/ureldatefmt.h @@ -12,7 +12,7 @@ #include "unicode/utypes.h" -#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_BREAK_ITERATION +#if !UCONFIG_NO_FORMATTING #include "unicode/unum.h" #include "unicode/udisplaycontext.h" @@ -505,6 +505,6 @@ ureldatefmt_combineDateAndTime( const URelativeDateTimeFormatter* reldatefmt, int32_t resultCapacity, UErrorCode* status ); -#endif /* !UCONFIG_NO_FORMATTING && !UCONFIG_NO_BREAK_ITERATION */ +#endif /* !UCONFIG_NO_FORMATTING */ #endif diff --git a/contrib/libs/icu/include/unicode/urename.h b/contrib/libs/icu/include/unicode/urename.h index b35df45380..c94592ec03 100644 --- a/contrib/libs/icu/include/unicode/urename.h +++ b/contrib/libs/icu/include/unicode/urename.h @@ -138,8 +138,8 @@ #define locale_getKeywordsStart U_ICU_ENTRY_POINT_RENAME(locale_getKeywordsStart) #define locale_get_default U_ICU_ENTRY_POINT_RENAME(locale_get_default) #define locale_set_default U_ICU_ENTRY_POINT_RENAME(locale_set_default) +#define mixedMeasuresToMicros U_ICU_ENTRY_POINT_RENAME(mixedMeasuresToMicros) #define numSysCleanup U_ICU_ENTRY_POINT_RENAME(numSysCleanup) -#define rbbi_cleanup U_ICU_ENTRY_POINT_RENAME(rbbi_cleanup) #define pl_addFontRun U_ICU_ENTRY_POINT_RENAME(pl_addFontRun) #define pl_addLocaleRun U_ICU_ENTRY_POINT_RENAME(pl_addLocaleRun) #define pl_addValueRun U_ICU_ENTRY_POINT_RENAME(pl_addValueRun) @@ -193,6 +193,7 @@ #define pl_resetFontRuns U_ICU_ENTRY_POINT_RENAME(pl_resetFontRuns) #define pl_resetLocaleRuns U_ICU_ENTRY_POINT_RENAME(pl_resetLocaleRuns) #define pl_resetValueRuns U_ICU_ENTRY_POINT_RENAME(pl_resetValueRuns) +#define rbbi_cleanup U_ICU_ENTRY_POINT_RENAME(rbbi_cleanup) #define res_countArrayItems U_ICU_ENTRY_POINT_RENAME(res_countArrayItems) #define res_findResource U_ICU_ENTRY_POINT_RENAME(res_findResource) #define res_getAlias U_ICU_ENTRY_POINT_RENAME(res_getAlias) @@ -271,6 +272,7 @@ #define u_getDataVersion U_ICU_ENTRY_POINT_RENAME(u_getDataVersion) #define u_getDefaultConverter U_ICU_ENTRY_POINT_RENAME(u_getDefaultConverter) #define u_getFC_NFKC_Closure U_ICU_ENTRY_POINT_RENAME(u_getFC_NFKC_Closure) +#define u_getIDTypes U_ICU_ENTRY_POINT_RENAME(u_getIDTypes) #define u_getISOComment U_ICU_ENTRY_POINT_RENAME(u_getISOComment) #define u_getIntPropertyMap U_ICU_ENTRY_POINT_RENAME(u_getIntPropertyMap) #define u_getIntPropertyMaxValue U_ICU_ENTRY_POINT_RENAME(u_getIntPropertyMaxValue) @@ -288,6 +290,7 @@ #define u_getVersion U_ICU_ENTRY_POINT_RENAME(u_getVersion) #define u_get_stdout U_ICU_ENTRY_POINT_RENAME(u_get_stdout) #define u_hasBinaryProperty U_ICU_ENTRY_POINT_RENAME(u_hasBinaryProperty) +#define u_hasIDType U_ICU_ENTRY_POINT_RENAME(u_hasIDType) #define u_init U_ICU_ENTRY_POINT_RENAME(u_init) #define u_isIDIgnorable U_ICU_ENTRY_POINT_RENAME(u_isIDIgnorable) #define u_isIDPart U_ICU_ENTRY_POINT_RENAME(u_isIDPart) @@ -512,9 +515,6 @@ #define ubrk_setText U_ICU_ENTRY_POINT_RENAME(ubrk_setText) #define ubrk_setUText U_ICU_ENTRY_POINT_RENAME(ubrk_setUText) #define ubrk_swap U_ICU_ENTRY_POINT_RENAME(ubrk_swap) -#define ucache_compareKeys U_ICU_ENTRY_POINT_RENAME(ucache_compareKeys) -#define ucache_deleteKey U_ICU_ENTRY_POINT_RENAME(ucache_deleteKey) -#define ucache_hashKeys U_ICU_ENTRY_POINT_RENAME(ucache_hashKeys) #define ucal_add U_ICU_ENTRY_POINT_RENAME(ucal_add) #define ucal_clear U_ICU_ENTRY_POINT_RENAME(ucal_clear) #define ucal_clearField U_ICU_ENTRY_POINT_RENAME(ucal_clearField) @@ -532,6 +532,7 @@ #define ucal_getFieldDifference U_ICU_ENTRY_POINT_RENAME(ucal_getFieldDifference) #define ucal_getGregorianChange U_ICU_ENTRY_POINT_RENAME(ucal_getGregorianChange) #define ucal_getHostTimeZone U_ICU_ENTRY_POINT_RENAME(ucal_getHostTimeZone) +#define ucal_getIanaTimeZoneID U_ICU_ENTRY_POINT_RENAME(ucal_getIanaTimeZoneID) #define ucal_getKeywordValuesForLocale U_ICU_ENTRY_POINT_RENAME(ucal_getKeywordValuesForLocale) #define ucal_getLimit U_ICU_ENTRY_POINT_RENAME(ucal_getLimit) #define ucal_getLocaleByType U_ICU_ENTRY_POINT_RENAME(ucal_getLocaleByType) @@ -587,6 +588,7 @@ #define ucasemap_getLocale U_ICU_ENTRY_POINT_RENAME(ucasemap_getLocale) #define ucasemap_getOptions U_ICU_ENTRY_POINT_RENAME(ucasemap_getOptions) #define ucasemap_internalUTF8ToTitle U_ICU_ENTRY_POINT_RENAME(ucasemap_internalUTF8ToTitle) +#define ucasemap_mapUTF8 U_ICU_ENTRY_POINT_RENAME(ucasemap_mapUTF8) #define ucasemap_open U_ICU_ENTRY_POINT_RENAME(ucasemap_open) #define ucasemap_setBreakIterator U_ICU_ENTRY_POINT_RENAME(ucasemap_setBreakIterator) #define ucasemap_setLocale U_ICU_ENTRY_POINT_RENAME(ucasemap_setLocale) @@ -955,9 +957,16 @@ #define ufieldpositer_close U_ICU_ENTRY_POINT_RENAME(ufieldpositer_close) #define ufieldpositer_next U_ICU_ENTRY_POINT_RENAME(ufieldpositer_next) #define ufieldpositer_open U_ICU_ENTRY_POINT_RENAME(ufieldpositer_open) +#define ufile_close_translit U_ICU_ENTRY_POINT_RENAME(ufile_close_translit) +#define ufile_fill_uchar_buffer U_ICU_ENTRY_POINT_RENAME(ufile_fill_uchar_buffer) +#define ufile_flush_io U_ICU_ENTRY_POINT_RENAME(ufile_flush_io) +#define ufile_flush_translit U_ICU_ENTRY_POINT_RENAME(ufile_flush_translit) #define ufile_getch U_ICU_ENTRY_POINT_RENAME(ufile_getch) #define ufile_getch32 U_ICU_ENTRY_POINT_RENAME(ufile_getch32) +#define ufmt_64tou U_ICU_ENTRY_POINT_RENAME(ufmt_64tou) #define ufmt_close U_ICU_ENTRY_POINT_RENAME(ufmt_close) +#define ufmt_defaultCPToUnicode U_ICU_ENTRY_POINT_RENAME(ufmt_defaultCPToUnicode) +#define ufmt_digitvalue U_ICU_ENTRY_POINT_RENAME(ufmt_digitvalue) #define ufmt_getArrayItemByIndex U_ICU_ENTRY_POINT_RENAME(ufmt_getArrayItemByIndex) #define ufmt_getArrayLength U_ICU_ENTRY_POINT_RENAME(ufmt_getArrayLength) #define ufmt_getDate U_ICU_ENTRY_POINT_RENAME(ufmt_getDate) @@ -969,7 +978,11 @@ #define ufmt_getType U_ICU_ENTRY_POINT_RENAME(ufmt_getType) #define ufmt_getUChars U_ICU_ENTRY_POINT_RENAME(ufmt_getUChars) #define ufmt_isNumeric U_ICU_ENTRY_POINT_RENAME(ufmt_isNumeric) +#define ufmt_isdigit U_ICU_ENTRY_POINT_RENAME(ufmt_isdigit) #define ufmt_open U_ICU_ENTRY_POINT_RENAME(ufmt_open) +#define ufmt_ptou U_ICU_ENTRY_POINT_RENAME(ufmt_ptou) +#define ufmt_uto64 U_ICU_ENTRY_POINT_RENAME(ufmt_uto64) +#define ufmt_utop U_ICU_ENTRY_POINT_RENAME(ufmt_utop) #define ufmtval_getString U_ICU_ENTRY_POINT_RENAME(ufmtval_getString) #define ufmtval_nextPosition U_ICU_ENTRY_POINT_RENAME(ufmtval_nextPosition) #define ugender_getInstance U_ICU_ENTRY_POINT_RENAME(ugender_getInstance) @@ -1133,6 +1146,39 @@ #define uloc_toLegacyType U_ICU_ENTRY_POINT_RENAME(uloc_toLegacyType) #define uloc_toUnicodeLocaleKey U_ICU_ENTRY_POINT_RENAME(uloc_toUnicodeLocaleKey) #define uloc_toUnicodeLocaleType U_ICU_ENTRY_POINT_RENAME(uloc_toUnicodeLocaleType) +#define ulocale_close U_ICU_ENTRY_POINT_RENAME(ulocale_close) +#define ulocale_getBaseName U_ICU_ENTRY_POINT_RENAME(ulocale_getBaseName) +#define ulocale_getKeywordValue U_ICU_ENTRY_POINT_RENAME(ulocale_getKeywordValue) +#define ulocale_getKeywords U_ICU_ENTRY_POINT_RENAME(ulocale_getKeywords) +#define ulocale_getLanguage U_ICU_ENTRY_POINT_RENAME(ulocale_getLanguage) +#define ulocale_getLocaleID U_ICU_ENTRY_POINT_RENAME(ulocale_getLocaleID) +#define ulocale_getRegion U_ICU_ENTRY_POINT_RENAME(ulocale_getRegion) +#define ulocale_getScript U_ICU_ENTRY_POINT_RENAME(ulocale_getScript) +#define ulocale_getUnicodeKeywordValue U_ICU_ENTRY_POINT_RENAME(ulocale_getUnicodeKeywordValue) +#define ulocale_getUnicodeKeywords U_ICU_ENTRY_POINT_RENAME(ulocale_getUnicodeKeywords) +#define ulocale_getVariant U_ICU_ENTRY_POINT_RENAME(ulocale_getVariant) +#define ulocale_isBogus U_ICU_ENTRY_POINT_RENAME(ulocale_isBogus) +#define ulocale_openForLanguageTag U_ICU_ENTRY_POINT_RENAME(ulocale_openForLanguageTag) +#define ulocale_openForLocaleID U_ICU_ENTRY_POINT_RENAME(ulocale_openForLocaleID) +#define ulocbld_addUnicodeLocaleAttribute U_ICU_ENTRY_POINT_RENAME(ulocbld_addUnicodeLocaleAttribute) +#define ulocbld_adoptULocale U_ICU_ENTRY_POINT_RENAME(ulocbld_adoptULocale) +#define ulocbld_buildLanguageTag U_ICU_ENTRY_POINT_RENAME(ulocbld_buildLanguageTag) +#define ulocbld_buildLocaleID U_ICU_ENTRY_POINT_RENAME(ulocbld_buildLocaleID) +#define ulocbld_buildULocale U_ICU_ENTRY_POINT_RENAME(ulocbld_buildULocale) +#define ulocbld_clear U_ICU_ENTRY_POINT_RENAME(ulocbld_clear) +#define ulocbld_clearExtensions U_ICU_ENTRY_POINT_RENAME(ulocbld_clearExtensions) +#define ulocbld_close U_ICU_ENTRY_POINT_RENAME(ulocbld_close) +#define ulocbld_copyErrorTo U_ICU_ENTRY_POINT_RENAME(ulocbld_copyErrorTo) +#define ulocbld_open U_ICU_ENTRY_POINT_RENAME(ulocbld_open) +#define ulocbld_removeUnicodeLocaleAttribute U_ICU_ENTRY_POINT_RENAME(ulocbld_removeUnicodeLocaleAttribute) +#define ulocbld_setExtension U_ICU_ENTRY_POINT_RENAME(ulocbld_setExtension) +#define ulocbld_setLanguage U_ICU_ENTRY_POINT_RENAME(ulocbld_setLanguage) +#define ulocbld_setLanguageTag U_ICU_ENTRY_POINT_RENAME(ulocbld_setLanguageTag) +#define ulocbld_setLocale U_ICU_ENTRY_POINT_RENAME(ulocbld_setLocale) +#define ulocbld_setRegion U_ICU_ENTRY_POINT_RENAME(ulocbld_setRegion) +#define ulocbld_setScript U_ICU_ENTRY_POINT_RENAME(ulocbld_setScript) +#define ulocbld_setUnicodeLocaleKeyword U_ICU_ENTRY_POINT_RENAME(ulocbld_setUnicodeLocaleKeyword) +#define ulocbld_setVariant U_ICU_ENTRY_POINT_RENAME(ulocbld_setVariant) #define ulocdata_close U_ICU_ENTRY_POINT_RENAME(ulocdata_close) #define ulocdata_getCLDRVersion U_ICU_ENTRY_POINT_RENAME(ulocdata_getCLDRVersion) #define ulocdata_getDelimiter U_ICU_ENTRY_POINT_RENAME(ulocdata_getDelimiter) @@ -1148,16 +1194,20 @@ #define ulocimp_canonicalize U_ICU_ENTRY_POINT_RENAME(ulocimp_canonicalize) #define ulocimp_forLanguageTag U_ICU_ENTRY_POINT_RENAME(ulocimp_forLanguageTag) #define ulocimp_getBaseName U_ICU_ENTRY_POINT_RENAME(ulocimp_getBaseName) -#define ulocimp_getCountry U_ICU_ENTRY_POINT_RENAME(ulocimp_getCountry) #define ulocimp_getKeywordValue U_ICU_ENTRY_POINT_RENAME(ulocimp_getKeywordValue) #define ulocimp_getKeywords U_ICU_ENTRY_POINT_RENAME(ulocimp_getKeywords) #define ulocimp_getKnownCanonicalizedLocaleForTest U_ICU_ENTRY_POINT_RENAME(ulocimp_getKnownCanonicalizedLocaleForTest) #define ulocimp_getLanguage U_ICU_ENTRY_POINT_RENAME(ulocimp_getLanguage) #define ulocimp_getName U_ICU_ENTRY_POINT_RENAME(ulocimp_getName) +#define ulocimp_getParent U_ICU_ENTRY_POINT_RENAME(ulocimp_getParent) +#define ulocimp_getRegion U_ICU_ENTRY_POINT_RENAME(ulocimp_getRegion) #define ulocimp_getRegionForSupplementalData U_ICU_ENTRY_POINT_RENAME(ulocimp_getRegionForSupplementalData) #define ulocimp_getScript U_ICU_ENTRY_POINT_RENAME(ulocimp_getScript) +#define ulocimp_getSubtags U_ICU_ENTRY_POINT_RENAME(ulocimp_getSubtags) +#define ulocimp_getVariant U_ICU_ENTRY_POINT_RENAME(ulocimp_getVariant) #define ulocimp_isCanonicalizedLocaleForTest U_ICU_ENTRY_POINT_RENAME(ulocimp_isCanonicalizedLocaleForTest) #define ulocimp_minimizeSubtags U_ICU_ENTRY_POINT_RENAME(ulocimp_minimizeSubtags) +#define ulocimp_setKeywordValue U_ICU_ENTRY_POINT_RENAME(ulocimp_setKeywordValue) #define ulocimp_toBcpKey U_ICU_ENTRY_POINT_RENAME(ulocimp_toBcpKey) #define ulocimp_toBcpType U_ICU_ENTRY_POINT_RENAME(ulocimp_toBcpType) #define ulocimp_toLanguageTag U_ICU_ENTRY_POINT_RENAME(ulocimp_toLanguageTag) @@ -1213,6 +1263,7 @@ #define unorm2_getNFDInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFDInstance) #define unorm2_getNFKCCasefoldInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFKCCasefoldInstance) #define unorm2_getNFKCInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFKCInstance) +#define unorm2_getNFKCSimpleCasefoldInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFKCSimpleCasefoldInstance) #define unorm2_getNFKDInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFKDInstance) #define unorm2_getRawDecomposition U_ICU_ENTRY_POINT_RENAME(unorm2_getRawDecomposition) #define unorm2_hasBoundaryAfter U_ICU_ENTRY_POINT_RENAME(unorm2_hasBoundaryAfter) @@ -1349,6 +1400,7 @@ #define uprv_convertToPosix U_ICU_ENTRY_POINT_RENAME(uprv_convertToPosix) #define uprv_copyAscii U_ICU_ENTRY_POINT_RENAME(uprv_copyAscii) #define uprv_copyEbcdic U_ICU_ENTRY_POINT_RENAME(uprv_copyEbcdic) +#define uprv_currencyLeads U_ICU_ENTRY_POINT_RENAME(uprv_currencyLeads) #define uprv_decContextClearStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextClearStatus) #define uprv_decContextDefault U_ICU_ENTRY_POINT_RENAME(uprv_decContextDefault) #define uprv_decContextGetRounding U_ICU_ENTRY_POINT_RENAME(uprv_decContextGetRounding) @@ -1367,6 +1419,7 @@ #define uprv_decNumberAbs U_ICU_ENTRY_POINT_RENAME(uprv_decNumberAbs) #define uprv_decNumberAdd U_ICU_ENTRY_POINT_RENAME(uprv_decNumberAdd) #define uprv_decNumberAnd U_ICU_ENTRY_POINT_RENAME(uprv_decNumberAnd) +#define uprv_decNumberClass U_ICU_ENTRY_POINT_RENAME(uprv_decNumberClass) #define uprv_decNumberClassToString U_ICU_ENTRY_POINT_RENAME(uprv_decNumberClassToString) #define uprv_decNumberCompare U_ICU_ENTRY_POINT_RENAME(uprv_decNumberCompare) #define uprv_decNumberCompareSignal U_ICU_ENTRY_POINT_RENAME(uprv_decNumberCompareSignal) @@ -1753,6 +1806,7 @@ #define usnum_multiplyByPowerOfTen U_ICU_ENTRY_POINT_RENAME(usnum_multiplyByPowerOfTen) #define usnum_openForInt64 U_ICU_ENTRY_POINT_RENAME(usnum_openForInt64) #define usnum_roundTo U_ICU_ENTRY_POINT_RENAME(usnum_roundTo) +#define usnum_setMaximumIntegerDigits U_ICU_ENTRY_POINT_RENAME(usnum_setMaximumIntegerDigits) #define usnum_setMinimumFractionDigits U_ICU_ENTRY_POINT_RENAME(usnum_setMinimumFractionDigits) #define usnum_setMinimumIntegerDigits U_ICU_ENTRY_POINT_RENAME(usnum_setMinimumIntegerDigits) #define usnum_setSign U_ICU_ENTRY_POINT_RENAME(usnum_setSign) @@ -1763,6 +1817,9 @@ #define usnumf_formatInt64 U_ICU_ENTRY_POINT_RENAME(usnumf_formatInt64) #define usnumf_openForLocale U_ICU_ENTRY_POINT_RENAME(usnumf_openForLocale) #define usnumf_openForLocaleAndGroupingStrategy U_ICU_ENTRY_POINT_RENAME(usnumf_openForLocaleAndGroupingStrategy) +#define uspoof_areBidiConfusable U_ICU_ENTRY_POINT_RENAME(uspoof_areBidiConfusable) +#define uspoof_areBidiConfusableUTF8 U_ICU_ENTRY_POINT_RENAME(uspoof_areBidiConfusableUTF8) +#define uspoof_areBidiConfusableUnicodeString U_ICU_ENTRY_POINT_RENAME(uspoof_areBidiConfusableUnicodeString) #define uspoof_areConfusable U_ICU_ENTRY_POINT_RENAME(uspoof_areConfusable) #define uspoof_areConfusableUTF8 U_ICU_ENTRY_POINT_RENAME(uspoof_areConfusableUTF8) #define uspoof_areConfusableUnicodeString U_ICU_ENTRY_POINT_RENAME(uspoof_areConfusableUnicodeString) @@ -1778,6 +1835,9 @@ #define uspoof_getAllowedChars U_ICU_ENTRY_POINT_RENAME(uspoof_getAllowedChars) #define uspoof_getAllowedLocales U_ICU_ENTRY_POINT_RENAME(uspoof_getAllowedLocales) #define uspoof_getAllowedUnicodeSet U_ICU_ENTRY_POINT_RENAME(uspoof_getAllowedUnicodeSet) +#define uspoof_getBidiSkeleton U_ICU_ENTRY_POINT_RENAME(uspoof_getBidiSkeleton) +#define uspoof_getBidiSkeletonUTF8 U_ICU_ENTRY_POINT_RENAME(uspoof_getBidiSkeletonUTF8) +#define uspoof_getBidiSkeletonUnicodeString U_ICU_ENTRY_POINT_RENAME(uspoof_getBidiSkeletonUnicodeString) #define uspoof_getCheckResultChecks U_ICU_ENTRY_POINT_RENAME(uspoof_getCheckResultChecks) #define uspoof_getCheckResultNumerics U_ICU_ENTRY_POINT_RENAME(uspoof_getCheckResultNumerics) #define uspoof_getCheckResultRestrictionLevel U_ICU_ENTRY_POINT_RENAME(uspoof_getCheckResultRestrictionLevel) diff --git a/contrib/libs/icu/include/unicode/uscript.h b/contrib/libs/icu/include/unicode/uscript.h index dc97ab2ba5..2c9cee1bfa 100644 --- a/contrib/libs/icu/include/unicode/uscript.h +++ b/contrib/libs/icu/include/unicode/uscript.h @@ -500,6 +500,9 @@ typedef enum UScriptCode { /** @stable ICU 72 */ USCRIPT_NAG_MUNDARI = 199,/* Nagm */ + /** @stable ICU 75 */ + USCRIPT_ARABIC_NASTALIQ = 200, /* Aran */ + #ifndef U_HIDE_DEPRECATED_API /** * One more than the highest normal UScriptCode value. @@ -507,7 +510,7 @@ typedef enum UScriptCode { * * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ - USCRIPT_CODE_LIMIT = 200 + USCRIPT_CODE_LIMIT = 201 #endif // U_HIDE_DEPRECATED_API } UScriptCode; diff --git a/contrib/libs/icu/include/unicode/uset.h b/contrib/libs/icu/include/unicode/uset.h index ee4e0036d2..cce95ce921 100644 --- a/contrib/libs/icu/include/unicode/uset.h +++ b/contrib/libs/icu/include/unicode/uset.h @@ -109,7 +109,6 @@ enum { */ USET_ADD_CASE_MAPPINGS = 4, -#ifndef U_HIDE_DRAFT_API /** * Enable case insensitive matching. * Same as USET_CASE_INSENSITIVE but using only Simple_Case_Folding (scf) mappings, @@ -120,10 +119,9 @@ enum { * regular expression implementations where only Simple_Case_Folding mappings are used, * such as in ECMAScript (JavaScript) regular expressions. * - * @draft ICU 73 + * @stable ICU 73 */ USET_SIMPLE_CASE_INSENSITIVE = 6 -#endif // U_HIDE_DRAFT_API }; /** diff --git a/contrib/libs/icu/include/unicode/usimplenumberformatter.h b/contrib/libs/icu/include/unicode/usimplenumberformatter.h index ef89b46b9c..b67d7e56d5 100644 --- a/contrib/libs/icu/include/unicode/usimplenumberformatter.h +++ b/contrib/libs/icu/include/unicode/usimplenumberformatter.h @@ -50,31 +50,28 @@ * </pre> */ -#ifndef U_HIDE_DRAFT_API - - /** * An explicit sign option for a SimpleNumber. * - * @draft ICU 73 + * @stable ICU 73 */ typedef enum USimpleNumberSign { /** * Render a plus sign. * - * @draft ICU 73 + * @stable ICU 73 */ UNUM_SIMPLE_NUMBER_PLUS_SIGN, /** * Render no sign. * - * @draft ICU 73 + * @stable ICU 73 */ UNUM_SIMPLE_NUMBER_NO_SIGN, /** * Render a minus sign. * - * @draft ICU 73 + * @stable ICU 73 */ UNUM_SIMPLE_NUMBER_MINUS_SIGN, } USimpleNumberSign; @@ -84,7 +81,7 @@ struct USimpleNumber; /** * C-compatible version of icu::number::SimpleNumber. * - * @draft ICU 73 + * @stable ICU 73 */ typedef struct USimpleNumber USimpleNumber; @@ -93,7 +90,7 @@ struct USimpleNumberFormatter; /** * C-compatible version of icu::number::SimpleNumberFormatter. * - * @draft ICU 73 + * @stable ICU 73 */ typedef struct USimpleNumberFormatter USimpleNumberFormatter; @@ -101,7 +98,7 @@ typedef struct USimpleNumberFormatter USimpleNumberFormatter; /** * Creates a new USimpleNumber to be formatted with a USimpleNumberFormatter. * - * @draft ICU 73 + * @stable ICU 73 */ U_CAPI USimpleNumber* U_EXPORT2 usnum_openForInt64(int64_t value, UErrorCode* ec); @@ -112,7 +109,7 @@ usnum_openForInt64(int64_t value, UErrorCode* ec); * * This can be used to reset the number value after formatting. * - * @draft ICU 73 + * @stable ICU 73 */ U_CAPI void U_EXPORT2 usnum_setToInt64(USimpleNumber* unumber, int64_t value, UErrorCode* ec); @@ -123,18 +120,19 @@ usnum_setToInt64(USimpleNumber* unumber, int64_t value, UErrorCode* ec); * * This function immediately mutates the inner value. * - * @draft ICU 73 + * @stable ICU 73 */ U_CAPI void U_EXPORT2 usnum_multiplyByPowerOfTen(USimpleNumber* unumber, int32_t power, UErrorCode* ec); /** - * Rounds the value currently stored in the USimpleNumber to the given power of 10. + * Rounds the value currently stored in the USimpleNumber to the given power of 10, + * which can be before or after the decimal separator. * - * This function immediately mutates the inner value. + * This function does not change minimum integer digits. * - * @draft ICU 73 + * @stable ICU 73 */ U_CAPI void U_EXPORT2 usnum_roundTo(USimpleNumber* unumber, int32_t power, UNumberFormatRoundingMode roundingMode, UErrorCode* ec); @@ -143,9 +141,7 @@ usnum_roundTo(USimpleNumber* unumber, int32_t power, UNumberFormatRoundingMode r /** * Pads the beginning of the number with zeros up to the given minimum number of integer digits. * - * This setting is applied upon formatting the number. - * - * @draft ICU 73 + * @stable ICU 73 */ U_CAPI void U_EXPORT2 usnum_setMinimumIntegerDigits(USimpleNumber* unumber, int32_t minimumIntegerDigits, UErrorCode* ec); @@ -154,23 +150,33 @@ usnum_setMinimumIntegerDigits(USimpleNumber* unumber, int32_t minimumIntegerDigi /** * Pads the end of the number with zeros up to the given minimum number of fraction digits. * - * This setting is applied upon formatting the number. - * - * @draft ICU 73 + * @stable ICU 73 */ U_CAPI void U_EXPORT2 usnum_setMinimumFractionDigits(USimpleNumber* unumber, int32_t minimumFractionDigits, UErrorCode* ec); +#ifndef U_HIDE_DRAFT_API /** - * Truncates digits from the beginning of the number to the given maximum number of integer digits. + * Sets the number of integer digits to the given amount, truncating if necessary. * - * This function immediately mutates the inner value. + * @draft ICU 75 + */ +U_CAPI void U_EXPORT2 +usnum_setMaximumIntegerDigits(USimpleNumber* unumber, int32_t maximumIntegerDigits, UErrorCode* ec); +#endif // U_HIDE_DRAFT_API + + +#ifndef U_HIDE_DEPRECATED_API +/** + * Alias for setMaximumIntegerDigits. + * Will be removed after ICU 75. * - * @draft ICU 73 + * @deprecated ICU 75 */ U_CAPI void U_EXPORT2 usnum_truncateStart(USimpleNumber* unumber, int32_t maximumIntegerDigits, UErrorCode* ec); +#endif // U_HIDE_DEPRECATED_API /** @@ -180,7 +186,7 @@ usnum_truncateStart(USimpleNumber* unumber, int32_t maximumIntegerDigits, UError * * NOTE: This does not support accounting sign notation. * - * @draft ICU 73 + * @stable ICU 73 */ U_CAPI void U_EXPORT2 usnum_setSign(USimpleNumber* unumber, USimpleNumberSign sign, UErrorCode* ec); @@ -189,7 +195,7 @@ usnum_setSign(USimpleNumber* unumber, USimpleNumberSign sign, UErrorCode* ec); /** * Creates a new USimpleNumberFormatter with all locale defaults. * - * @draft ICU 73 + * @stable ICU 73 */ U_CAPI USimpleNumberFormatter* U_EXPORT2 usnumf_openForLocale(const char* locale, UErrorCode* ec); @@ -198,7 +204,7 @@ usnumf_openForLocale(const char* locale, UErrorCode* ec); /** * Creates a new USimpleNumberFormatter, overriding the grouping strategy. * - * @draft ICU 73 + * @stable ICU 73 */ U_CAPI USimpleNumberFormatter* U_EXPORT2 usnumf_openForLocaleAndGroupingStrategy( @@ -211,7 +217,7 @@ usnumf_openForLocaleAndGroupingStrategy( * The USimpleNumber is cleared after calling this function. It can be re-used via * usnum_setToInt64. * - * @draft ICU 73 + * @stable ICU 73 */ U_CAPI void U_EXPORT2 usnumf_format( @@ -226,7 +232,7 @@ usnumf_format( * * For more control over the formatting, use USimpleNumber. * - * @draft ICU 73 + * @stable ICU 73 */ U_CAPI void U_EXPORT2 usnumf_formatInt64( @@ -241,7 +247,7 @@ usnumf_formatInt64( * * NOTE: Normally, a USimpleNumber should be adopted by usnumf_formatAndAdoptNumber. * - * @draft ICU 73 + * @stable ICU 73 */ U_CAPI void U_EXPORT2 usnum_close(USimpleNumber* unumber); @@ -250,7 +256,7 @@ usnum_close(USimpleNumber* unumber); /** * Frees the memory held by a USimpleNumberFormatter. * - * @draft ICU 73 + * @stable ICU 73 */ U_CAPI void U_EXPORT2 usnumf_close(USimpleNumberFormatter* uformatter); @@ -275,7 +281,7 @@ U_NAMESPACE_BEGIN * * @see LocalPointerBase * @see LocalPointer - * @draft ICU 73 + * @stable ICU 73 */ U_DEFINE_LOCAL_OPEN_POINTER(LocalUSimpleNumberPointer, USimpleNumber, usnum_close); @@ -292,14 +298,12 @@ U_DEFINE_LOCAL_OPEN_POINTER(LocalUSimpleNumberPointer, USimpleNumber, usnum_clos * * @see LocalPointerBase * @see LocalPointer - * @draft ICU 73 + * @stable ICU 73 */ U_DEFINE_LOCAL_OPEN_POINTER(LocalUSimpleNumberFormatterPointer, USimpleNumberFormatter, usnumf_close); U_NAMESPACE_END #endif // U_SHOW_CPLUSPLUS_API -#endif // U_HIDE_DRAFT_API - #endif /* #if !UCONFIG_NO_FORMATTING */ #endif //__USIMPLENUMBERFORMATTER_H__ diff --git a/contrib/libs/icu/include/unicode/uspoof.h b/contrib/libs/icu/include/unicode/uspoof.h index 442655bb54..20d29d62b2 100644 --- a/contrib/libs/icu/include/unicode/uspoof.h +++ b/contrib/libs/icu/include/unicode/uspoof.h @@ -19,6 +19,7 @@ #ifndef USPOOF_H #define USPOOF_H +#include "unicode/ubidi.h" #include "unicode/utypes.h" #include "unicode/uset.h" #include "unicode/parseerr.h" @@ -83,6 +84,25 @@ * the instance should be created once (e.g., upon application startup), and the efficient * {@link uspoof_areConfusable} method can be used at runtime. * + * If the paragraph direction used to display the strings is known, the bidi function should be used instead: + * + * \code{.c} + * UErrorCode status = U_ZERO_ERROR; + * // These strings look identical when rendered in a left-to-right context. + * // They look distinct in a right-to-left context. + * UChar* str1 = (UChar*) u"A1\u05D0"; // A1א + * UChar* str2 = (UChar*) u"A\u05D01"; // Aא1 + * + * USpoofChecker* sc = uspoof_open(&status); + * uspoof_setChecks(sc, USPOOF_CONFUSABLE, &status); + * + * int32_t bitmask = uspoof_areBidiConfusable(sc, UBIDI_LTR, str1, -1, str2, -1, &status); + * UBool result = bitmask != 0; + * // areBidiConfusable: 1 (status: U_ZERO_ERROR) + * printf("areBidiConfusable: %d (status: %s)\n", result, u_errorName(status)); + * uspoof_close(sc); + * \endcode + * * <p> * The type {@link LocalUSpoofCheckerPointer} is exposed for C++ programmers. It will automatically call * {@link uspoof_close} when the object goes out of scope: @@ -339,6 +359,51 @@ * COMMON or INHERITED, such as numbers and punctuation, are ignored when computing whether a string has multiple * scripts. * + * <h2>Advanced bidirectional usage</h2> + * If the paragraph direction with which the identifiers will be displayed is not known, there are + * multiple options for confusable detection depending on the circumstances. + * + * <p> + * In some circumstances, the only concern is confusion between identifiers displayed with the same + * paragraph direction. + * + * <p> + * An example is the case where identifiers are usernames prefixed with the @ symbol. + * That symbol will appear to the left in a left-to-right context, and to the right in a + * right-to-left context, so that an identifier displayed in a left-to-right context can never be + * confused with an identifier displayed in a right-to-left context: + * <ul> + * <li> + * The usernames "A1א" (A one aleph) and "Aא1" (A aleph 1) + * would be considered confusable, since they both appear as \@A1א in a left-to-right context, and the + * usernames "אA_1" (aleph A underscore one) and "א1_A" (aleph one underscore A) would be considered + * confusable, since they both appear as A_1א@ in a right-to-left context. + * </li> + * <li> + * The username "Mark_" would not be considered confusable with the username "_Mark", + * even though the latter would appear as Mark_@ in a right-to-left context, and the + * former as \@Mark_ in a left-to-right context. + * </li> + * </ul> + * <p> + * In that case, the caller should check for both LTR-confusability and RTL-confusability: + * + * \code{.cpp} + * bool confusableInEitherDirection = + * uspoof_areBidiConfusableUnicodeString(sc, UBIDI_LTR, id1, id2, &status) || + * uspoof_areBidiConfusableUnicodeString(sc, UBIDI_RTL, id1, id2, &status); + * \endcode + * + * If the bidiSkeleton is used, the LTR and RTL skeleta should be kept separately and compared, LTR + * with LTR and RTL with RTL. + * + * <p> + * In cases where confusability between the visual appearances of an identifier displayed in a + * left-to-right context with another identifier displayed in a right-to-left context is a concern, + * the LTR skeleton of one can be compared with the RTL skeleton of the other. However, this + * very broad definition of confusability may have unexpected results; for instance, it treats the + * ASCII identifiers "Mark_" and "_Mark" as confusable. + * * <h2>Additional Information</h2> * * A <code>USpoofChecker</code> instance may be used repeatedly to perform checks on any number of identifiers. @@ -519,7 +584,7 @@ typedef enum USpoofChecks { /** - * Constants from UAX #39 for use in {@link uspoof_setRestrictionLevel}, and + * Constants from UTS #39 for use in {@link uspoof_setRestrictionLevel}, and * for returned identifier restriction levels in check results. * * @stable ICU 51 @@ -633,8 +698,8 @@ uspoof_openFromSerialized(const void *data, int32_t length, int32_t *pActualLeng /** * Open a Spoof Checker from the source form of the spoof data. * The input corresponds to the Unicode data file confusables.txt - * as described in Unicode UAX #39. The syntax of the source data - * is as described in UAX #39 for this file, and the content of + * as described in Unicode Technical Standard #39. The syntax of the source data + * is as described in UTS #39 for this file, and the content of * this file is acceptable input. * * The character encoding of the (char *) input text is UTF-8. @@ -1111,7 +1176,7 @@ uspoof_getCheckResultNumerics(const USpoofCheckResult *checkResult, UErrorCode * /** - * Check the whether two specified strings are visually confusable. + * Check whether two specified strings are visually confusable. * * If the strings are confusable, the return value will be nonzero, as long as * {@link USPOOF_CONFUSABLE} was enabled in uspoof_setChecks(). @@ -1159,7 +1224,58 @@ uspoof_areConfusable(const USpoofChecker *sc, const UChar *id2, int32_t length2, UErrorCode *status); - +#ifndef U_HIDE_DRAFT_API +/** + * Check whether two specified strings are visually confusable when + * displayed in a context with the given paragraph direction. + * + * If the strings are confusable, the return value will be nonzero, as long as + * {@link USPOOF_CONFUSABLE} was enabled in uspoof_setChecks(). + * + * The bits in the return value correspond to flags for each of the classes of + * confusables applicable to the two input strings. According to UTS 39 + * section 4, the possible flags are: + * + * <ul> + * <li>{@link USPOOF_SINGLE_SCRIPT_CONFUSABLE}</li> + * <li>{@link USPOOF_MIXED_SCRIPT_CONFUSABLE}</li> + * <li>{@link USPOOF_WHOLE_SCRIPT_CONFUSABLE}</li> + * </ul> + * + * If one or more of the above flags were not listed in uspoof_setChecks(), this + * function will never report that class of confusable. The check + * {@link USPOOF_CONFUSABLE} enables all three flags. + * + * + * @param sc The USpoofChecker + * @param direction The paragraph direction with which the identifiers are + * displayed. Must be either UBIDI_LTR or UBIDI_RTL. + * @param id1 The first of the two identifiers to be compared for + * confusability. The strings are in UTF-16 format. + * @param length1 the length of the first identifier, expressed in + * 16 bit UTF-16 code units, or -1 if the string is + * nul terminated. + * @param id2 The second of the two identifiers to be compared for + * confusability. The identifiers are in UTF-16 format. + * @param length2 The length of the second identifiers, expressed in + * 16 bit UTF-16 code units, or -1 if the string is + * nul terminated. + * @param status The error code, set if an error occurred while attempting to + * perform the check. + * Confusability of the identifiers is not reported here, + * but through this function's return value. + * @return An integer value with bit(s) set corresponding to + * the type of confusability found, as defined by + * enum USpoofChecks. Zero is returned if the identifiers + * are not confusable. + * + * @draft ICU 74 + */ +U_CAPI uint32_t U_EXPORT2 uspoof_areBidiConfusable(const USpoofChecker *sc, UBiDiDirection direction, + const UChar *id1, int32_t length1, + const UChar *id2, int32_t length2, + UErrorCode *status); +#endif /* U_HIDE_DRAFT_API */ /** * A version of {@link uspoof_areConfusable} accepting strings in UTF-8 format. @@ -1192,14 +1308,45 @@ uspoof_areConfusableUTF8(const USpoofChecker *sc, const char *id2, int32_t length2, UErrorCode *status); - - +#ifndef U_HIDE_DRAFT_API +/** + * A version of {@link uspoof_areBidiConfusable} accepting strings in UTF-8 format. + * + * @param sc The USpoofChecker + * @param direction The paragraph direction with which the identifiers are + * displayed. Must be either UBIDI_LTR or UBIDI_RTL. + * @param id1 The first of the two identifiers to be compared for + * confusability. The strings are in UTF-8 format. + * @param length1 the length of the first identifiers, in bytes, or -1 + * if the string is nul terminated. + * @param id2 The second of the two identifiers to be compared for + * confusability. The strings are in UTF-8 format. + * @param length2 The length of the second string in bytes, or -1 + * if the string is nul terminated. + * @param status The error code, set if an error occurred while attempting to + * perform the check. + * Confusability of the strings is not reported here, + * but through this function's return value. + * @return An integer value with bit(s) set corresponding to + * the type of confusability found, as defined by + * enum USpoofChecks. Zero is returned if the strings + * are not confusable. + * + * @draft ICU 74 + * + * @see uspoof_areBidiConfusable + */ +U_CAPI uint32_t U_EXPORT2 uspoof_areBidiConfusableUTF8(const USpoofChecker *sc, UBiDiDirection direction, + const char *id1, int32_t length1, + const char *id2, int32_t length2, + UErrorCode *status); +#endif /* U_HIDE_DRAFT_API */ /** * Get the "skeleton" for an identifier. * Skeletons are a transformation of the input identifier; * Two identifiers are confusable if their skeletons are identical. - * See Unicode UAX #39 for additional information. + * See Unicode Technical Standard #39 for additional information. * * Using skeletons directly makes it possible to quickly check * whether an identifier is confusable with any of some large @@ -1233,11 +1380,50 @@ uspoof_getSkeleton(const USpoofChecker *sc, UChar *dest, int32_t destCapacity, UErrorCode *status); +#ifndef U_HIDE_DRAFT_API +/** + * Get the "bidiSkeleton" for an identifier and a direction. + * Skeletons are a transformation of the input identifier; + * Two identifiers are LTR-confusable if their LTR bidiSkeletons are identical; + * they are RTL-confusable if their RTL bidiSkeletons are identical. + * See Unicode Technical Standard #39 for additional information: + * https://www.unicode.org/reports/tr39/#Confusable_Detection. + * + * Using skeletons directly makes it possible to quickly check + * whether an identifier is confusable with any of some large + * set of existing identifiers, by creating an efficiently + * searchable collection of the skeletons. + * + * @param sc The USpoofChecker. + * @param direction The context direction with which the identifier will be + * displayed. Must be either UBIDI_LTR or UBIDI_RTL. + * @param id The input identifier whose skeleton will be computed. + * @param length The length of the input identifier, expressed in 16 bit + * UTF-16 code units, or -1 if the string is zero terminated. + * @param dest The output buffer, to receive the skeleton string. + * @param destCapacity The length of the output buffer, in 16 bit units. + * The destCapacity may be zero, in which case the function will + * return the actual length of the skeleton. + * @param status The error code, set if an error occurred while attempting to + * perform the check. + * @return The length of the skeleton string. The returned length + * is always that of the complete skeleton, even when the + * supplied buffer is too small (or of zero length) + * + * @draft ICU 74 + * @see uspoof_areBidiConfusable + */ +U_CAPI int32_t U_EXPORT2 uspoof_getBidiSkeleton(const USpoofChecker *sc, + UBiDiDirection direction, + const UChar *id, int32_t length, + UChar *dest, int32_t destCapacity, UErrorCode *status); +#endif /* U_HIDE_DRAFT_API */ + /** * Get the "skeleton" for an identifier. * Skeletons are a transformation of the input identifier; * Two identifiers are confusable if their skeletons are identical. - * See Unicode UAX #39 for additional information. + * See Unicode Technical Standard #39 for additional information. * * Using skeletons directly makes it possible to quickly check * whether an identifier is confusable with any of some large @@ -1273,6 +1459,46 @@ uspoof_getSkeletonUTF8(const USpoofChecker *sc, char *dest, int32_t destCapacity, UErrorCode *status); +#ifndef U_HIDE_DRAFT_API +/** + * Get the "bidiSkeleton" for an identifier and a direction. + * Skeletons are a transformation of the input identifier; + * Two identifiers are LTR-confusable if their LTR bidiSkeletons are identical; + * they are RTL-confusable if their RTL bidiSkeletons are identical. + * See Unicode Technical Standard #39 for additional information: + * https://www.unicode.org/reports/tr39/#Confusable_Detection. + * + * Using skeletons directly makes it possible to quickly check + * whether an identifier is confusable with any of some large + * set of existing identifiers, by creating an efficiently + * searchable collection of the skeletons. + * + * @param sc The USpoofChecker + * @param direction The context direction with which the identifier will be + * displayed. Must be either UBIDI_LTR or UBIDI_RTL. + * @param id The UTF-8 format identifier whose skeleton will be computed. + * @param length The length of the input string, in bytes, + * or -1 if the string is zero terminated. + * @param dest The output buffer, to receive the skeleton string. + * @param destCapacity The length of the output buffer, in bytes. + * The destCapacity may be zero, in which case the function will + * return the actual length of the skeleton. + * @param status The error code, set if an error occurred while attempting to + * perform the check. Possible Errors include U_INVALID_CHAR_FOUND + * for invalid UTF-8 sequences, and + * U_BUFFER_OVERFLOW_ERROR if the destination buffer is too small + * to hold the complete skeleton. + * @return The length of the skeleton string, in bytes. The returned length + * is always that of the complete skeleton, even when the + * supplied buffer is too small (or of zero length) + * + * @draft ICU 74 + */ +U_CAPI int32_t U_EXPORT2 uspoof_getBidiSkeletonUTF8(const USpoofChecker *sc, UBiDiDirection direction, + const char *id, int32_t length, char *dest, + int32_t destCapacity, UErrorCode *status); +#endif /* U_HIDE_DRAFT_API */ + /** * Get the set of Candidate Characters for Inclusion in Identifiers, as defined * in http://unicode.org/Public/security/latest/xidmodifications.txt @@ -1510,11 +1736,42 @@ uspoof_areConfusableUnicodeString(const USpoofChecker *sc, const icu::UnicodeString &s2, UErrorCode *status); +#ifndef U_HIDE_DRAFT_API +/** + * A version of {@link uspoof_areBidiConfusable} accepting UnicodeStrings. + * + * @param sc The USpoofChecker + * @param direction The paragraph direction with which the identifiers are + * displayed. Must be either UBIDI_LTR or UBIDI_RTL. + * @param s1 The first of the two identifiers to be compared for + * confusability. The strings are in UTF-8 format. + * @param s2 The second of the two identifiers to be compared for + * confusability. The strings are in UTF-8 format. + * @param status The error code, set if an error occurred while attempting to + * perform the check. + * Confusability of the identifiers is not reported here, + * but through this function's return value. + * @return An integer value with bit(s) set corresponding to + * the type of confusability found, as defined by + * enum USpoofChecks. Zero is returned if the identifiers + * are not confusable. + * + * @draft ICU 74 + * + * @see uspoof_areBidiConfusable + */ +U_CAPI uint32_t U_EXPORT2 uspoof_areBidiConfusableUnicodeString(const USpoofChecker *sc, + UBiDiDirection direction, + const icu::UnicodeString &s1, + const icu::UnicodeString &s2, + UErrorCode *status); +#endif /* U_HIDE_DRAFT_API */ + /** * Get the "skeleton" for an identifier. * Skeletons are a transformation of the input identifier; * Two identifiers are confusable if their skeletons are identical. - * See Unicode UAX #39 for additional information. + * See Unicode Technical Standard #39 for additional information. * * Using skeletons directly makes it possible to quickly check * whether an identifier is confusable with any of some large @@ -1540,6 +1797,36 @@ uspoof_getSkeletonUnicodeString(const USpoofChecker *sc, icu::UnicodeString &dest, UErrorCode *status); +#ifndef U_HIDE_DRAFT_API +/** + * Get the "bidiSkeleton" for an identifier and a direction. + * Skeletons are a transformation of the input identifier; + * Two identifiers are LTR-confusable if their LTR bidiSkeletons are identical; + * they are RTL-confusable if their RTL bidiSkeletons are identical. + * See Unicode Technical Standard #39 for additional information. + * https://www.unicode.org/reports/tr39/#Confusable_Detection. + * + * Using skeletons directly makes it possible to quickly check + * whether an identifier is confusable with any of some large + * set of existing identifiers, by creating an efficiently + * searchable collection of the skeletons. + * + * @param sc The USpoofChecker. + * @param direction The context direction with which the identifier will be + * displayed. Must be either UBIDI_LTR or UBIDI_RTL. + * @param id The input identifier whose bidiSkeleton will be computed. + * @param dest The output identifier, to receive the skeleton string. + * @param status The error code, set if an error occurred while attempting to + * perform the check. + * @return A reference to the destination (skeleton) string. + * + * @draft ICU 74 + */ +U_I18N_API icu::UnicodeString &U_EXPORT2 uspoof_getBidiSkeletonUnicodeString( + const USpoofChecker *sc, UBiDiDirection direction, const icu::UnicodeString &id, + icu::UnicodeString &dest, UErrorCode *status); +#endif /* U_HIDE_DRAFT_API */ + /** * Get the set of Candidate Characters for Inclusion in Identifiers, as defined * in http://unicode.org/Public/security/latest/xidmodifications.txt diff --git a/contrib/libs/icu/include/unicode/utypes.h b/contrib/libs/icu/include/unicode/utypes.h index f890d5d1db..6c7cc51345 100644 --- a/contrib/libs/icu/include/unicode/utypes.h +++ b/contrib/libs/icu/include/unicode/utypes.h @@ -438,6 +438,7 @@ typedef enum UErrorCode { U_PLUGIN_CHANGED_LEVEL_WARNING = -120, /**< A plugin caused a level change. May not be an error, but later plugins may not load. */ + #ifndef U_HIDE_DEPRECATED_API /** * One more than the highest normal UErrorCode warning value. @@ -568,12 +569,27 @@ typedef enum UErrorCode { U_FORMAT_INEXACT_ERROR, /**< Cannot format a number exactly and rounding mode is ROUND_UNNECESSARY @stable ICU 4.8 */ U_NUMBER_ARG_OUTOFBOUNDS_ERROR, /**< The argument to a NumberFormatter helper method was out of bounds; the bounds are usually 0 to 999. @stable ICU 61 */ U_NUMBER_SKELETON_SYNTAX_ERROR, /**< The number skeleton passed to C++ NumberFormatter or C UNumberFormatter was invalid or contained a syntax error. @stable ICU 62 */ + + /* MessageFormat 2.0 errors */ + U_MF_UNRESOLVED_VARIABLE_ERROR, /**< A variable is referred to but not bound by any definition @internal ICU 75 technology preview @deprecated This API is for technology preview only. */ + U_MF_SYNTAX_ERROR, /**< Includes all syntax errors @internal ICU 75 technology preview @deprecated This API is for technology preview only. */ + U_MF_UNKNOWN_FUNCTION_ERROR, /**< An annotation refers to a function not defined by the standard or custom function registry @internal ICU 75 technology preview @deprecated This API is for technology preview only. */ + U_MF_VARIANT_KEY_MISMATCH_ERROR, /**< In a match-construct, one or more variants had a different number of keys from the number of selectors @internal ICU 75 technology preview @deprecated This API is for technology preview only. */ + U_MF_FORMATTING_ERROR, /**< Covers all runtime errors: for example, an internally inconsistent set of options. @internal ICU 75 technology preview @deprecated This API is for technology preview only. */ + U_MF_NONEXHAUSTIVE_PATTERN_ERROR, /**< In a match-construct, the variants do not cover all possible values @internal ICU 75 technology preview @deprecated This API is for technology preview only. */ + U_MF_DUPLICATE_OPTION_NAME_ERROR, /**< In an annotation, the same option name appears more than once @internal ICU 75 technology preview @deprecated This API is for technology preview only. */ + U_MF_SELECTOR_ERROR, /**< A selector function is applied to an operand of the wrong type @internal ICU 75 technology preview @deprecated This API is for technology preview only. */ + U_MF_MISSING_SELECTOR_ANNOTATION_ERROR, /**< A selector expression evaluates to an unannotated operand. @internal ICU 75 technology preview @deprecated This API is for technology preview only. */ + U_MF_DUPLICATE_DECLARATION_ERROR, /**< The same variable is declared in more than one .local or .input declaration. @internal ICU 75 technology preview @deprecated This API is for technology preview only. */ + U_MF_OPERAND_MISMATCH_ERROR, /**< An operand provided to a function does not have the required form for that function @internal ICU 75 technology preview @deprecated This API is for technology preview only. */ + U_MF_UNSUPPORTED_STATEMENT_ERROR, /**< A message includes a reserved statement. @internal ICU 75 technology preview @deprecated This API is for technology preview only. */ + U_MF_UNSUPPORTED_EXPRESSION_ERROR, /**< A message includes syntax reserved for future standardization or private implementation use. @internal ICU 75 technology preview @deprecated This API is for technology preview only. */ #ifndef U_HIDE_DEPRECATED_API /** * One more than the highest normal formatting API error code. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ - U_FMT_PARSE_ERROR_LIMIT = 0x10114, + U_FMT_PARSE_ERROR_LIMIT = 0x10121, #endif // U_HIDE_DEPRECATED_API /* diff --git a/contrib/libs/icu/include/unicode/uvernum.h b/contrib/libs/icu/include/unicode/uvernum.h index fc784b2492..eb7c50f385 100644 --- a/contrib/libs/icu/include/unicode/uvernum.h +++ b/contrib/libs/icu/include/unicode/uvernum.h @@ -53,13 +53,13 @@ * This value will change in the subsequent releases of ICU * @stable ICU 2.4 */ -#define U_ICU_VERSION_MAJOR_NUM 73 +#define U_ICU_VERSION_MAJOR_NUM 75 /** The current ICU minor version as an integer. * This value will change in the subsequent releases of ICU * @stable ICU 2.6 */ -#define U_ICU_VERSION_MINOR_NUM 2 +#define U_ICU_VERSION_MINOR_NUM 1 /** The current ICU patchlevel version as an integer. * This value will change in the subsequent releases of ICU @@ -79,7 +79,7 @@ * This value will change in the subsequent releases of ICU * @stable ICU 2.6 */ -#define U_ICU_VERSION_SUFFIX _73 +#define U_ICU_VERSION_SUFFIX _75 /** * \def U_DEF2_ICU_ENTRY_POINT_RENAME @@ -132,7 +132,7 @@ * This value will change in the subsequent releases of ICU * @stable ICU 2.4 */ -#define U_ICU_VERSION "73.2" +#define U_ICU_VERSION "75.1" /** * The current ICU library major version number as a string, for library name suffixes. @@ -145,13 +145,13 @@ * * @stable ICU 2.6 */ -#define U_ICU_VERSION_SHORT "73" +#define U_ICU_VERSION_SHORT "75" #ifndef U_HIDE_INTERNAL_API /** Data version in ICU4C. * @internal ICU 4.4 Internal Use Only **/ -#define U_ICU_DATA_VERSION "73.2" +#define U_ICU_DATA_VERSION "75.1" #endif /* U_HIDE_INTERNAL_API */ /*=========================================================================== diff --git a/contrib/libs/icu/include/unicode/vtzone.h b/contrib/libs/icu/include/unicode/vtzone.h index 93f4ecb939..5e5e8d7d7e 100644 --- a/contrib/libs/icu/include/unicode/vtzone.h +++ b/contrib/libs/icu/include/unicode/vtzone.h @@ -289,7 +289,7 @@ public: * @return The TimeZone's raw GMT offset. * @stable ICU 3.8 */ - virtual int32_t getRawOffset(void) const override; + virtual int32_t getRawOffset() const override; /** * Queries if this time zone uses daylight savings time. @@ -297,7 +297,7 @@ public: * false, otherwise. * @stable ICU 3.8 */ - virtual UBool useDaylightTime(void) const override; + virtual UBool useDaylightTime() const override; #ifndef U_FORCE_HIDE_DEPRECATED_API /** @@ -445,7 +445,7 @@ public: * @return The class ID for all objects of this class. * @stable ICU 3.8 */ - static UClassID U_EXPORT2 getStaticClassID(void); + static UClassID U_EXPORT2 getStaticClassID(); /** * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This @@ -458,7 +458,7 @@ public: * other classes have different class IDs. * @stable ICU 3.8 */ - virtual UClassID getDynamicClassID(void) const override; + virtual UClassID getDynamicClassID() const override; }; U_NAMESPACE_END diff --git a/contrib/libs/icu/io/locbund.cpp b/contrib/libs/icu/io/locbund.cpp index 3f6d6309ac..a863e90216 100644 --- a/contrib/libs/icu/io/locbund.cpp +++ b/contrib/libs/icu/io/locbund.cpp @@ -72,8 +72,8 @@ u_locbund_init(ULocaleBundle *result, const char *loc) { int32_t len; - if(result == 0) - return 0; + if (result == nullptr) + return nullptr; if (loc == nullptr) { loc = uloc_getDefault(); @@ -83,8 +83,8 @@ u_locbund_init(ULocaleBundle *result, const char *loc) len = (int32_t)strlen(loc); result->fLocale = (char*) uprv_malloc(len + 1); - if(result->fLocale == 0) { - return 0; + if (result->fLocale == nullptr) { + return nullptr; } uprv_strcpy(result->fLocale, loc); diff --git a/contrib/libs/icu/io/sprintf.cpp b/contrib/libs/icu/io/sprintf.cpp index 48d9bcc27c..792ad00fd9 100644 --- a/contrib/libs/icu/io/sprintf.cpp +++ b/contrib/libs/icu/io/sprintf.cpp @@ -43,7 +43,7 @@ u_sprintf_write(void *context, u_localized_print_string *output = (u_localized_print_string *)context; /* just calculating buffer size */ - if (output->str == 0) { + if (output->str == nullptr) { return count; } @@ -65,7 +65,7 @@ u_sprintf_pad_and_justify(void *context, int32_t lengthOfResult = resultLen; /* just calculating buffer size */ - if (output->str == 0 && + if (output->str == nullptr && info->fWidth != -1 && resultLen < info->fWidth) { return info->fWidth; } @@ -195,7 +195,7 @@ u_vsnprintf(char16_t *buffer, /* convert from the default codepage to Unicode */ if (size >= (int32_t)MAX_UCHAR_BUFFER_SIZE(patBuffer)) { pattern = (char16_t *)uprv_malloc(size * sizeof(char16_t)); - if(pattern == 0) { + if (pattern == nullptr) { return 0; } } @@ -247,7 +247,7 @@ u_vsnprintf_u(char16_t *buffer, outStr.len = count; outStr.available = count; - if(u_locbund_init(&outStr.fBundle, "en_US_POSIX") == 0) { + if (u_locbund_init(&outStr.fBundle, "en_US_POSIX") == nullptr) { return 0; } diff --git a/contrib/libs/icu/io/sscanf.cpp b/contrib/libs/icu/io/sscanf.cpp index 8940127eb1..deef15d40c 100644 --- a/contrib/libs/icu/io/sscanf.cpp +++ b/contrib/libs/icu/io/sscanf.cpp @@ -75,7 +75,7 @@ u_vsscanf(const char16_t *buffer, /* convert from the default codepage to Unicode */ if (size >= (int32_t)MAX_UCHAR_BUFFER_SIZE(patBuffer)) { pattern = (char16_t *)uprv_malloc(size * sizeof(char16_t)); - if(pattern == 0) { + if (pattern == nullptr) { return 0; } } @@ -114,7 +114,7 @@ u_vsscanf_u(const char16_t *buffer, inStr.str.fPos = (char16_t *)buffer; inStr.str.fLimit = buffer + u_strlen(buffer); - if(u_locbund_init(&inStr.str.fBundle, "en_US_POSIX") == 0) { + if (u_locbund_init(&inStr.str.fBundle, "en_US_POSIX") == nullptr) { return 0; } diff --git a/contrib/libs/icu/io/ufile.cpp b/contrib/libs/icu/io/ufile.cpp index 9e87e4058e..9d8330743f 100644 --- a/contrib/libs/icu/io/ufile.cpp +++ b/contrib/libs/icu/io/ufile.cpp @@ -69,11 +69,11 @@ finit_owner(FILE *f, UErrorCode status = U_ZERO_ERROR; UFILE *result; if(f == nullptr) { - return 0; + return nullptr; } result = (UFILE*) uprv_malloc(sizeof(UFILE)); if(result == nullptr) { - return 0; + return nullptr; } uprv_memset(result, 0, sizeof(UFILE)); @@ -86,10 +86,10 @@ finit_owner(FILE *f, #if !UCONFIG_NO_FORMATTING /* if locale is 0, use the default */ - if(u_locbund_init(&result->str.fBundle, locale) == 0) { + if (u_locbund_init(&result->str.fBundle, locale) == nullptr) { /* DO NOT FCLOSE HERE! */ uprv_free(result); - return 0; + return nullptr; } #endif @@ -138,8 +138,8 @@ u_fopen(const char *filename, { UFILE *result; FILE *systemFile = fopen(filename, perm); - if(systemFile == 0) { - return 0; + if (systemFile == nullptr) { + return nullptr; } result = finit_owner(systemFile, locale, codepage, true); @@ -238,10 +238,10 @@ u_fstropen(char16_t *stringBuf, #if !UCONFIG_NO_FORMATTING /* if locale is 0, use the default */ - if(u_locbund_init(&result->str.fBundle, locale) == 0) { + if (u_locbund_init(&result->str.fBundle, locale) == nullptr) { /* DO NOT FCLOSE HERE! */ uprv_free(result); - return 0; + return nullptr; } #endif @@ -330,7 +330,7 @@ u_fsetlocale(UFILE *file, { u_locbund_close(&file->str.fBundle); - return u_locbund_init(&file->str.fBundle, locale) == 0 ? -1 : 0; + return u_locbund_init(&file->str.fBundle, locale) == nullptr ? -1 : 0; } #endif @@ -344,7 +344,7 @@ u_fgetcodepage(UFILE *file) if (file->fConverter) { codepage = ucnv_getName(file->fConverter, &status); if(U_FAILURE(status)) - return 0; + return nullptr; } return codepage; } diff --git a/contrib/libs/icu/io/ufmt_cmn.cpp b/contrib/libs/icu/io/ufmt_cmn.cpp index 3d8f6413d8..8526272939 100644 --- a/contrib/libs/icu/io/ufmt_cmn.cpp +++ b/contrib/libs/icu/io/ufmt_cmn.cpp @@ -230,17 +230,16 @@ ufmt_defaultCPToUnicode(const char *s, int32_t sSize, char16_t *alias; UErrorCode status = U_ZERO_ERROR; UConverter *defConverter = u_getDefaultConverter(&status); - - if(U_FAILURE(status) || defConverter == 0) - return 0; + + if (U_FAILURE(status) || defConverter == nullptr) + return nullptr; if(sSize <= 0) { sSize = static_cast<int32_t>(uprv_strlen(s)) + 1; } /* perform the conversion in one swoop */ - if(target != 0) { - + if (target != nullptr) { alias = target; ucnv_toUnicode(defConverter, &alias, alias + tSize, &s, s + sSize - 1, nullptr, true, &status); diff --git a/contrib/libs/icu/io/uprintf.cpp b/contrib/libs/icu/io/uprintf.cpp index 7effa61993..c2e1f308af 100644 --- a/contrib/libs/icu/io/uprintf.cpp +++ b/contrib/libs/icu/io/uprintf.cpp @@ -176,7 +176,7 @@ u_vfprintf( UFILE *f, /* convert from the default codepage to Unicode */ if (size >= MAX_UCHAR_BUFFER_SIZE(buffer)) { pattern = (char16_t *)uprv_malloc(size * sizeof(char16_t)); - if(pattern == 0) { + if (pattern == nullptr) { return 0; } } diff --git a/contrib/libs/icu/io/uprntf_p.cpp b/contrib/libs/icu/io/uprntf_p.cpp index 399d2dc751..06d0f789d6 100644 --- a/contrib/libs/icu/io/uprntf_p.cpp +++ b/contrib/libs/icu/io/uprntf_p.cpp @@ -301,7 +301,7 @@ u_printf_double_handler(const u_printf_stream_handler *handler, format = u_locbund_getNumberFormat(formatBundle, UNUM_DECIMAL); /* handle error */ - if(format == 0) + if (format == nullptr) return 0; /* save the formatter's state */ @@ -329,7 +329,7 @@ u_printf_double_handler(const u_printf_stream_handler *handler, } /* format the number */ - resultLen = unum_formatDouble(format, num, result, UPRINTF_BUFFER_SIZE, 0, &status); + resultLen = unum_formatDouble(format, num, result, UPRINTF_BUFFER_SIZE, nullptr, &status); if (U_FAILURE(status)) { resultLen = 0; @@ -378,7 +378,7 @@ u_printf_integer_handler(const u_printf_stream_handler *handler, format = u_locbund_getNumberFormat(formatBundle, UNUM_DECIMAL); /* handle error */ - if(format == 0) + if (format == nullptr) return 0; /* set the appropriate flags on the formatter */ @@ -396,7 +396,7 @@ u_printf_integer_handler(const u_printf_stream_handler *handler, } /* format the number */ - resultLen = unum_formatInt64(format, num, result, UPRINTF_BUFFER_SIZE, 0, &status); + resultLen = unum_formatInt64(format, num, result, UPRINTF_BUFFER_SIZE, nullptr, &status); if (U_FAILURE(status)) { resultLen = 0; @@ -511,7 +511,7 @@ u_printf_uinteger_handler(const u_printf_stream_handler *handler, format = u_locbund_getNumberFormat(formatBundle, UNUM_DECIMAL); /* handle error */ - if(format == 0) + if (format == nullptr) return 0; /* set the appropriate flags on the formatter */ @@ -526,7 +526,7 @@ u_printf_uinteger_handler(const u_printf_stream_handler *handler, /* To mirror other stdio implementations, we ignore the sign argument */ /* format the number */ - resultLen = unum_formatInt64(format, num, result, UPRINTF_BUFFER_SIZE, 0, &status); + resultLen = unum_formatInt64(format, num, result, UPRINTF_BUFFER_SIZE, nullptr, &status); if (U_FAILURE(status)) { resultLen = 0; @@ -587,7 +587,7 @@ u_printf_scientific_handler(const u_printf_stream_handler *handler, format = u_locbund_getNumberFormat(formatBundle, UNUM_SCIENTIFIC); /* handle error */ - if(format == 0) + if (format == nullptr) return 0; /* set the appropriate flags on the formatter */ @@ -649,7 +649,7 @@ u_printf_scientific_handler(const u_printf_stream_handler *handler, } /* format the number */ - resultLen = unum_formatDouble(format, num, result, UPRINTF_BUFFER_SIZE, 0, &status); + resultLen = unum_formatDouble(format, num, result, UPRINTF_BUFFER_SIZE, nullptr, &status); if (U_FAILURE(status)) { resultLen = 0; @@ -704,7 +704,7 @@ u_printf_percent_handler(const u_printf_stream_handler *handler, format = u_locbund_getNumberFormat(formatBundle, UNUM_PERCENT); /* handle error */ - if(format == 0) + if (format == nullptr) return 0; /* save the formatter's state */ @@ -732,7 +732,7 @@ u_printf_percent_handler(const u_printf_stream_handler *handler, } /* format the number */ - resultLen = unum_formatDouble(format, num, result, UPRINTF_BUFFER_SIZE, 0, &status); + resultLen = unum_formatDouble(format, num, result, UPRINTF_BUFFER_SIZE, nullptr, &status); if (U_FAILURE(status)) { resultLen = 0; @@ -907,7 +907,7 @@ u_printf_spellout_handler(const u_printf_stream_handler *handler, format = u_locbund_getNumberFormat(formatBundle, UNUM_SPELLOUT); /* handle error */ - if(format == 0) + if (format == nullptr) return 0; /* save the formatter's state */ @@ -935,7 +935,7 @@ u_printf_spellout_handler(const u_printf_stream_handler *handler, } /* format the number */ - resultLen = unum_formatDouble(format, num, result, UPRINTF_BUFFER_SIZE, 0, &status); + resultLen = unum_formatDouble(format, num, result, UPRINTF_BUFFER_SIZE, nullptr, &status); if (U_FAILURE(status)) { resultLen = 0; @@ -1582,7 +1582,7 @@ u_printf_parse(const u_printf_stream_handler *streamHandler, /* call the handler function */ handler = g_u_printf_infos[ handlerNum ].handler; - if(handler != 0) { + if (handler != nullptr) { *written += (*handler)(streamHandler, context, formatBundle, info, &args); } else { diff --git a/contrib/libs/icu/io/uscanf.cpp b/contrib/libs/icu/io/uscanf.cpp index 2d72ccf515..5e1040fdb7 100644 --- a/contrib/libs/icu/io/uscanf.cpp +++ b/contrib/libs/icu/io/uscanf.cpp @@ -76,7 +76,7 @@ u_vfscanf(UFILE *f, /* convert from the default codepage to Unicode */ if (size >= MAX_UCHAR_BUFFER_SIZE(patBuffer)) { pattern = (char16_t *)uprv_malloc(size * sizeof(char16_t)); - if(pattern == 0) { + if (pattern == nullptr) { return 0; } } diff --git a/contrib/libs/icu/io/uscanf_p.cpp b/contrib/libs/icu/io/uscanf_p.cpp index 0a41dfe07d..3def83e1ff 100644 --- a/contrib/libs/icu/io/uscanf_p.cpp +++ b/contrib/libs/icu/io/uscanf_p.cpp @@ -457,7 +457,7 @@ u_scanf_double_handler(UFILE *input, format = u_locbund_getNumberFormat(&input->str.fBundle, UNUM_DECIMAL); /* handle error */ - if(format == 0) + if (format == nullptr) return 0; /* Skip the positive prefix. ICU normally can't handle this due to strict parsing. */ @@ -528,7 +528,7 @@ u_scanf_scientific_handler(UFILE *input, format = u_locbund_getNumberFormat(&input->str.fBundle, UNUM_SCIENTIFIC); /* handle error */ - if(format == 0) + if (format == nullptr) return 0; /* set the appropriate flags on the formatter */ @@ -635,7 +635,7 @@ u_scanf_scidbl_handler(UFILE *input, genericFormat = u_locbund_getNumberFormat(&input->str.fBundle, UNUM_DECIMAL); /* handle error */ - if(scientificFormat == 0 || genericFormat == 0) + if (scientificFormat == nullptr || genericFormat == nullptr) return 0; /* Skip the positive prefix. ICU normally can't handle this due to strict parsing. */ @@ -720,7 +720,7 @@ u_scanf_integer_handler(UFILE *input, format = u_locbund_getNumberFormat(&input->str.fBundle, UNUM_DECIMAL); /* handle error */ - if(format == 0) + if (format == nullptr) return 0; /* for integer types, do not attempt to parse fractions */ @@ -806,7 +806,7 @@ u_scanf_percent_handler(UFILE *input, format = u_locbund_getNumberFormat(&input->str.fBundle, UNUM_PERCENT); /* handle error */ - if(format == 0) + if (format == nullptr) return 0; /* Skip the positive prefix. ICU normally can't handle this due to strict parsing. */ @@ -1040,7 +1040,7 @@ u_scanf_spellout_handler(UFILE *input, format = u_locbund_getNumberFormat(&input->str.fBundle, UNUM_SPELLOUT); /* handle error */ - if(format == 0) + if (format == nullptr) return 0; /* Skip the positive prefix. ICU normally can't handle this due to strict parsing. */ @@ -1430,8 +1430,7 @@ u_scanf_parse(UFILE *f, /* call the handler function */ handler = g_u_scanf_infos[ handlerNum ].handler; - if(handler != 0) { - + if (handler != nullptr) { /* reset count to 1 so that += for alias works. */ count = 1; diff --git a/contrib/libs/icu/io/ustream.cpp b/contrib/libs/icu/io/ustream.cpp index fd783b3b23..2bc212da09 100644 --- a/contrib/libs/icu/io/ustream.cpp +++ b/contrib/libs/icu/io/ustream.cpp @@ -53,7 +53,7 @@ operator<<(STD_OSTREAM& stream, const UnicodeString& str) do { errorCode = U_ZERO_ERROR; s = buffer; - ucnv_fromUnicode(converter, &s, sLimit, &us, uLimit, 0, false, &errorCode); + ucnv_fromUnicode(converter, &s, sLimit, &us, uLimit, nullptr, false, &errorCode); *s = 0; // write this chunk @@ -114,7 +114,7 @@ operator>>(STD_ISTREAM& stream, UnicodeString& str) this code won't work on stateful encodings like ISO-2022 or an EBCDIC stateful encoding. We flush on the last byte to ensure that we output truncated multibyte characters. */ - ucnv_toUnicode(converter, &us, uLimit, &s, sLimit, 0, !continueReading, &errorCode); + ucnv_toUnicode(converter, &us, uLimit, &s, sLimit, nullptr, !continueReading, &errorCode); if(U_FAILURE(errorCode)) { /* Something really bad happened. setstate() isn't always an available API */ stream.clear(stream.failbit); diff --git a/contrib/libs/icu/ya.make b/contrib/libs/icu/ya.make index a7f7ec6808..2dcc6d46d4 100644 --- a/contrib/libs/icu/ya.make +++ b/contrib/libs/icu/ya.make @@ -12,9 +12,9 @@ LICENSE( LICENSE_TEXTS(.yandex_meta/licenses.list.txt) -VERSION(73.2) +VERSION(75.1) -ORIGINAL_SOURCE(https://github.com/unicode-org/icu/releases/download/release-73-2/icu4c-73_2-src.tgz) +ORIGINAL_SOURCE(https://github.com/unicode-org/icu/releases/download/release-75-1/icu4c-75_1-src.tgz) ADDINCL( GLOBAL contrib/libs/icu/include @@ -185,6 +185,8 @@ SRCS( common/uloc.cpp common/uloc_keytype.cpp common/uloc_tag.cpp + common/ulocale.cpp + common/ulocbuilder.cpp common/umapfile.cpp common/umath.cpp common/umutablecptrie.cpp @@ -338,6 +340,17 @@ SRCS( i18n/measunit.cpp i18n/measunit_extra.cpp i18n/measure.cpp + i18n/messageformat2.cpp + i18n/messageformat2_arguments.cpp + i18n/messageformat2_checker.cpp + i18n/messageformat2_data_model.cpp + i18n/messageformat2_errors.cpp + i18n/messageformat2_evaluation.cpp + i18n/messageformat2_formattable.cpp + i18n/messageformat2_formatter.cpp + i18n/messageformat2_function_registry.cpp + i18n/messageformat2_parser.cpp + i18n/messageformat2_serializer.cpp i18n/msgfmt.cpp i18n/name2uni.cpp i18n/nfrs.cpp @@ -486,7 +499,7 @@ SRCS( i18n/zonemeta.cpp i18n/zrule.cpp i18n/ztrans.cpp - icudt73_dat.rodata + icudt75_dat.rodata io/locbund.cpp io/sprintf.cpp io/sscanf.cpp |