Browse Source

Update ICU to 73.2

romankoshelev 1 year ago
parent
commit
cfcd865e05

+ 0 - 28
contrib/libs/cxxsupp/libcxx/include/ctgmath

@@ -1,28 +0,0 @@
-// -*- C++ -*-
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef _LIBCPP_CTGMATH
-#define _LIBCPP_CTGMATH
-
-/*
-    ctgmath synopsis
-
-#include <ccomplex>
-#include <cmath>
-
-*/
-
-#include <ccomplex>
-#include <cmath>
-
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
-#  pragma GCC system_header
-#endif
-
-#endif // _LIBCPP_CTGMATH

+ 5 - 1
contrib/libs/icu/CMakeLists.darwin-x86_64.txt

@@ -72,6 +72,7 @@ target_sources(contrib-libs-icu PRIVATE
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/lsr.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/lstmbe.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/messagepattern.cpp
+  ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/mlbe.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/normalizer2.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/normalizer2impl.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/normlzr.cpp
@@ -280,6 +281,7 @@ target_sources(contrib-libs-icu PRIVATE
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/decContext.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/decNumber.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/decimfmt.cpp
+  ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/displayoptions.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/double-conversion-bignum-dtoa.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/double-conversion-bignum.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/double-conversion-cached-powers.cpp
@@ -312,6 +314,7 @@ target_sources(contrib-libs-icu PRIVATE
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/indiancal.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/inputext.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/islamcal.cpp
+  ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/iso8601cal.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/japancal.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/listformatter.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/measfmt.cpp
@@ -347,6 +350,7 @@ target_sources(contrib-libs-icu PRIVATE
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_patternstring.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_rounding.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_scientific.cpp
+  ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_simple.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_skeletons.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_symbolswrapper.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_usageprefs.cpp
@@ -480,5 +484,5 @@ target_sources(contrib-libs-icu PRIVATE
 )
 target_rodata_sources(contrib-libs-icu
   PRIVATE
-  ${CMAKE_SOURCE_DIR}/contrib/libs/icu/icudt70_dat.rodata
+  ${CMAKE_SOURCE_DIR}/contrib/libs/icu/icudt73_dat.rodata
 )

+ 5 - 1
contrib/libs/icu/CMakeLists.linux-aarch64.txt

@@ -73,6 +73,7 @@ target_sources(contrib-libs-icu PRIVATE
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/lsr.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/lstmbe.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/messagepattern.cpp
+  ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/mlbe.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/normalizer2.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/normalizer2impl.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/normlzr.cpp
@@ -281,6 +282,7 @@ target_sources(contrib-libs-icu PRIVATE
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/decContext.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/decNumber.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/decimfmt.cpp
+  ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/displayoptions.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/double-conversion-bignum-dtoa.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/double-conversion-bignum.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/double-conversion-cached-powers.cpp
@@ -313,6 +315,7 @@ target_sources(contrib-libs-icu PRIVATE
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/indiancal.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/inputext.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/islamcal.cpp
+  ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/iso8601cal.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/japancal.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/listformatter.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/measfmt.cpp
@@ -348,6 +351,7 @@ target_sources(contrib-libs-icu PRIVATE
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_patternstring.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_rounding.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_scientific.cpp
+  ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_simple.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_skeletons.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_symbolswrapper.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_usageprefs.cpp
@@ -481,5 +485,5 @@ target_sources(contrib-libs-icu PRIVATE
 )
 target_rodata_sources(contrib-libs-icu
   PRIVATE
-  ${CMAKE_SOURCE_DIR}/contrib/libs/icu/icudt70_dat.rodata
+  ${CMAKE_SOURCE_DIR}/contrib/libs/icu/icudt73_dat.rodata
 )

+ 5 - 1
contrib/libs/icu/CMakeLists.linux-x86_64.txt

@@ -73,6 +73,7 @@ target_sources(contrib-libs-icu PRIVATE
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/lsr.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/lstmbe.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/messagepattern.cpp
+  ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/mlbe.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/normalizer2.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/normalizer2impl.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/normlzr.cpp
@@ -281,6 +282,7 @@ target_sources(contrib-libs-icu PRIVATE
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/decContext.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/decNumber.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/decimfmt.cpp
+  ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/displayoptions.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/double-conversion-bignum-dtoa.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/double-conversion-bignum.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/double-conversion-cached-powers.cpp
@@ -313,6 +315,7 @@ target_sources(contrib-libs-icu PRIVATE
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/indiancal.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/inputext.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/islamcal.cpp
+  ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/iso8601cal.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/japancal.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/listformatter.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/measfmt.cpp
@@ -348,6 +351,7 @@ target_sources(contrib-libs-icu PRIVATE
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_patternstring.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_rounding.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_scientific.cpp
+  ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_simple.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_skeletons.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_symbolswrapper.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_usageprefs.cpp
@@ -481,5 +485,5 @@ target_sources(contrib-libs-icu PRIVATE
 )
 target_rodata_sources(contrib-libs-icu
   PRIVATE
-  ${CMAKE_SOURCE_DIR}/contrib/libs/icu/icudt70_dat.rodata
+  ${CMAKE_SOURCE_DIR}/contrib/libs/icu/icudt73_dat.rodata
 )

+ 5 - 1
contrib/libs/icu/CMakeLists.windows-x86_64.txt

@@ -74,6 +74,7 @@ target_sources(contrib-libs-icu PRIVATE
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/lsr.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/lstmbe.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/messagepattern.cpp
+  ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/mlbe.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/normalizer2.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/normalizer2impl.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/common/normlzr.cpp
@@ -282,6 +283,7 @@ target_sources(contrib-libs-icu PRIVATE
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/decContext.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/decNumber.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/decimfmt.cpp
+  ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/displayoptions.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/double-conversion-bignum-dtoa.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/double-conversion-bignum.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/double-conversion-cached-powers.cpp
@@ -314,6 +316,7 @@ target_sources(contrib-libs-icu PRIVATE
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/indiancal.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/inputext.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/islamcal.cpp
+  ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/iso8601cal.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/japancal.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/listformatter.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/measfmt.cpp
@@ -349,6 +352,7 @@ target_sources(contrib-libs-icu PRIVATE
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_patternstring.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_rounding.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_scientific.cpp
+  ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_simple.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_skeletons.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_symbolswrapper.cpp
   ${CMAKE_SOURCE_DIR}/contrib/libs/icu/i18n/number_usageprefs.cpp
@@ -482,5 +486,5 @@ target_sources(contrib-libs-icu PRIVATE
 )
 target_rodata_sources(contrib-libs-icu
   PRIVATE
-  ${CMAKE_SOURCE_DIR}/contrib/libs/icu/icudt70_dat.rodata
+  ${CMAKE_SOURCE_DIR}/contrib/libs/icu/icudt73_dat.rodata
 )

+ 116 - 9
contrib/libs/icu/LICENSE

@@ -1,6 +1,19 @@
-COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later)
+UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
 
-Copyright © 1991-2020 Unicode, Inc. All rights reserved.
+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.
+
+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
@@ -32,7 +45,7 @@ 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.
 
----------------------
+----------------------------------------------------------------------
 
 Third-Party Software Licenses
 
@@ -40,7 +53,9 @@ This section contains third-party software notices and/or additional
 terms for licensed third-party software components included within ICU
 libraries.
 
-1. ICU License - ICU 1.8.1 to ICU 57.1
+----------------------------------------------------------------------
+
+ICU License - ICU 1.8.1 to ICU 57.1
 
 COPYRIGHT AND PERMISSION NOTICE
 
@@ -75,7 +90,9 @@ of the copyright holder.
 All trademarks and registered trademarks mentioned herein are the
 property of their respective owners.
 
-2. Chinese/Japanese Word Break Dictionary Data (cjdict.txt)
+----------------------------------------------------------------------
+
+Chinese/Japanese Word Break Dictionary Data (cjdict.txt)
 
  #     The Google Chrome software developed by Google is licensed under
  # the BSD license. Other software included in this distribution is
@@ -279,7 +296,9 @@ property of their respective owners.
  #
  #  ---------------COPYING.ipadic-----END----------------------------------
 
-3. Lao Word Break Dictionary Data (laodict.txt)
+----------------------------------------------------------------------
+
+Lao Word Break Dictionary Data (laodict.txt)
 
  # Copyright (C) 2016 and later: Unicode, Inc. and others.
  # License & terms of use: http://www.unicode.org/copyright.html
@@ -319,7 +338,9 @@ property of their respective owners.
  # OF THE POSSIBILITY OF SUCH DAMAGE.
  #  --------------------------------------------------------------------------
 
-4. Burmese Word Break Dictionary Data (burmesedict.txt)
+----------------------------------------------------------------------
+
+Burmese Word Break Dictionary Data (burmesedict.txt)
 
  #  Copyright (c) 2014 International Business Machines Corporation
  #  and others. All Rights Reserved.
@@ -359,7 +380,9 @@ property of their respective owners.
  #  SUCH DAMAGE.
  #  --------------------------------------------------------------------------
 
-5. Time Zone Database
+----------------------------------------------------------------------
+
+Time Zone Database
 
   ICU uses the public domain data and code derived from Time Zone
 Database for its time zone support. The ownership of the TZ database
@@ -382,7 +405,9 @@ Database section 7.
  #    making a contribution to the database or code waives all rights to
  #    future claims in that contribution or in the TZ Database.
 
-6. Google double-conversion
+----------------------------------------------------------------------
+
+Google double-conversion
 
 Copyright 2006-2011, the V8 project authors. All rights reserved.
 Redistribution and use in source and binary forms, with or without
@@ -410,3 +435,85 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+
+File: aclocal.m4 (only for ICU4C)
+Section: pkg.m4 - Macros to locate and utilise pkg-config.
+
+
+Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA.
+
+As a special exception to the GNU General Public License, if you
+distribute this file as part of a program that contains a
+configuration script generated by Autoconf, you may include it under
+the same distribution terms that you use for the rest of that
+program.
+
+
+(The condition for the exception is fulfilled because
+ICU4C includes a configuration script generated by Autoconf,
+namely the `configure` script.)
+
+----------------------------------------------------------------------
+
+File: config.guess (only for ICU4C)
+
+
+This file is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, see <https://www.gnu.org/licenses/>.
+
+As a special exception to the GNU General Public License, if you
+distribute this file as part of a program that contains a
+configuration script generated by Autoconf, you may include it under
+the same distribution terms that you use for the rest of that
+program.  This Exception is an additional permission under section 7
+of the GNU General Public License, version 3 ("GPLv3").
+
+
+(The condition for the exception is fulfilled because
+ICU4C includes a configuration script generated by Autoconf,
+namely the `configure` script.)
+
+----------------------------------------------------------------------
+
+File: install-sh (only for ICU4C)
+
+
+Copyright 1991 by the Massachusetts Institute of Technology
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name of M.I.T. not be used in advertising or
+publicity pertaining to distribution of the software without specific,
+written prior permission.  M.I.T. makes no representations about the
+suitability of this software for any purpose.  It is provided "as is"
+without express or implied warranty.

+ 11 - 11
contrib/libs/icu/common/appendable.cpp

@@ -25,45 +25,45 @@ Appendable::~Appendable() {}
 UBool
 Appendable::appendCodePoint(UChar32 c) {
     if(c<=0xffff) {
-        return appendCodeUnit((UChar)c);
+        return appendCodeUnit((char16_t)c);
     } else {
         return appendCodeUnit(U16_LEAD(c)) && appendCodeUnit(U16_TRAIL(c));
     }
 }
 
 UBool
-Appendable::appendString(const UChar *s, int32_t length) {
+Appendable::appendString(const char16_t *s, int32_t length) {
     if(length<0) {
-        UChar c;
+        char16_t c;
         while((c=*s++)!=0) {
             if(!appendCodeUnit(c)) {
-                return FALSE;
+                return false;
             }
         }
     } else if(length>0) {
-        const UChar *limit=s+length;
+        const char16_t *limit=s+length;
         do {
             if(!appendCodeUnit(*s++)) {
-                return FALSE;
+                return false;
             }
         } while(s<limit);
     }
-    return TRUE;
+    return true;
 }
 
 UBool
 Appendable::reserveAppendCapacity(int32_t /*appendCapacity*/) {
-    return TRUE;
+    return true;
 }
 
-UChar *
+char16_t *
 Appendable::getAppendBuffer(int32_t minCapacity,
                             int32_t /*desiredCapacityHint*/,
-                            UChar *scratch, int32_t scratchCapacity,
+                            char16_t *scratch, int32_t scratchCapacity,
                             int32_t *resultCapacity) {
     if(minCapacity<1 || scratchCapacity<minCapacity) {
         *resultCapacity=0;
-        return NULL;
+        return nullptr;
     }
     *resultCapacity=scratchCapacity;
     return scratch;

+ 8 - 8
contrib/libs/icu/common/bmpset.cpp

@@ -309,9 +309,9 @@ BMPSet::contains(UChar32 c) const {
         // surrogate or supplementary code point
         return containsSlow(c, list4kStarts[0xd], list4kStarts[0x11]);
     } else {
-        // Out-of-range code points get FALSE, consistent with long-standing
+        // Out-of-range code points get false, consistent with long-standing
         // behavior of UnicodeSet::contains(c).
-        return FALSE;
+        return false;
     }
 }
 
@@ -319,9 +319,9 @@ BMPSet::contains(UChar32 c) const {
  * Check for sufficient length for trail unit for each surrogate pair.
  * Handle single surrogates as surrogate code points as usual in ICU.
  */
-const UChar *
-BMPSet::span(const UChar *s, const UChar *limit, USetSpanCondition spanCondition) const {
-    UChar c, c2;
+const char16_t *
+BMPSet::span(const char16_t *s, const char16_t *limit, USetSpanCondition spanCondition) const {
+    char16_t c, c2;
 
     if(spanCondition) {
         // span
@@ -408,9 +408,9 @@ BMPSet::span(const UChar *s, const UChar *limit, USetSpanCondition spanCondition
 }
 
 /* Symmetrical with span(). */
-const UChar *
-BMPSet::spanBack(const UChar *s, const UChar *limit, USetSpanCondition spanCondition) const {
-    UChar c, c2;
+const char16_t *
+BMPSet::spanBack(const char16_t *s, const char16_t *limit, USetSpanCondition spanCondition) const {
+    char16_t c, c2;
 
     if(spanCondition) {
         // span

+ 2 - 2
contrib/libs/icu/common/bmpset.h

@@ -48,14 +48,14 @@ public:
      * It must be s<limit and spanCondition==0 or 1.
      * @return The string pointer which limits the span.
      */
-    const UChar *span(const UChar *s, const UChar *limit, USetSpanCondition spanCondition) const;
+    const char16_t *span(const char16_t *s, const char16_t *limit, USetSpanCondition spanCondition) const;
 
     /*
      * Span the trailing substring for which each character c has spanCondition==contains(c).
      * It must be s<limit and spanCondition==0 or 1.
      * @return The string pointer which starts the span.
      */
-    const UChar *spanBack(const UChar *s, const UChar *limit, USetSpanCondition spanCondition) const;
+    const char16_t *spanBack(const char16_t *s, const char16_t *limit, USetSpanCondition spanCondition) const;
 
     /*
      * Span the initial substring for which each character c has spanCondition==contains(c).

+ 20 - 19
contrib/libs/icu/common/brkeng.cpp

@@ -79,6 +79,7 @@ UnhandledEngine::findBreaks( UText *text,
                              int32_t /* startPos */,
                              int32_t endPos,
                              UVector32 &/*foundBreaks*/,
+                             UBool /* isPhraseBreaking */,
                              UErrorCode &status) const {
     if (U_FAILURE(status)) return 0;
     UChar32 c = utext_current32(text); 
@@ -129,7 +130,7 @@ U_NAMESPACE_BEGIN
 
 const LanguageBreakEngine *
 ICULanguageBreakFactory::getEngineFor(UChar32 c) {
-    const LanguageBreakEngine *lbe = NULL;
+    const LanguageBreakEngine *lbe = nullptr;
     UErrorCode  status = U_ZERO_ERROR;
 
     static UMutex gBreakEngineMutex;
@@ -146,7 +147,7 @@ ICULanguageBreakFactory::getEngineFor(UChar32 c) {
         int32_t i = fEngines->size();
         while (--i >= 0) {
             lbe = (const LanguageBreakEngine *)(fEngines->elementAt(i));
-            if (lbe != NULL && lbe->handles(c)) {
+            if (lbe != nullptr && lbe->handles(c)) {
                 return lbe;
             }
         }
@@ -184,7 +185,7 @@ ICULanguageBreakFactory::loadEngineFor(UChar32 c) {
         }
         status = U_ZERO_ERROR;  // fallback to dictionary based
         DictionaryMatcher *m = loadDictionaryMatcherFor(code);
-        if (m != NULL) {
+        if (m != nullptr) {
             switch(code) {
             case USCRIPT_THAI:
                 engine = new ThaiBreakEngine(m, status);
@@ -229,17 +230,17 @@ ICULanguageBreakFactory::loadEngineFor(UChar32 c) {
             default:
                 break;
             }
-            if (engine == NULL) {
+            if (engine == nullptr) {
                 delete m;
             }
             else if (U_FAILURE(status)) {
                 delete engine;
-                engine = NULL;
+                engine = nullptr;
             }
             return engine;
         }
     }
-    return NULL;
+    return nullptr;
 }
 
 DictionaryMatcher *
@@ -249,21 +250,21 @@ ICULanguageBreakFactory::loadDictionaryMatcherFor(UScriptCode script) {
     UResourceBundle *b = ures_open(U_ICUDATA_BRKITR, "", &status);
     b = ures_getByKeyWithFallback(b, "dictionaries", b, &status);
     int32_t dictnlength = 0;
-    const UChar *dictfname =
+    const char16_t *dictfname =
         ures_getStringByKeyWithFallback(b, uscript_getShortName(script), &dictnlength, &status);
     if (U_FAILURE(status)) {
         ures_close(b);
-        return NULL;
+        return nullptr;
     }
     CharString dictnbuf;
     CharString ext;
-    const UChar *extStart = u_memrchr(dictfname, 0x002e, dictnlength);  // last dot
-    if (extStart != NULL) {
+    const char16_t *extStart = u_memrchr(dictfname, 0x002e, dictnlength);  // last dot
+    if (extStart != nullptr) {
         int32_t len = (int32_t)(extStart - dictfname);
-        ext.appendInvariantChars(UnicodeString(FALSE, extStart + 1, dictnlength - len - 1), status);
+        ext.appendInvariantChars(UnicodeString(false, extStart + 1, dictnlength - len - 1), status);
         dictnlength = len;
     }
-    dictnbuf.appendInvariantChars(UnicodeString(FALSE, dictfname, dictnlength), status);
+    dictnbuf.appendInvariantChars(UnicodeString(false, dictfname, dictnlength), status);
     ures_close(b);
 
     UDataMemory *file = udata_open(U_ICUDATA_BRKITR, ext.data(), dictnbuf.data(), &status);
@@ -273,29 +274,29 @@ ICULanguageBreakFactory::loadDictionaryMatcherFor(UScriptCode script) {
         const int32_t *indexes = (const int32_t *)data;
         const int32_t offset = indexes[DictionaryData::IX_STRING_TRIE_OFFSET];
         const int32_t trieType = indexes[DictionaryData::IX_TRIE_TYPE] & DictionaryData::TRIE_TYPE_MASK;
-        DictionaryMatcher *m = NULL;
+        DictionaryMatcher *m = nullptr;
         if (trieType == DictionaryData::TRIE_TYPE_BYTES) {
             const int32_t transform = indexes[DictionaryData::IX_TRANSFORM];
             const char *characters = (const char *)(data + offset);
             m = new BytesDictionaryMatcher(characters, transform, file);
         }
         else if (trieType == DictionaryData::TRIE_TYPE_UCHARS) {
-            const UChar *characters = (const UChar *)(data + offset);
+            const char16_t *characters = (const char16_t *)(data + offset);
             m = new UCharsDictionaryMatcher(characters, file);
         }
-        if (m == NULL) {
+        if (m == nullptr) {
             // no matcher exists to take ownership - either we are an invalid 
             // type or memory allocation failed
             udata_close(file);
         }
         return m;
-    } else if (dictfname != NULL) {
+    } else if (dictfname != nullptr) {
         // we don't have a dictionary matcher.
-        // returning NULL here will cause us to fail to find a dictionary break engine, as expected
+        // returning nullptr here will cause us to fail to find a dictionary break engine, as expected
         status = U_ZERO_ERROR;
-        return NULL;
+        return nullptr;
     }
-    return NULL;
+    return nullptr;
 }
 
 U_NAMESPACE_END

Some files were not shown because too many files changed in this diff